Major saving issue?

So I'm playtesting a game, and very close to done, however, I noticed a major game killing issue. There are sweet spots (and quite a few of them) that not only do not allow you to save your game, but will actually delete your save file. Imagine playing for hours upon hours, saving on one of these sweet spots, and finding out that your file is gone. I was wondering what causes this, and is there a fix to it? Please be advised: I am testing from the distrobution package, and did not find anything suspicious in the editor. In one map, there is a looping event, but in the other, there is no such issue.
You say there's a looping event, have you seen the save file get corrupted in maps without looping events? I have seen looped events cause all sorts of lag issues. I can't be sure myself but I would think the lag from a loop while saving could cause the save to get messed up. Also for saving I use an auto save plugin, there are a few different ones. Maybe one of these could help bypass an issue with saving, they have all sorts of customization options. I'll post a link to the one I use so you can have a look and see if it's anything that might help your situation.

https://github.com/Hudell/mv-plugins/blob/master/OrangeAutoSave.js
If a save file fails to save properly, it will delete the resulting file, as it is corrupt. Backups of existing saves in existing slots are not made.

If you're using the PC distribution, you should still be able to open the developer tools with F12. I don't remember if the engine specifically says there was an issue saving, or if it fails silently, but the dev tools will help you get one step closer to possibly finding the issue.
If a save file fails to save properly, it will delete the resulting file, as it is corrupt. Backups of existing saves in existing slots are not made.

If you're using the PC distribution, you should still be able to open the developer tools with F12. I don't remember if the engine specifically says there was an issue saving, or if it fails silently, but the dev tools will help you get one step closer to possibly finding the issue.
Weren't backups implemented in one of the updates?
You say there's a looping event, have you seen the save file get corrupted in maps without looping events? I have seen looped events cause all sorts of lag issues. I can't be sure myself but I would think the lag from a loop while saving could cause the save to get messed up. Also for saving I use an auto save plugin, there are a few different ones. Maybe one of these could help bypass an issue with saving, they have all sorts of customization options. I'll post a link to the one I use so you can have a look and see if it's anything that might help your situation.

https://github.com/Hudell/mv-plugins/blob/master/OrangeAutoSave.js

In response to your question, I worded that wrong. In my haste to get my initial post typed before work, I should have said the map without the looping event still has this issue.

I checked out the dev tools through the editor, and it came up with the error message "object too deep" <insert thats what she said joke here>. Does anybody know what that may mean?
The reason a save fails and causes the save file to be deleted is that you're trying to save something that's not in a format appropriate for saving.

One well-known and common cause of this is when you have a looping event that is playing an animation (or a balloon?) on itself or another event.

Are you SURE there are no looping events on the other map? What about common events?

"Stack level too deep" is a common error in the previous RPG Makers (like Ace) that is usually caused by having the same script added twice. Any chance you've added a plugin twice? "Object too deep" may have a similar meaning, or could mean something totally different.

If you can go to the map where you're unable to save, and try to save, does it play a buzzer sound? Go to the console immediately and take a screenshot of the error messages. The message is not as useful as the name of the script and line number that generated it.
There is another possible cause that you should check, although from your description it's unlikely.

If you develop and play your game in a directory that autosyncs to an internet clouddrive, then there is a chance that the automatic sync function can block or destroy data that is used by the RM at the same time.
However, this usually results in random errors everywhere in the project, it's not limited to a specific map - that is why I consider this unlikely in your case.
The reason a save fails and causes the save file to be deleted is that you're trying to save something that's not in a format appropriate for saving.

One well-known and common cause of this is when you have a looping event that is playing an animation (or a balloon?) on itself or another event.

Are you SURE there are no looping events on the other map? What about common events?

"Stack level too deep" is a common error in the previous RPG Makers (like Ace) that is usually caused by having the same script added twice. Any chance you've added a plugin twice? "Object too deep" may have a similar meaning, or could mean something totally different.

If you can go to the map where you're unable to save, and try to save, does it play a buzzer sound? Go to the console immediately and take a screenshot of the error messages. The message is not as useful as the name of the script and line number that generated it.

I just looked back at it, "Object Too Deep" is a little different from a stack overflow in MV. There's a check when saving a file to make sure it isn't getting stuck in an infinite loop. If it has to go through 100 layers of objects in a straight line (as in, there's the base object, which has a child, which has a child ... which has a child until it gets to 100 children), it will break the loops to prevent a stack overflow from occurring with the function being called repeatedly.

That being said, @lockcitra22 , chances are that a plugin you're using is making data unsavable (Or, I suppose that animation thing Shaz mentioned? I never heard of that one before). It sounds like something is putting a circular reference in data that needs to be saved. What this means is that somewhere down the line of objects that are being saved, the data points back up to an earlier point in the data, so it goes back down, and then back up, and then back down until it errors out.

I also do see here that backups were added, I hadn't known about that before, but if your project isn't updated to that point, then you wouldn't have that functionality. I'd say make sure that your project is up to date, not just your editor, an then make sure your plugins are up to date. If that doesn't fix it, then the most probably cause in my mind is that a plugin is doing something silly. I recommend that you also look into the issue Shaz mentioned, as it sounds like that's become a known issue, however as I'm unaware of it, I can't offer any assistance with that.

Original thread: https://forums.rpgmakerweb.com/threads/major-saving-issue.79301/