lotrointerface.com
Search Downloads


Go Back   LoTROInterface > LotRO > Developer Discussions > General Authoring Discussion (L)

Reply
Thread Tools Display Modes
  #1  
Unread 05-13-2012, 03:50 PM
K1R4D3L K1R4D3L is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Feb 2012
Posts: 34
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
Reply With Quote
  #2  
Unread 05-15-2012, 05:44 AM
RandomAugury RandomAugury is offline
The Undefeated
Interface Author - Click to view interfaces
 
Join Date: Feb 2012
Posts: 5
I don't think they happen if you exit the game in an irregular manner. e.g. alt-f4
Reply With Quote
  #3  
Unread 05-15-2012, 08:54 AM
K1R4D3L K1R4D3L is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Feb 2012
Posts: 34
Quote:
Originally Posted by RandomAugury
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.
Reply With Quote
  #4  
Unread 05-15-2012, 04:38 PM
Niwashi's Avatar
Niwashi Niwashi is offline
The Undefeated
Interface Author - Click to view interfaces
 
Join Date: Feb 2011
Posts: 7
Quote:
Originally Posted by K1R4D3L
Quote:
Originally Posted by RandomAugury
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.

Last edited by Niwashi : 05-15-2012 at 04:40 PM.
Reply With Quote
  #5  
Unread 05-15-2012, 08:09 PM
K1R4D3L K1R4D3L is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Feb 2012
Posts: 34
Quote:
Originally Posted by Niwashi
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.
Reply With Quote
  #6  
Unread 05-16-2012, 08:58 AM
Adder's Avatar
Adder Adder is offline
The Undying
 
Join Date: May 2007
Location: South-Central PA. USA
Posts: 22
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.
__________________
~ Adder ~
Swift, Silent, Deadly
"You shall know the truth, and the truth will set you free."
Reply With Quote
  #7  
Unread 05-16-2012, 10:00 AM
K1R4D3L K1R4D3L is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Feb 2012
Posts: 34
Quote:
Originally Posted by Adder
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.
Reply With Quote
  #8  
Unread 05-16-2012, 10:54 AM
Eili's Avatar
Eili Eili is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Apr 2007
Location: Montreal
Posts: 159
Quote:
Originally Posted by K1R4D3L
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.
Reply With Quote
  #9  
Unread 05-16-2012, 11:14 AM
K1R4D3L K1R4D3L is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Feb 2012
Posts: 34
Quote:
Originally Posted by Eili
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.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PluginData file naming also parent plugin source Cordeval General Authoring Discussion (L) 3 02-18-2012 02:50 PM
Plugin unload itself... sutt Lua Programming Help (L) 2 06-24-2011 12:42 PM
save custom toolbars Nessy Interface Requests (L) 2 02-16-2011 02:16 PM
Save on Unload MrJackdaw Lua Programming Help (L) 1 12-16-2010 02:07 AM
Save Effect (Icon) in a file? Heta Lua Programming Help (L) 4 11-01-2010 11:03 AM


All times are GMT -5. The time now is 06:32 AM.


Our Network
EQInterface | EQ2Interface | Minion | WoWInterface | ESOUI | LoTROInterface | MMOUI | Swtorui