View Single Post
11/20/17, 12:18 PM   #10
Uesp
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 15
Couple of references I've found in case anyone else happens to be interested in the technical details of this issue:

From the first link the limit seems to be 2^18 literal constants per source function (i.e., a single saved variable file). So its not nearly as simple as just limiting array sizes to some arbitrary value and would explain why I've run into data corruption issues with relatively small arrays of deeply nested data.

Edit: Also explains why the issue is at load time and not save or run time. At run time a table can have as many elements as memory allows. Saving is fine as you are just serializing the data to a string format. At load time, however, you are converting the string table format to VM byte-code which is where the 2^18 issue lies.

I'm surprised this sort of thing doesn't result in a Lua run time error as the library is pretty good about detecting these.

Last edited by Uesp : 11/20/17 at 12:43 PM. Reason: addt