queued PluginData.Save calls execute on unload
Just thought I'd share the results of some testing, for anyone that wondered about this like I did after reading about the 30-second delay on data loads/saves after plugin initialization. It seems that when a plugin is unloaded, the character logged out, or the game exited, any queued PluginData.Save calls that are waiting on the 30-second timeout get called right away and are not lost.
That's a big relief - I was worried that I was going to have to use the separate plugin trick to save the data immediately to ensure there wasn't any data loss. Of course, a game crash would still likely cause the queued data to be lost, but that's pretty extreme to worry about. Nice to be able to share some good news for a change - we're usually just complaining :D |
I don't think they happen if you exit the game in an irregular manner. e.g. alt-f4
|
Quote:
Although any author with real-time data to save, such as Combat Analysis, or KillTracker, would want to do the best they can to ensure that data isn't lost because a save doesn't happen, I don't think it's ever so critical that we would need to worry about these extreme circumstances. Now, if someone were to tell me that they often exit the game that way for some reason, maybe I'd change my opinion. I was happy to know that it was at least working correctly under normal circumstances. |
Quote:
|
Quote:
I tested it, and you're absolutely right, Alt-F4 does the saves like a normal Exit. |
The problem with this is that since U6, many people are experiencing game crashes while playing and upon exiting the game using the regular exit functions, myself included. I've lost data such as layouts and skin selections, plugin icon position, character stats &/or options in some plugins, etc. Nothing major but it is aggravating at times.
|
Quote:
Well, from the symptoms you're describing, it sounds like we're talking about save file corruption - as in crashing mid-write. The second plugin to write the files without the delay wouldn't really solve that problem. Seems like the only real solution for that is to do something like what Garan does in Alt Inventory - save multiple (at least two) rotated snapshots of the data. That way, if the current one becomes corrupted, at least you don't lose everything. I'll probably do that...though if I do, I may just implement the second plugin at the same time. |
Quote:
After a crash i simply replace the Lotro folders by this one. (i update once a week my savefolder to be sur it stays uptodate with all the changes i may have in my data.plugins) At least i dont have to re create everything and put in place my layout again. |
Quote:
|
All times are GMT -5. The time now is 01:29 PM. |
vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI