LoTROInterface

LoTROInterface (https://www.lotrointerface.com/forums/index.php)
-   General Authoring Discussion (L) (https://www.lotrointerface.com/forums/forumdisplay.php?f=22)
-   -   queued PluginData.Save calls execute on unload (https://www.lotrointerface.com/forums/showthread.php?t=1804)

K1R4D3L 05-13-2012 03:50 PM

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

RandomAugury 05-15-2012 05:44 AM

I don't think they happen if you exit the game in an irregular manner. e.g. alt-f4

K1R4D3L 05-15-2012 08:54 AM

Quote:

Originally Posted by RandomAugury (Post 7924)
I don't think they happen if you exit the game in an irregular manner. e.g. alt-f4

Right, that would be pretty much the same as a crash, or "End Process", or pushing the power button.

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.

Niwashi 05-15-2012 04:38 PM

Quote:

Originally Posted by K1R4D3L (Post 7926)
Quote:

Originally Posted by RandomAugury (Post 7924)
I don't think they happen if you exit the game in an irregular manner. e.g. alt-f4

Right, that would be pretty much the same as a crash, or "End Process", or pushing the power button.

Alt-F4 is the keyboard equivalent of clicking the [X] button in a window's top corner to close the main application window. It's a graceful shutdown, not a crash, as the application still does all it's normal processing for what to do when the window is closed. I'm not certain enough about the game's software to say if closing the window does all the same shutdown processing that selecting the Quit Game button does, but I'd be very surprised if it doesn't.

K1R4D3L 05-15-2012 08:09 PM

Quote:

Originally Posted by Niwashi (Post 7928)
Alt-F4 is the keyboard equivalent of clicking the [X] button in a window's top corner to close the main application window. It's a graceful shutdown, not a crash, as the application still does all it's normal processing for what to do when the window is closed. I'm not certain enough about the game's software to say if closing the window does all the same shutdown processing that selecting the Quit Game button does, but I'd be very surprised if it doesn't.

Ah, learn something new every day. I'm obviously not a Windows dev. :) I usually use Alt-F4 when the window doesn't have a close button, or the UI isn't responding, so I didn't equate the two.

I tested it, and you're absolutely right, Alt-F4 does the saves like a normal Exit.

Adder 05-16-2012 08:58 AM

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.

K1R4D3L 05-16-2012 10:00 AM

Quote:

Originally Posted by Adder (Post 7930)
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.

Is it that bad then? I haven't had any crashes myself...heard grumblings, but wasn't sure how isolated it was.

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.

Eili 05-16-2012 10:54 AM

Quote:

Originally Posted by K1R4D3L (Post 7931)
Is it that bad then? I haven't had any crashes myself...heard grumblings, but wasn't sure how isolated it was.

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.

The only solution i found after having 2 of those client crash (only related directly to Lotro.client crashing in any report) is that once everything is in place in layout and in the data.plugins, i just create a savefolder of everything that i put outside of the Lotro folder.

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.

K1R4D3L 05-16-2012 11:14 AM

Quote:

Originally Posted by Eili (Post 7932)
At least i dont have to re create everything and put in place my layout again.

Yeah, I do the same thing for layouts and basic settings - not for crashes, as I've never had one, but because I've lost things from plugin upgrades, locale testing, etc. This works fine for things that don't change frequently, but for plugins that store changing data that can't be recovered, such as Combat Analysis and my own KillTracker, this doesn't really help.


All times are GMT -5. The time now is 01:29 PM.

vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI