BUG (AGS v2.7): Large struct (FIXED)

Started by monkey0506, Sun 05/02/2006 18:11:11

Previous topic - Next topic

monkey0506

I'm working on the next version of the QueuedSpeech module, and I was trying to test it on 2.7, but every time I tried saving, it crashed the game with the following error:

QuoteWe're sorry, the AGS editor has encountered a serious error and must shut down.  You will have lost any changes made since you last saved your game.

(Exception 0x00000000 at EIP=0x00000000, AGSEDIT v2.70.599, SIP=26)

Please note down the numbers above, and what you were doing when this error occured.  If it happens repeatedly, please inform CJ of this error by visiting the AGS Technical forum and providing any information that you can.

Ctrl+C didn't work, so i had to type that out, but it is verbatim.

By commenting out the entire module script, then uncommenting small blocks and saving, I was able to narrow it down to the exact line that is crashing the editor:

Code: ags
QueuedSpeech_MessageType QueuedSpeech_Buffer;


QueuedSpeech_MessageType is a struct defined as:

Code: ags
struct QueuedSpeech_MessageType {
  char Text[QUEUEDSPEECH_STR_LEN]; // _STR_LEN = 20000
  }


I've encountered a similar problem before, and the solution provided was this:

Code: ags
QueuedSpeech_MessageType QueuedSpeech_Buffer[1];


Making an array with one item out of the struct.  Now, I wouldn't be reporting this, except I was curious...has this been fixed?  (I would look at the change logs, but I wouldn't be sure what to look for)

Pumaman

How about this?

Quote- Fixed compiler crash when declaring a large struct.

:P

monkey0506

Okay, yeah, I guess that works.  I remember reading it before...I just forgot.

SMF spam blocked by CleanTalk