VX Ace - Marshal.load won't load

I've been asked to take a look at someone's Ace game. It was released with Victor's Light Effects scripts which was later replaced with Khas Ultra Lighting script. A couple of other scripts had to be removed and replaced at the same time for the sake of compatibility (I don't have the old/new projects open and don't recall which ones they were).


I have a save file from the early version that will not load in the new version of the game. I've tracked it down to Marshal.load not actually loading the content (the header loads fine). If I look at the file in a text editor, I can see the symbols there for the various content keys, and it still loads okay in the early version of the game.


One of the removed scripts has a marshal_load and marshal_dump method, but even re-enabling that didn't do away with the problem.


Any ideas on what to look at next? What could cause Marshal.load to return nothing when there really is something there?
Was the save file also remade when you re-enabled the custom load and dump method? Is that script also present on the old version that loads fine? Was the script (same version as the current one) already there when the save file was made?


btw, does it give an error or Marshal.load simply returns nothing?
The save file hasn't been remade. I haven't attempted to save, as I don't want to replace the file I have to test with. The script with the custom load & dump methods was just disabled. I re-enabled it and it made no difference.


No error thrown - I select a save file to load, and get the buzzer. Adding some logging to the console, the Marshal.load command that reads the header returns the correct info, but the next Marshal.load command that sends the argument to the extract save data method either doesn't complete at all, or returns nothing. I'm not sure which one it is - I'll have to log something to the console after attempting to load the contents to see if it gets that far. That'll have to be tomorrow.
Hi,

If there's a buzzer sound, then the load routine likely caused an exception. During the load process errors are caught and ignored by default (see line 149 of the data manager script).
Yeah, save file loading is made under a begin rescue clause so if it has problems in loading it will simply skip loading and play a buzzer... I experienced that a lot when I was modifying which things are saved, it makes debugging it quite a bit more work.


You could start by trying to Marshal.load the file outside of the whole save file loading to actually see an error message.
I was just thinking about that this morning. Thanks 🙂

Original thread: https://forums.rpgmakerweb.com/threads/vx-ace-marshal-load-wont-load.54060/