Chimera
Your best friend
So I ran an EXE mod of SRB2, after compiling, and what happens is it sigsevs before it even goes to the main menu (or the "Sonic Team Junior Presents;" it sigsevs on Baby Sonic). So I run the debugger and I get this:
Apparently it died on loading soar.dta, but I dunno where to go to fix that. So I go to the error log and I get this:
Being relatively new to SRB2 EXE modding, I'm not sure how this happened exactly, nor what file in the source code caused the crash. If anyone here can help, that'd be appreciated.
EDIT: oh yeah, this was in the build log after the debug crashed.
EDIT2: I reacently descovered that the problems may have been caused by the warnings recieved in the compiling. Here they are:
yes, I'm making a mod with some of JTE's stuff in it. Don't sue me because I'm not giving this to the public unless JTE says it's okay ;P
Anyway, here are the lines the 5 errors are at (lines that had the error itself bolded and underlined, different areas of code seperated from double-enter):
Code:
Hello, it's me, SRB2's Console Window
Old STD_INPUT_HANDLE: 00000003
New STD_INPUT_HANDLE: 0000000F
Old STD_OUTPUT_HANDLE: 00000007
New STD_OUTPUT_HANDLE: 00000013
Old STD_ERROR_HANDLE: 0000000B
New STD_ERROR_HANDLE: 00000013
Myargc: 1
myargv[0] : 'C:\svn\SOURCECODE\SRB2\trunk\bin\Mingw\Debug\srb2win.exe'
I_StartupSystem() ...
D_SRB2Main() ...
SRB2 v2.0.6
Z_Init: Init zone memory allocation daemon.
system memory 2046MB free 1367MB
W_Init: Init WADfiles.
I_StartupTimer...
Added file C:\svn\SOURCECODE\SRB2\trunk\bin\Resources\srb2.wad (5421 lumps)
Loading main config from C:\svn\SOURCECODE\SRB2\trunk\bin\Resources\srb2.wad
Added file C:\svn\SOURCECODE\SRB2\trunk\bin\Resources\zones.dta (907 lumps)
Loading main config from C:\svn\SOURCECODE\SRB2\trunk\bin\Resources\zones.dta
Added file C:\svn\SOURCECODE\SRB2\trunk\bin\Resources\sonic.plr (185 lumps)
Added file C:\svn\SOURCECODE\SRB2\trunk\bin\Resources\tails.plr (175 lumps)
Added file C:\svn\SOURCECODE\SRB2\trunk\bin\Resources\knux.plr (171 lumps)
Added file C:\svn\SOURCECODE\SRB2\trunk\bin\Resources\rings.wpn (212 lumps)
Added file C:\svn\SOURCECODE\SRB2\trunk\bin\Resources\drill.dta (182 lumps)
Added file C:\svn\SOURCECODE\SRB2\trunk\bin\Resources\soar.dta (92 lumps)
Added file C:\svn\SOURCECODE\SRB2\trunk\bin\Resources\music.dta (166 lumps)
===========================================================================
We hope you enjoy this game as
much as we did making it!
...wait. =P
===========================================================================
I_StartupGraphics...
mode 320 x 200 x 8 bpp
mode 320 x 200 x 16 bpp
mode 320 x 200 x 32 bpp
mode 320 x 240 x 8 bpp
mode 320 x 240 x 16 bpp
mode 320 x 240 x 32 bpp
mode 400 x 300 x 8 bpp
mode 400 x 300 x 16 bpp
mode 400 x 300 x 32 bpp
mode 512 x 384 x 8 bpp
mode 512 x 384 x 16 bpp
mode 512 x 384 x 32 bpp
mode 640 x 400 x 8 bpp
mode 640 x 400 x 16 bpp
mode 640 x 400 x 32 bpp
mode 640 x 480 x 8 bpp
mode 640 x 480 x 16 bpp
mode 640 x 480 x 32 bpp
mode 800 x 600 x 8 bpp
mode 800 x 600 x 16 bpp
mode 800 x 600 x 32 bpp
mode 1024 x 768 x 8 bpp
mode 1024 x 768 x 16 bpp
mode 1024 x 768 x 32 bpp
#00: 320x200x1bpp (desc: '320x200W')
#01: 320x200x1bpp (desc: '320x200')
#02: 320x240x1bpp (desc: '320x240')
#03: 400x300x1bpp (desc: '400x300')
#04: 512x384x1bpp (desc: '512x384')
#05: 640x400x1bpp (desc: '640x400')
#06: 640x480x1bpp (desc: '640x480')
#07: 800x600x1bpp (desc: '800x600')
#08: 1024x768x1bpp (desc: '1024x768')
VID_SetMode(0)
Mode changed to 0 (320x200W)
CPU Info: 486: 1, 586: 1, MMX: 1, 3DNow: 0, MMXExt: 0, SSE2: 1
HU_Init: Setting up heads up display.
Number of console HUD lines is now 5
executing config.cfg
Default resolution: 320 x 200 (8 bits)
M_Init: Init miscellaneous info.
R_Init: Init SRB2 refresh daemon -
InitTextures...
InitSprites...
220 sprites added from file C:\svn\SOURCECODE\SRB2\trunk\bin\Resources\srb2.wad
221 sprites added from file C:\svn\SOURCECODE\SRB2\trunk\bin\Resources\sonic.plr
227 sprites added from file C:\svn\SOURCECODE\SRB2\trunk\bin\Resources\rings.wpn
228 sprites added from file C:\svn\SOURCECODE\SRB2\trunk\bin\Resources\drill.dta
229 sprites added from file C:\svn\SOURCECODE\SRB2\trunk\bin\Resources\soar.dta
Apparently it died on loading soar.dta, but I dunno where to go to fix that. So I go to the error log and I get this:
Code:
SRB2 v2.0.6 -ERROR LOG-
srb2win caused an Access Violation in module srb2win.exe at 001b:0050a308.
Exception handler called in main thread.
Error occurred at 8/12/2010 13:26:00.
C:\svn\SOURCECODE\SRB2\trunk\bin\Mingw\Debug\srb2win.exe, run by *****.
1 processor(s), type 586 6.2309.
Program Memory from 0x00010000 to 0x7FFEFFFF
2047 MBytes physical memory.
Write to location 000000a0 caused an access violation.
Registers:
EAX=000000a0 CS=001b EIP=0050a308 EFLGS=00010283
EBX=000000af SS=0023 ESP=0022fb98 EBP=0022fba8
ECX=00000000 DS=0023 ESI=00000001 FS=003b
EDX=ffffffd0 ES=0023 EDI=00000004 GS=0000
Command Line parameters: Bytes at CS : EIP:
88 ?? 10 ?? a1 ?? b4 ?? 3a ?? aa ?? 00 ?? 8b ?? 55 ?? fc ?? 81 ?? c2 ?? 00 ?? 01 ?? 00 ?? 00 ??
Stack dump:
0022fb98: 00b1bf3f 00c1be95 00001c00 000000a0 0022fbd8 0051cdfe 000000a0 00000000
0022fbb8: 000001a8 000001d3 000001fe 00000229 0107d010 00000000 000000af 00000001
0022fbd8: 0022fc68 0051f5a7 0107d034 00b1bfc0 00000003 00000001 000000af 00000004
0022fbf8: 00b1bf38 7ffffffc 00b1bf36 00000042 0179dae8 00000003 0000000a 0107d034
0022fc18: a022fc48 005234db 0022fc37 01a5877e 01a58688 000000fa 01a58580 00013036
0022fc38: 4e4f5354 00004349 00020008 002423d3 00000000 00afcdb3 00b1bef9 00000000
0022fc58: 00000000 002423d3 0000000a 05820005 0022fc98 005178a4 00000003 00000001
0022fc78: 00000000 00000000 00020000 00000001 00000000 00000003 00000000 0040f950
0022fc98: 0022fcb8 00509872 00660789 006646c0 00000000 00000020 00000140 000000c8
0022fcb8: 0022fcd8 0050e90b 00647160 ffffffff 0000040a 0022fce4 006646c0 0040f950
0022fcd8: 0022fe58 0041b475 0064bea4 00652a30 0064bfda 000003e8 00000000 00000000
0022fcf8: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
0022fd18: 7c912cce 7c912d04 7c912d71 7c912d78 00000006 00341ec0 00000006 00000000
0022fd38: 0022fd28 00000000 0022fd98 7c90e920 7c912d80 ffffffff 7c912d78 7c80b55e
0022fd58: 00000001 0774003b 7c80b50e 00000500 00000300 0076a788 00341ec0 00341e9c
0022fd78: 7ffdf000 00341ec0 696e6f53 6f522063 42206f62 7473616c 00003220 00000001
0022fd98: 0022ffe0 7c839ad8 7c80b4d0 ffffffff 7c80b50e 72296f03 00400000 0022fdc4
0022fdb8: 00000003 00000500 72296f68 003a0043 7228005c 0000acb7 4120fde8 31206775
0022fdd8: 30322032 20203031 20202020 20202020 20202020 20202020 6e6f5320 52206369
0022fdf8: 206f626f 73616c42 20322074 20202020 20202020 20202020 20202020 20202020
0022fe18: 3a333120 333a3532 72002039 00000000 0022fe58 00546bfd 00000000 00000500
0022fe38: 0076a788 00000008 00667f74 00000000 00000001 0022fe64 7229fadc 0040f950
0022fe58: 0022fe98 00538a61 006682c1 00720da0 0076a201 00000000 00000002 00000080
0022fe78: 00000000 0022fe98 7c801da8 0066830d 00242398 00000001 0000000a 00000cb6
0022fe98: 0022fec8 00538ae1 00400000 7c813133 77c2c024 01070000 0022fe94 77c2c02d
0022feb8: 7c813133 ffffffff 7c812fc8 ffffffff 0022ff48 0056cd56 00400000 00000000
0022fed8: 002423d3 0000000a 0022ff1c 77c35c94 77c3a52e 00000044 00243fe8 00244200
0022fef8: 00244218 00000000 00000000 00000000 00000000 00000000 00000000 00000000
0022ff18: 00000000 00000000 00000000 ffffffff ffffffff ffffffff 77c34e42 0056cbd0
0022ff38: 0022ff58 0022ff60 7ffd4000 20657c3b 0022ffa0 004010db 7ffd4000 20657c3b
0022ff58: 0022ffa0 004010db 00000001 01072518 01072b30 00673004 0022ff94 ffffffff
0022ff78: 0022ff90 89032fe0 00001fe0 8930d000 e2f7d000 e2f1e7f8 00000000 01072b30
0022ff98: 00000000 7ffd4000 0022ffc0 00401158 00000002 8a6a8074 7c90dcba 7c817074
0022ffb8: fffffffe 00000009 0022fff0 7c817077 05820005 20657c3b 7ffd4000 c0000005
0022ffd8: 0022ffc8 0022f7bc ffffffff 7c839ad8 7c817080 00000000 00000000 00000000
0022fff8: 00401140 00000000
Exception encountered during stack dump.
Module list: names, addresses, sizes, time stamps and file times:
C:\svn\SOURCECODE\SRB2\trunk\bin\Mingw\Debug\srb2win.exe, loaded at 0x00400000 - 2827802 bytes - 4c6458c9 - file date is 8/12/2010 13:25:48
C:\WINDOWS\system32\uxtheme.dll, loaded at 0x5ad70000 - 218624 bytes - 4802a11e - file date is 4/13/2008 17:12:08
C:\WINDOWS\system32\LPK.DLL, loaded at 0x629c0000 - 22016 bytes - 4802a0e5 - file date is 4/13/2008 17:11:56
C:\WINDOWS\system32\SynTPFcs.dll, loaded at 0x63000000 - 65536 bytes - 3e387c7e - file date is 1/29/2003 17:14:40
C:\WINDOWS\system32\HID.DLL, loaded at 0x688f0000 - 20992 bytes - 4802a0c5 - file date is 4/13/2008 17:11:54
C:\WINDOWS\system32\WS2HELP.dll, loaded at 0x71aa0000 - 19968 bytes - 4802a164 - file date is 4/13/2008 17:12:10
C:\WINDOWS\system32\WS2_32.dll, loaded at 0x71ab0000 - 82432 bytes - 4802a163 - file date is 4/13/2008 17:12:10
C:\WINDOWS\system32\WSOCK32.DLL, loaded at 0x71ad0000 - 22528 bytes - 4802a170 - file date is 4/13/2008 17:12:10
C:\WINDOWS\system32\DINPUT.DLL, loaded at 0x72280000 - 158720 bytes - 4802a0cb - file date is 4/13/2008 17:11:52
C:\WINDOWS\system32\DDRAW.DLL, loaded at 0x73760000 - 279552 bytes - 4802a0b8 - file date is 4/13/2008 17:11:52
C:\WINDOWS\system32\DCIMAN32.dll, loaded at 0x73bc0000 - 8704 bytes - 4802a0b7 - file date is 4/13/2008 17:11:52
C:\WINDOWS\system32\MSCTF.dll, loaded at 0x74720000 - 297984 bytes - 4802a12c - file date is 4/13/2008 17:11:58
C:\WINDOWS\system32\USP10.dll, loaded at 0x74d90000 - 406016 bytes - 4802a11d - file date is 4/13/2008 17:12:08
C:\WINDOWS\system32\msctfime.ime, loaded at 0x755c0000 - 177152 bytes - 4802a12d - file date is 4/13/2008 17:10:06
C:\WINDOWS\system32\IMM32.DLL, loaded at 0x76390000 - 110080 bytes - 4802a0e7 - file date is 4/13/2008 17:11:54
C:\WINDOWS\system32\WINMM.DLL, loaded at 0x76b40000 - 176128 bytes - 4802a13c - file date is 4/13/2008 17:12:10
C:\WINDOWS\system32\WINTRUST.dll, loaded at 0x76c30000 - 177664 bytes - 4b33115c - file date is 12/23/2009 23:59:40
C:\WINDOWS\system32\IMAGEHLP.dll, loaded at 0x76c90000 - 144384 bytes - 4802a0d8 - file date is 4/13/2008 17:11:54
C:\WINDOWS\system32\ole32.dll, loaded at 0x774e0000 - 1287168 bytes - 4802a111 - file date is 4/13/2008 17:12:02
C:\WINDOWS\system32\SETUPAPI.DLL, loaded at 0x77920000 - 985088 bytes - 4802a10b - file date is 4/14/2008 05:42:06
C:\WINDOWS\system32\CRYPT32.dll, loaded at 0x77a80000 - 599040 bytes - 4802a0d7 - file date is 4/13/2008 17:11:52
C:\WINDOWS\system32\MSASN1.dll, loaded at 0x77b20000 - 58880 bytes - 4aa180a8 - file date is 9/4/2009 14:03:36
C:\WINDOWS\system32\VERSION.dll, loaded at 0x77c00000 - 18944 bytes - 4802a11d - file date is 4/13/2008 17:12:08
C:\WINDOWS\system32\msvcrt.dll, loaded at 0x77c10000 - 343040 bytes - 4802a188 - file date is 4/13/2008 17:12:02
C:\WINDOWS\system32\ADVAPI32.DLL, loaded at 0x77dd0000 - 617472 bytes - 49901d48 - file date is 2/9/2009 05:10:48
C:\WINDOWS\system32\RPCRT4.dll, loaded at 0x77e70000 - 585216 bytes - 49e5f46d - file date is 4/15/2009 07:51:26
C:\WINDOWS\system32\GDI32.dll, loaded at 0x77f10000 - 286720 bytes - 49006fbe - file date is 10/23/2008 05:36:14
C:\WINDOWS\system32\Secur32.dll, loaded at 0x77fe0000 - 56832 bytes - 4a433476 - file date is 6/25/2009 01:25:26
C:\WINDOWS\system32\kernel32.dll, loaded at 0x7c800000 - 989696 bytes - 49c4f482 - file date is 3/21/2009 07:06:58
C:\WINDOWS\system32\ntdll.dll, loaded at 0x7c900000 - 714752 bytes - 49901d48 - file date is 2/9/2009 05:10:48
C:\WINDOWS\system32\USER32.dll, loaded at 0x7e410000 - 578560 bytes - 4802a11b - file date is 4/13/2008 17:12:08
Being relatively new to SRB2 EXE modding, I'm not sure how this happened exactly, nor what file in the source code caused the crash. If anyone here can help, that'd be appreciated.
EDIT: oh yeah, this was in the build log after the debug crashed.
Code:
[B][SIZE=1][SIZE=1]Process terminated with status -1073741819 (0 minutes, 8 seconds)[/SIZE][/SIZE][/B]
EDIT2: I reacently descovered that the problems may have been caused by the warnings recieved in the compiling. Here they are:
Code:
||=== Sonic Robo Blast 2, Release Mingw/DirectX ===|
C:\svn\SOURCECODE\SRB2\trunk\src\JTE\SPM_Player.c||In function 'SPM_PlayerAbility':|
C:\svn\SOURCECODE\SRB2\trunk\src\JTE\SPM_Player.c|130|warning: suggest parentheses around '&&' within '||'|
C:\svn\SOURCECODE\SRB2\trunk\src\JTE\SPM_Player.c|180|warning: suggest parentheses around '&&' within '||'|
C:\svn\SOURCECODE\SRB2\trunk\src\p_inter.c||In function 'P_TouchSpecialThing':|
C:\svn\SOURCECODE\SRB2\trunk\src\p_inter.c|275|warning: suggest parentheses around '&&' within '||'|
C:\svn\SOURCECODE\SRB2\trunk\src\p_user.c||In function 'P_PlayerThink':|
C:\svn\SOURCECODE\SRB2\trunk\src\p_user.c|9748|warning: suggest parentheses around '&&' within '||'|
C:\svn\SOURCECODE\SRB2\trunk\src\r_things.c||In function 'SetPlayerSkinByNum':|
C:\svn\SOURCECODE\SRB2\trunk\src\r_things.c|2473|warning: initialization from incompatible pointer type|
||=== Build finished: 0 errors, 5 warnings ===|
yes, I'm making a mod with some of JTE's stuff in it. Don't sue me because I'm not giving this to the public unless JTE says it's okay ;P
Anyway, here are the lines the 5 errors are at (lines that had the error itself bolded and underlined, different areas of code seperated from double-enter):
Code:
if ((player->pflags & PF_JUMPED)
|| ((!(player->pflags & PF_THOKKED) || (player->charability2 == CA2_MULTIABILITY)
&& cmd->buttons & BT_USE // Holding spindash so it's not a normal thok
&& ((gametype == GT_COOP && emeralds) // Player has a Chaos Emerald
|| gametype != GT_COOP) // or can't get one
[B][U] && player->health > 20))) // Player has at least 20 rings, regardless[/U][/B]
if ((player->pflags & PF_JUMPED) && cmd->buttons & BT_USE
&& (!(player->pflags & PF_THOKKED) || (player->charability2 == CA2_MULTIABILITY)
[U] [B] && player->health > 20))[/B][/U]
#ifdef SPMOVES
&& (!(toucher->player->charflags & SF_AMYDASH)
|| (toucher->state-states == S_PLAY_RUN1 || toucher->state-states == S_PLAY_RUN2))
#endif
[U] [B]|| toucher->player->powers[pw_invulnerability] || toucher->player->powers[pw_super][/B][/U]
#ifdef SPMOVES
|| !(player->charflags & SF_AMYDASH) // Amy jumps weirdly.
#endif
[U] [B]&& player->charability2 == CA2_SPINDASH)[/B][/U]
// These two variables make things a whole lot simpler, dun they?
const USHORT spmoves = skins[skinnum].spmoves;
[B][U] ULONG *charflags = &players[playernum].charflags;[/U][/B]
Last edited: