Auctionator

Auctionator

136M Downloads

"Interface\FrameXML\Bindings.xml:1 constant table overflow": Auctionator.lua in "SavedVariables" gets emptied

Ahfau77 opened this issue ยท 4 comments

commented

Please include as much of the following information as possible to help me fix the bug:

Are you on the retail or the classic version of WoW?

retail (10.0.2.47213) with Auctionator 10.0.27

Is this a bug or a feature request?

bug

Bug:

Brief Description of Bug

If WTF\Account\<ACCOUNT>\SavedVariables\Auctionator.lua grows big, then it gets emptied and all data is lost, Auctionator.lua.bak had 55461374b at this moment.

Steps to Reproduce

gather enough data through scans with multiple chars on different realms.

Back Trace (LUA Error Output)

"Interface\FrameXML\Bindings.xml:1 constant table overflow" when opening the auction house.

commented

Do you use the price histories and tooltip information from Auctionator? If not running /atr nopricedb will fix the issue.

You can also follow the instructions in #1210 to reduce the number of prices stored if you want to preserve the tooltip prices.

commented

I use hostories and tooltip information.
I will try out the appropriate settings regarding "price_history_days" and "auctions_history_length" for my 10 AH-chars (with daily scans) to prevent the overflow in the future.

Thanks a lot for the information about these settings for the history-lengths.
Is it possible that you implement these settings/values in the acutionator-options ?

commented

"constant table overflow" is limitation of per-chunk Lua parser, you can hold as much data as you want in memory, but when it written to SavedVariables and then read back through standard interpreter parsers stops at reading specific number of unique consnat. While writing .lua files by hand people usually solve it by splitting constants into different chunks like small IIFE, but unfortunately you can't do that in WoW since it does not gives you any control of writing SavedVariables.

Good ol' Auctioneer had same problem and they've solved it by seriliaizing data and packing them into small amount of large strings.

I.e. data structure like

		["166815"] = {
			["a"] = {
				[1281] = 7,
			},
			["l"] = {
			},
			["m"] = 109763700,
			["h"] = {
				[1281] = 109763700,
			},
		},

was replaced with

["166815"]='{["a"]={[1281]=7,},["l"]={},["m"]=109763700,["h"]={[1281]=109763700}}',

(note quotes around value)
You can further reduce number of unique constants by writing several entries together to same string.
You'd need to unpack them back on VARIABLES_LOADED, naturally.

If you don't want spend time inventing your own serialization/deserialization you can get any open source Lua-to-string library or even JSON encoder/decoder, since all SV data is plain and thus compatible with it.

commented

The latest alpha version of Auctionator now includes a fix for this issue.