Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saving Error #6

Closed
RockguyRy opened this issue Mar 5, 2021 · 8 comments
Closed

Saving Error #6

RockguyRy opened this issue Mar 5, 2021 · 8 comments

Comments

@RockguyRy
Copy link

Hello,

When I try to save my map or save config I get the following:

Saving file(s)...
Client ';save' : Files saved: 2, errors: 1
Saving file(s)...
Client ';save' : Files saved: 12, errors: 1

I can't diagnose what file is the issue or how to correct it since my map updates are not saving anymore.

When I do ;modelreport I have * next to worldprof and worldmodel (* - not saved).

@RockguyRy
Copy link
Author

It looks like the issue was in the automapper. I had to delete two large maps in order to be able to save the files properly and map again.

@axcore
Copy link
Owner

axcore commented Mar 6, 2021

Hmmm, I'm not sure what to recommend. In the past, very large maps (100,000s of rooms) have caused problems when loading, but never before when saving.

;save -f followed by ;showfile should show you which file was not saved (the unsaved files have an asterisk next to them).

You can try saving just the map/world model file, ;save -m

You could try closing the automapper window before saving, which should release some spare memory (in case it's a memory problem).

Try those things, if they don't help then I'll add a load of debug messages to the saving code, so we can see clearly what is going wrong.

Make sure you are making frequent backup copies of your maps. Problems of this kind can usually be resolved with a bit of tinkering, even when the situation seems hopeless.

@RockguyRy
Copy link
Author

Unfortunately those did not work. It looks like something is up with the automapper.

After thinking I had it all sorted out I went back to re-mapping what I had lost. Now I've hit like a room limit. At my current save if I add one more room (manually or automatically) I can no longer save the map.

We may need some debug messages.

@RockguyRy
Copy link
Author

So I managed to generate a report on my map:

orld model general report

Total objects: 5000
Regions: 132
Rooms: 4868
Exits: 12724
Weapons: 0
Armours: 0
Garments: 0
Characters: 0
Minions: 0
Sentients: 0
Creatures: 0
Portables: 0
Decorations: 0
Custom objects: 0

I find it interesting that total objects is 5,000. I cannot find anywhere to adjust that . This may be the issue is there is a max of 5,000?

@RockguyRy
Copy link
Author

My hunch was right. It was a 5000 object limit.

If I edit axmud.ini
# Approximate size of multiple world model files 5000

from 5000 to 10000 it is able to save the model files without error. May want to provide some sort of warning or ability to increase file sizes?

@axcore
Copy link
Owner

axcore commented Mar 8, 2021

tl;dr See the workaround at the end

I was able partially reproduce your problem. This is what I discovered:

When a large map is saved, an extra copy of the whole map must be created in memory. (It's a Perl thing, nothing we can do about it.)

This caused problems on old computers with large maps: there wasn't enough memory to create the extra copy. Therefore I added code to split the map into pieces, and save the pieces one at a time.

So, the code for saving a whole map is different to the code that saves the map in pieces. That's why you only see the problem once the map is above 5000 rooms.

I checked the code. For some reason, Perl is not deleting the temporary directory in which the map is initially saved. Therefore when you try to save the map a second time, Axmud sees the temporary directory, assumes that some other process is saving a map right now, and halts the operation.

I will have to do some more testing, before I can apply a permanent fix. But there is a simple workaround:

  1. Find Axmud's data folder
  2. Find the map location, for example /home/YOUR-NAME/axmud-data/worlds/MUD_NAME/
  3. If there is an empty sub-directory called temp, then delete it
  4. You can now save the map

@axcore
Copy link
Owner

axcore commented Mar 8, 2021

Your workaround is also ok: If your computer has enough memory, then you can change the 5000 room limit to anything you like, or even disable it altogether. See:

;help splitmodel
;h smd

This was an experimental feature and it doesn't seem possible to change the value from the preferences window.

@axcore
Copy link
Owner

axcore commented Jan 21, 2024

v2.0.0, released today, fixes all of these problems (hopefully).

If you still want to, you can now change the size of the map chunks; click Edit > Axmud preferences > Client > Page 4, and scroll down a little bit.

Saving maps works regardless of whether or not you change the size.

@axcore axcore closed this as completed Jan 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants