neuromancer
Spaceman
Actually, 0.0.11 had a small regression with the pointer, so I pushed another release: https://github.com/neuromancer/wc2-re/releases/tag/v0.0.12
Warning [D:\Rnd\Prj\ix\Src\Streamer\streamer.cpp - 142]:
Failed to open stream file.Warning [D:\Rnd\Prj\ix\Src\Streamer\streamer.cpp - 286]:
Stream has no audioWarning [D:\Rnd\Prj\ix\Src\Streamer\streamer.cpp - 295]:
Stream has no audioWarning [D:\Rnd\Prj\ix\Src\Streamer\streamer.cpp - 342]:
Stream has no audioWarning [D:\Rnd\Prj\ix\Src\Streamer\streamer.cpp - 286]:
Stream has no audioWarning [D:\Rnd\Prj\ix\Src\Streamer\streamer.cpp - 295]:
Stream has no audioWarning [D:\Rnd\Prj\ix\Src\Streamer\streamer.cpp - 142]:
@wcnut Thanks a lot for your report. If you can compiler your own binary, please test this revision:
https://github.com/neuromancer/wc2-re/commit/f87703faca2c3fc7082c02beb695b43e0d7f7e49
Otherwise, you can wait a few days until the next release.
Experimental enhanced rendering enabled (GL sharp bilinear).
reg not cheating
Original orchestral intro music enabled.
Loading WING COMMANDER 2. Please wait...
Expanded Memory Detected.
Speech Enabled.
Expanded Memory fully used.
MEM: Unknown memory lost (0x7c61a7824c90)
MEM: Unknown memory lost (0x7c61a7825b90)
MEM: Unknown memory lost (0x7c61a7827210)
MEM: Unknown memory lost (0x7c31a7305f40)
src/screen.c:24:46: runtime error: index 8 out of bounds for type 'MissionObjective [8]'
src/screen.c:23:27: runtime error: load of address 0x000001670b35 with insufficient space for an object of type 'short int'
0x000001670b35: note: pointer points here
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
^
=================================================================
==2627061==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000001670b35 at pc 0x0000006212c4 bp 0x7ffff203ef20 sp 0x7ffff203ef18
READ of size 2 at 0x000001670b35 thread T0
#0 0x0000006212c3 in cleanup_objectives (/home/wcnut/Downloads/wc2-re-v0.0.13-linux-x86_64-sdl2/wc2-modern-gui+0x6212c3) (BuildId: 8409840c99ddb1ff6b7ab06f3c256a8943f25252)
#1 0x000000622e84 in request (/home/wcnut/Downloads/wc2-re-v0.0.13-linux-x86_64-sdl2/wc2-modern-gui+0x622e84) (BuildId: 8409840c99ddb1ff6b7ab06f3c256a8943f25252)
#2 0x00000062b179 in Chosen_communicate_option (/home/wcnut/Downloads/wc2-re-v0.0.13-linux-x86_64-sdl2/wc2-modern-gui+0x62b179) (BuildId: 8409840c99ddb1ff6b7ab06f3c256a8943f25252)
#3 0x00000058fdc5 in HandleSpaceFlightControls (/home/wcnut/Downloads/wc2-re-v0.0.13-linux-x86_64-sdl2/wc2-modern-gui+0x58fdc5) (BuildId: 8409840c99ddb1ff6b7ab06f3c256a8943f25252)
#4 0x000000595b8c in RunSpaceFlight (/home/wcnut/Downloads/wc2-re-v0.0.13-linux-x86_64-sdl2/wc2-modern-gui+0x595b8c) (BuildId: 8409840c99ddb1ff6b7ab06f3c256a8943f25252)
#5 0x0000004df9c6 in RunCampaignGameLoop (/home/wcnut/Downloads/wc2-re-v0.0.13-linux-x86_64-sdl2/wc2-modern-gui+0x4df9c6) (BuildId: 8409840c99ddb1ff6b7ab06f3c256a8943f25252)
#6 0x0000005df724 in RunGameApplication (/home/wcnut/Downloads/wc2-re-v0.0.13-linux-x86_64-sdl2/wc2-modern-gui+0x5df724) (BuildId: 8409840c99ddb1ff6b7ab06f3c256a8943f25252)
#7 0x000000449408 in SdlRunGameApplication (/home/wcnut/Downloads/wc2-re-v0.0.13-linux-x86_64-sdl2/wc2-modern-gui+0x449408) (BuildId: 8409840c99ddb1ff6b7ab06f3c256a8943f25252)
#8 0x000000447240 in main (/home/wcnut/Downloads/wc2-re-v0.0.13-linux-x86_64-sdl2/wc2-modern-gui+0x447240) (BuildId: 8409840c99ddb1ff6b7ab06f3c256a8943f25252)
#9 0x7f11a8ef3680 in __libc_start_call_main (/lib64/libc.so.6+0x3680) (BuildId: 5bd941be836f538fe5e10eff508f7f5dd94905a6)
#10 0x7f11a8ef3797 in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x3797) (BuildId: 5bd941be836f538fe5e10eff508f7f5dd94905a6)
#11 0x0000004486a4 in _start (/home/wcnut/Downloads/wc2-re-v0.0.13-linux-x86_64-sdl2/wc2-modern-gui+0x4486a4) (BuildId: 8409840c99ddb1ff6b7ab06f3c256a8943f25252)
0x000001670b35 is located 43 bytes before global variable 'g_abFlightPath_004932a0' defined in 'src/globals.c:393:13' (0x000001670b60) of size 9
0x000001670b35 is located 5 bytes after global variable 'g_aMissionObjectives_004932a8' defined in 'src/globals.c:397:18' (0x000001670a00) of size 304
SUMMARY: AddressSanitizer: global-buffer-overflow (/home/wcnut/Downloads/wc2-re-v0.0.13-linux-x86_64-sdl2/wc2-modern-gui+0x6212c3) (BuildId: 8409840c99ddb1ff6b7ab06f3c256a8943f25252) in cleanup_objectives
Shadow bytes around the buggy address:
0x000001670880: f9 f9 f9 f9 02 f9 f9 f9 f9 f9 f9 f9 02 f9 f9 f9
0x000001670900: f9 f9 f9 f9 00 00 00 00 00 00 00 00 00 00 00 00
0x000001670980: 00 00 00 00 00 00 00 00 00 00 00 06 f9 f9 f9 f9
0x000001670a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x000001670a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x000001670b00: 00 00 00 00 00 00[f9]f9 f9 f9 f9 f9 00 01 f9 f9
0x000001670b80: f9 f9 f9 f9 01 f9 f9 f9 f9 f9 f9 f9 01 f9 f9 f9
0x000001670c00: f9 f9 f9 f9 00 00 04 f9 f9 f9 f9 f9 00 00 00 00
0x000001670c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 04 f9 f9
0x000001670d00: f9 f9 f9 f9 01 f9 f9 f9 f9 f9 f9 f9 02 f9 f9 f9
0x000001670d80: f9 f9 f9 f9 02 f9 f9 f9 f9 f9 f9 f9 02 f9 f9 f9
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==2627061==ABORTING
Try enabling the "balanced difficulty" option, which should reduce the to half-size the asteroid collision radii.I’d love to help by providing feedback on the playthrough... but I keep dying in the asteroid field during the very first mission, haha 😜
anyway - a good work