Table Overflow

Started by (deleted), Fri 03/07/2009 09:17:02

Previous topic - Next topic

(deleted)

Mid-way through a productive work session on a project that is [quite painfully] near completion, I encountered a hitch when attempting to compile a build for beta test purposes.

"Internal compiler error: table overflow"

This error is perhaps related to the difficulties explored in the following thread:
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=34580.0

However - it differs in these ways.
I'm using AGS 3.1.2 (Wasn't there a fix in 3.0.1 that addressed a table overflow in the Global Script? Is this related?)

Also, the last word on this error was from CJ himself, advising

Quote
"to create a script module and move some of your code into that,"

which I was quick to do. Still,  the error persists.

All of the global variables are implemented using the Global Variables Pane, and they number about 500-600. Am I pushing it?

Many other local variable symbols are used liberally throughout the code, but in ways that I've assumed are safe.

//==== Bottom Line: ===== //
1. Is there a concrete limit on variable symbols in AGS? If so - I don't think I'd be even coming close to it, without faulty scripting.

2. What manner of faulty scripting could cause a "Table Overflow" anyway?

2. Oh my god help. This project is almost done - if I have to bin the project, I'm disappearing into the woods forever.

Gilbert

I think only CJ is eligible to answer this question, but since it's currently Mittens time, you may need to wait a few more days before getting an official and possibly workable solution/workaround.

As CJ mentioned in that other thread, one main cause of this error was the use of too many symbols. So, if possible, you may check whether all the 500-600 global variables are necessary and try to reduce their number. Also, if some of them are not really needed globally try putting them in room scripts instead.

Also, as you said moving some of the codes won't work, did you move also some of the variable declarations there? If some of the global variables aren't really needed to be accessible by other parts of the script (and in the rooms) and are required for internal use only by functions already moved to the modules it's logical to move these declarations there.

Pumaman

Hmm, it looks like this may be related to a script compiler limitation of 2500 imported functions/variables in a script (this would include any Global Variables). I will increase or remove this limit for the next version of AGS.

(deleted)

#3
Thanks Chris!

In the case of this project, 2500 functions/variables aren't truly necessitated - It's just inefficiently scripted.

However, it sure helps knowing decisively that functions are included in this limit. Eliminating/combining functions will be easier at this stage than doing so with variables.

Now, to the operating room with a scalpel.

Edit:
After much consolidation, things are operating correctly, now. Adding a single global function or variable will evoke the overflow error.

Perhaps it's worth noting that, during the process of trimming away the fat, it became apparent that removing or consolidating any GUI / Character / Inventory functions did not affect the overflow. Only removing "user defined" functions/variables did the trick.

(For example, defining the functions of several "Close Window" buttons under a single comprehensive function effectively removed twenty of the old functions - but the error didn't budge. Only by simplifying the imported materials can this limit be complied with. ...but, of course, CJ had already made that clear in his reply.)

SMF spam blocked by CleanTalk