Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Segmentation fault' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Segmentation fault
Authored by: Oddjob3x on Mar 21, '03 04:15:52AM


The crash log seems to point to the close_script routine in fileio.c:

Thread 0 Crashed:
#0 0x000041b8 in close_script
#1 0x00002548 in main
#2 0x000022bc in _start (crt.c:267)
#3 0x0000213c in start

Added some test logs in the function, and seemed to have pinpointed the following line as causing the problem:

set_word( H_FLAGS, get_word( H_FLAGS ) & ( ~SCRIPTING_FLAG ) );

Anyone who knows a bit more about this (not difficult!) able to shed some light? I'll have a play with it for a while.


[ Reply to This | # ]
Segmentation fault ... workaround
Authored by: Oddjob3x on Mar 21, '03 07:23:13AM

Actually, you could just comment out the offending bit of code and then recompile it - in fileio.c, find the close_script function and then copy/paste the following in the appropriate spot:

/* Set the scripting flag in the game file flags */
if ( scripting == OFF )
set_word( H_FLAGS, get_word( H_FLAGS ) & ( ~SCRIPTING_FLAG ) );
set_word( H_FLAGS, get_word( H_FLAGS ) | SCRIPTING_FLAG );
} */
} /* close_script */

(added the /* SKIP THIS BIT and the closing */)

Gets rid of the seg fault but assumes you're not using scripting ... not elegant I know.

[ Reply to This | # ]