Poster: Aalny at 7/22/2005 1:57:25 PM PDT Subject: Slouken: 2 SavedVariables corruption issues |
| |
Iriel said I should do this. =P
In the process of writing my own little SavedVariables parsing library, I stumbled upon a couple cases where normal Lua code in an AddOn can end up corrupting SavedVariables.
The first one is if you have a table value that's going to be saved to SavedVariables and that table has another table as a key, WoW will crash during any attempt to serialize the original table (i.e. on Logout or UI Reload). SavedVariables will only have been partially written...cut off at the point where it would try to serialize the table-based key.
The other one has to do with overflowing a numeric value past its double precision floating point limit in lua. Doesn't matter whether it's a table key or standard value, it'll get serialized to SavedVariables as positive or negative infinity (1.#INF or -1.#INF). Then, the next time you load WoW, it'll crash trying to read in that value and (I think) end up corrupting SavedVariables.
|
| | http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=186809&p=#post186809 |
| |
Poster: slouken at 7/22/2005 2:58:35 PM PDT Subject: Re: Slouken: 2 SavedVariables corruption issues |
| |
Can you post a link to a minimal addon that exhibits both problems?
Thanks!
|
| | http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=186809&p=#post186848 |
Poster: slouken at 7/22/2005 5:42:24 PM PDT Subject: Re: Slouken: 2 SavedVariables corruption issues |
| |
Thanks! These will be fixed in 1.7, and you'll get the following output:
BreakSVData = {
[{
}] = "value",
["minusInf"] = nil --[[ inf ]],
["nan"] = nil --[[ nan ]],
[function() --[[ inline function body not found ]] end] = "value",
["plusInf"] = nil --[[ inf ]],
}
|
| | http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=186809&p=#post186927 |
Poster: slouken at 7/22/2005 9:55:53 PM PDT Subject: Re: Slouken: 2 SavedVariables corruption issu |
| |
You're welcome. I'm not sure how meaningful indexing a table by another table or by an anonymous function is, but at least it won't crash now.
|
| | http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=186809&p=#post187031 |