-
Notifications
You must be signed in to change notification settings - Fork 91
Segmentation fault #51
Comments
I've just compiled the latest build and it SegFaults at: clearbufbyte (D=D@entry=0x55810fe0, c=123, c@entry=125, a=a@entry=0) at fixedPoint_math.c:20 |
So it fails here. If your build is 64 bit, does it also crash on a 32 bit version? |
The game works perfectly in 32bit. But not 64bit. |
I've done some tracking of the code and found this in Engine/src/unix_compat.h:28
Changing the type from an int32_t to a long helps the game continue but still SegFaults. |
Hmmm. Getting a bit further. If I put a return; at the beginning of the clearview function, the game then SegFaults at dorotatesprite in Engine/src/engine.c:3784 If I put a return; at the beginning of dorotatesprite, the game actually starts playing. Sort of. |
One more fix: In the function clearview, changing the type for variable p to uint8_t* fixes that function. EDIT: The remaining memory pointer problems all seem to be in Engine/src/draw.c (called from dorotatesprite) which is riddled with 32 bit pointers. |
Execution fails on Debian 9.3 64bit. It executes perfectly on Debian 9.3 32bit. Also fails on Ubuntu 17.10 64bit. But it does work on Linux Mint 18.2 64bit. |
@phenest I just made a pull request of fixes for 64-bit. Please try my branch (https://github.com/rohit-n/chocolate_duke3D/tree/build-64bit) and let me know if you have any issues. |
Sorry for necro-ing the issue, but will this be merged as a solution to this issue? |
The text was updated successfully, but these errors were encountered: