mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'seg-fault-on-i-error' into 'master'
Generate a backtrace for I_Error; add a crash command See merge request KartKrew/Kart!947
This commit is contained in:
commit
5217650583
2 changed files with 12 additions and 2 deletions
10
src/d_main.c
10
src/d_main.c
|
|
@ -1181,6 +1181,13 @@ static void Command_assert(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef DEVELOP
|
||||||
|
static void Command_crash(void)
|
||||||
|
{
|
||||||
|
I_Error("The game crashed on PURPOSE, because of the 'crash' command. (This is only enabled in DEVELOP builds.)");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// D_SRB2Main
|
// D_SRB2Main
|
||||||
//
|
//
|
||||||
|
|
@ -1373,6 +1380,9 @@ void D_SRB2Main(void)
|
||||||
COM_Init();
|
COM_Init();
|
||||||
|
|
||||||
COM_AddCommand("assert", Command_assert);
|
COM_AddCommand("assert", Command_assert);
|
||||||
|
#ifdef DEVELOP
|
||||||
|
COM_AddCommand("crash", Command_crash);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef TESTERS
|
#ifndef TESTERS
|
||||||
// add any files specified on the command line with -file wadfile
|
// add any files specified on the command line with -file wadfile
|
||||||
|
|
|
||||||
|
|
@ -1891,8 +1891,8 @@ void I_Error(const char *error, ...)
|
||||||
|
|
||||||
W_Shutdown();
|
W_Shutdown();
|
||||||
|
|
||||||
#if defined (PARANOIA) && defined (__CYGWIN__)
|
#if defined (PARANOIA) || defined (DEVELOP)
|
||||||
*(INT32 *)2 = 4; //Alam: Debug!
|
*(INT32 *)0 = 4; //Alam: Debug!
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
exit(-1);
|
exit(-1);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue