Encountered a strange bug while testing dethrace. I noticed that Ctrl+Q quit shortcut does not behave correctly. It shows a save menu instead of quitting to OS after selecting ok button or hitting enter, also hitting escape shows a broken menu, moving mouse crashes the game.
Screenshots
![Ekrano kopija_2024-07-07_14-38-35](https://github.com/dethrace-labs/dethrace/assets/6626242/71815b79-814a-4ff0-bf91-f48fd7defbf2)
![Ekrano kopija_2024-07-07_14-38-50](https://github.com/dethrace-labs/dethrace/assets/6626242/50eead2e-db60-431a-ba42-7a73bb996432)
![Ekrano kopija_2024-07-07_14-38-59](https://github.com/dethrace-labs/dethrace/assets/6626242/df3cbdfc-e771-4b84-9984-ed8dd8ac6534)
![Ekrano kopija_2024-07-07_14-39-07](https://github.com/dethrace-labs/dethrace/assets/6626242/54173846-d85c-4c0a-8dae-36d62b979650)
Game log
```
Dethrace version: v0.7.1-10-g8751f63
[INFO] Harness_Init DETHRACE_ROOT_DIR is set to '/home/juozas/Games/CARSPLAT/'
Using root directory: /home/juozas/Games/CARSPLAT/
Game mode: Splat Pack
[WARN] S3StopMIDIOutlets stubbed
[WARN] S3StopCDAOutlets stubbed
[INFO] AudioBackend_Init Playback device: 'GK208 HDMI/DP Audio Controller Digital Stereo (HDMI 2)'
******************
Caught SIGSEGV
******************
Stack trace:
0: SaveTransient at /home/juozas/dethrace/src/DETHRACE/common/graphics.c:2442
1: DoMouseCursor at /home/juozas/dethrace/src/DETHRACE/common/graphics.c:2644
2: DoInterfaceScreen at /home/juozas/dethrace/src/DETHRACE/common/intrface.c:372
3: DoMainMenuInterface at /home/juozas/dethrace/src/DETHRACE/common/mainmenu.c:354
4: GetMainMenuOption at /home/juozas/dethrace/src/DETHRACE/common/mainmenu.c:388
5: DoMainMenu at /home/juozas/dethrace/src/DETHRACE/common/mainmenu.c:569
6: DoMainMenuScreen at /home/juozas/dethrace/src/DETHRACE/common/mainmenu.c:635
7: DoProgram at /home/juozas/dethrace/src/DETHRACE/common/structur.c:673
8: GameMain at /home/juozas/dethrace/src/DETHRACE/common/main.c:124
9: original_main at /home/juozas/dethrace/src/DETHRACE/pc-win95/win95sys.c:958
10: main at /home/juozas/dethrace/src/DETHRACE/main.c:49
11: ?? ??:0
12: ?? ??:0
```
Log with gdb output
```
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04.2) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./dethrace...
(gdb) r
Starting program: /home/juozas/dethrace/build/dethrace
This GDB supports auto-downloading debuginfo from the following URLs:
https://debuginfod.ubuntu.com
Enable debuginfod for this session? (y or [n]) y
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Dethrace version: v0.7.1-10-g8751f63
[INFO] Harness_Init DETHRACE_ROOT_DIR is set to '/home/juozas/Games/CARSPLAT/'
Using root directory: /home/juozas/Games/CARSPLAT/
Game mode: Splat Pack
[WARN] S3StopMIDIOutlets stubbed
[WARN] S3StopCDAOutlets stubbed
[New Thread 0x7fffd23ff640 (LWP 30421)]
[New Thread 0x7fffd1bfe640 (LWP 30422)]
[INFO] AudioBackend_Init Playback device: 'GK208 HDMI/DP Audio Controller Digital Stereo (HDMI 2)'
Thread 1 "dethrace" received signal SIGSEGV, Segmentation fault.
SaveTransient (pIndex=1, pX_coord=131, pY_coord=198) at /home/juozas/dethrace/src/DETHRACE/common/graphics.c:2442
2442 gTransient_bitmaps[pIndex].pixmap->height);
```
Gdb backtrace
```
#0 SaveTransient (pIndex=1, pX_coord=131, pY_coord=198) at /home/juozas/dethrace/src/DETHRACE/common/graphics.c:2442
#1 0x00005555555dab86 in DoMouseCursor () at /home/juozas/dethrace/src/DETHRACE/common/graphics.c:2634
#2 0x00005555555e229b in DoInterfaceScreen (pSpec=0x5555558a6420 , pOptions=1, pCurrent_choice=0) at /home/juozas/dethrace/src/DETHRACE/common/intrface.c:372
#3 0x00005555555fae9a in DoMainMenuInterface (pTime_out=30000, pContinue_allowed=0) at /home/juozas/dethrace/src/DETHRACE/common/mainmenu.c:354
#4 0x00005555555faf3f in GetMainMenuOption (pTime_out=30000, pContinue_allowed=0) at /home/juozas/dethrace/src/DETHRACE/common/mainmenu.c:388
#5 0x00005555555fb300 in DoMainMenu (pTime_out=30000, pSave_allowed=0, pContinue_allowed=0) at /home/juozas/dethrace/src/DETHRACE/common/mainmenu.c:569
#6 0x00005555555fb4ec in DoMainMenuScreen (pTime_out=30000, pSave_allowed=0, pContinue_allowed=0) at /home/juozas/dethrace/src/DETHRACE/common/mainmenu.c:635
#7 0x0000555555678563 in DoProgram () at /home/juozas/dethrace/src/DETHRACE/common/structur.c:673
#8 0x00005555555f8863 in GameMain (pArgc=1, pArgv=0x7fffffffe018) at /home/juozas/dethrace/src/DETHRACE/common/main.c:123
#9 0x000055555569be94 in original_main (pArgc=1, pArgv=0x7fffffffe018) at /home/juozas/dethrace/src/DETHRACE/pc-win95/win95sys.c:957
#10 0x00005555555778d8 in main (argc=1, argv=0x7fffffffe018) at /home/juozas/dethrace/src/DETHRACE/main.c:48
```
Full gdb backtrace
```
#0 SaveTransient (pIndex=1, pX_coord=131, pY_coord=198) at /home/juozas/dethrace/src/DETHRACE/common/graphics.c:2442
__FUNCTION__ = "SaveTransient"
#1 0x00005555555dab86 in DoMouseCursor () at /home/juozas/dethrace/src/DETHRACE/common/graphics.c:2634
x_coord = 149
y_coord = 200
mouse_moved = 1
new_required = 3
giblet_index =
cursor_offset = 0
button_is_down = 0
giblet_chance = 1
giblet_count = 0
this_call_time = 9208
last_cursor_change = 9209
last_call_time = 9187
last_required_change = 9208
period = 21
delta_x = 7095
required_cursor = 3
zero_count = 0
button_was_down = 0
#2 0x00005555555e229b in DoInterfaceScreen (pSpec=0x5555558a6420 , pOptions=1, pCurrent_choice=0) at /home/juozas/dethrace/src/DETHRACE/common/intrface.c:372
entry_status = eProg_idling
x_coord = -138873773
y_coord = 32767
mouse_in_somewhere = 0
i = 0
key2 =
mouse_was_started =
last_choice = 8
escaped = 0
timed_out = 0
go_ahead = 0
last_mode =
result = -128
the_key = -1
the_max = 0
mouse_down = 0
new_mouse_down = 21845
last_mouse_down = 0
defeat_mode_change = 0
selection_changed = 0
the_str = "\000\000\000\000\000\000\000\000m_\267\367\377\177\000\000\300g\003\367\377\177\000\000\000\026\320\367\377\177\000\000 \360\367UUU\000\000'\215\266\367\377\177\000\000NETWORK.\360\334\377\377\377\177\000\000\030\340\377\377\377\177\000\000\304\370\\UUU", '\000' , "-", '\000' , " \360\367UUU\000\000/home/juozas/Games/CARSPLAT/DATA/ANIM/CANBUTIN.FLI", '\000' , "\n\030\374\367\377\177\000\000NETWORK.\n\030\374\367\377\177\000\000"...
last_press = 4294967295
last_left_press =
last_right_press =
last_up_press =
last_down_press =
copy_areas = 0x0
old_current_splash = 0x0
pixels_copy =
palette_copy =
__FUNCTION__ = "DoInterfaceScreen"
#3 0x00005555555fae9a in DoMainMenuInterface (pTime_out=30000, pContinue_allowed=0) at /home/juozas/dethrace/src/DETHRACE/common/mainmenu.c:354
flicker_on1 = {{flic_index = 14, x = {64, 128}, y = {37, 89}}, {flic_index = 25, x = {59, 118}, y = {54, 130}}, {flic_index = 27, x = {55, 110}, y = {71, 170}}, {flic_index = 29, x = {52, 104}, y = {88, 211}}, {flic_index = 23, x = {53, 106}, y = {105, 252}}, {flic_index = 21, x = {54, 108}, y = {122, 293}}, {flic_index = 17, x = {58, 116}, y = {139, 334}}, {flic_index = 19, x = {64, 128}, y = {155, 372}}}
flicker_off1 = {{flic_index = 13, x = {64, 128}, y = {37, 89}}, {flic_index = 24, x = {59, 118}, y = {54, 130}}, {flic_index = 26, x = {55, 110}, y = {71, 170}}, {flic_index = 28, x = {52, 104}, y = {88, 211}}, {flic_index = 22, x = {53, 106}, y = {105, 252}}, {flic_index = 20, x = {54, 108}, y = {122, 293}}, {flic_index = 16, x = {58, 116}, y = {139, 334}}, {flic_index = 18, x = {64, 128}, y = {155, 372}}}
push1 = {{flic_index = 15, x = {63, 126}, y = {36, 86}}, {flic_index = 15, x = {58, 116}, y = {53, 127}}, {flic_index = 15, x = {54, 108}, y = {70, 168}}, {flic_index = 15, x = {51, 102}, y = {87, 209}}, {flic_index = 15, x = {52, 104}, y = {104, 250}}, {flic_index = 15, x = {53, 106}, y = {121, 290}}, {flic_index = 15, x = {57, 114}, y = {138, 331}}, {flic_index = 15, x = {63, 126}, y = {154, 370}}}
mouse_areas1 = {{left = {64, 128}, top = {37, 89}, right = {265, 530}, bottom = {47, 113}, new_choice = 0, new_mode = 0, available_when_typing = 0, mouse_click = 0x0}, {left = {59, 118}, top = {54, 130}, right = {265, 530}, bottom = {64, 154}, new_choice = 1, new_mode = 0, available_when_typing = 0, mouse_click = 0x0}, {left = {55, 110}, top = {71, 170}, right = {265, 530}, bottom = {81, 194}, new_choice = 2, new_mode = 0, available_when_typing = 0, mouse_click = 0x0}, {left = {52, 104}, top = {88, 211}, right = {265, 530}, bottom = {98, 235}, new_choice = 3, new_mode = 0, available_when_typing = 0, mouse_click = 0x0}, {left = {53, 106}, top = {105, 252}, right = {265, 530}, bottom = {115, 276}, new_choice = 4, new_mode = 0, available_when_typing = 0, mouse_click = 0x0}, {left = {54, 108}, top = {122, 293}, right = {265, 530}, bottom = {132, 317}, new_choice = 5, new_mode = 0, available_when_typing = 0, mouse_click = 0x0}, {left = {58, 116}, top = {139, 334}, right = {265, 530}, bottom = {149, 358}, new_choice = 6, new_mode = 0, available_when_typing = 0, mouse_click = 0x0}, {left = {64, 128}, top = {155, 372}, right = {265, 530}, bottom = {165, 396}, new_choice = 7, new_mode = 0, available_when_typing = 0, mouse_click = 0x0}}
interface_spec1 = {initial_imode = 0, first_opening_flic = 0, second_opening_flic = 0, end_flic_go_ahead = 0, end_flic_escaped = 0, end_flic_otherwise = 0, flic_bunch_to_load = 0, move_left_new_mode = {-1, 0}, move_left_delta = {0, 0}, move_left_min = {0, 0}, move_left_max = {0, 0}, move_left_proc = {0x0, 0x0}, move_right_new_mode = {-1, 0}, move_right_delta = {0, 0}, move_right_min = {0, 0}, move_right_max = {0, 0}, move_right_proc = {0x0, 0x0}, move_up_new_mode = {-1, 0}, move_up_delta = {-1, 0}, move_up_min = {0, 0}, move_up_max = {7, 0}, move_up_proc = {0x0, 0x0}, move_down_new_mode = {-1, 0}, move_down_delta = {1, 0}, move_down_min = {0, 0}, move_down_max = {7, 0}, move_down_proc = {0x0, 0x0}, go_ahead_allowed = {1, 1}, go_ahead_proc = {0x0, 0x0}, escape_allowed = {1, 1}, escape_proc = {0x0, 0x0}, exit_proc = 0x0, draw_proc = 0x0, time_out = 0, start_proc1 = 0x5555555fac07 , start_proc2 = 0x0, done_proc = 0x5555555fa99f , font_needed = 0, typeable = {0, 0}, get_original_string = 0x0, escape_code = 0, dont_save_or_load = 0, number_of_button_flics = 8, flicker_on_flics = 0x5555558a60a0 , flicker_off_flics = 0x5555558a6000 , pushed_flics = 0x5555558a5f60 , number_of_mouse_areas = 8, mouse_areas = 0x5555558a5da0 , number_of_recopy_areas = 0, recopy_areas = 0x0}
flicker_on2 = {{flic_index = 335, x = {58, 116}, y = {51, 122}}, {flic_index = 337, x = {53, 106}, y = {74, 178}}, {flic_index = 339, x = {51, 102}, y = {96, 230}}, {flic_index = 333, x = {52, 104}, y = {119, 286}}, {flic_index = 331, x = {58, 116}, y = {142, 341}}}
flicker_off2 = {{flic_index = 334, x = {58, 116}, y = {51, 122}}, {flic_index = 336, x = {53, 106}, y = {74, 178}}, {flic_index = 338, x = {51, 102}, y = {96, 230}}, {flic_index = 332, x = {52, 104}, y = {119, 286}}, {flic_index = 330, x = {58, 116}, y = {142, 341}}}
push2 = {{flic_index = 15, x = {56, 112}, y = {50, 120}}, {flic_index = 15, x = {51, 102}, y = {73, 175}}, {flic_index = 15, x = {50, 100}, y = {95, 228}}, {flic_index = 15, x = {51, 102}, y = {118, 283}}, {flic_index = 15, x = {57, 114}, y = {141, 338}}}
mouse_areas2 = {{left = {57, 114}, top = {51, 122}, right = {265, 530}, bottom = {61, 146}, new_choice = 0, new_mode = 0, available_when_typing = 0, mouse_click = 0x0}, {left = {52, 104}, top = {74, 178}, right = {265, 530}, bottom = {84, 202}, new_choice = 1, new_mode = 0, available_when_typing = 0, mouse_click = 0x0}, {left = {51, 102}, top = {96, 230}, right = {265, 530}, bottom = {106, 254}, new_choice = 2, new_mode = 0, available_when_typing = 0, mouse_click = 0x0}, {left = {52, 104}, top = {119, 286}, right = {265, 530}, bottom = {129, 310}, new_choice = 3, new_mode = 0, available_when_typing = 0, mouse_click = 0x0}, {left = {58, 116}, top = {142, 341}, right = {265, 530}, bottom = {152, 365}, new_choice = 4, new_mode = 0, available_when_typing = 0, mouse_click = 0x0}}
interface_spec2 = {initial_imode = 0, first_opening_flic = 31, second_opening_flic = 30, end_flic_go_ahead = 0, end_flic_escaped = 0, end_flic_otherwise = 0, flic_bunch_to_load = 0, move_left_new_mode = {-1, 0}, move_left_delta = {0, 0}, move_left_min = {0, 0}, move_left_max = {0, 0}, move_left_proc = {0x0, 0x0}, move_right_new_mode = {-1, 0}, move_right_delta = {0, 0}, move_right_min = {0, 0}, move_right_max = {0, 0}, move_right_proc = {0x0, 0x0}, move_up_new_mode = {-1, 0}, move_up_delta = {-1, 0}, move_up_min = {0, 0}, move_up_max = {4, 0}, move_up_proc = {0x0, 0x0}, move_down_new_mode = {-1, 0}, move_down_delta = {1, 0}, move_down_min = {0, 0}, move_down_max = {4, 0}, move_down_proc = {0x0, 0x0}, go_ahead_allowed = {1, 1}, go_ahead_proc = {0x0, 0x0}, escape_allowed = {1, 1}, escape_proc = {0x0, 0x0}, exit_proc = 0x0, draw_proc = 0x0, time_out = 30000, start_proc1 = 0x0, start_proc2 = 0x0, done_proc = 0x5555555faadf , font_needed = 0, typeable = {0, 0}, get_original_string = 0x0, escape_code = 4, dont_save_or_load = 0, number_of_button_flics = 5, flicker_on_flics = 0x5555558a5d20 , flicker_off_flics = 0x5555558a5ca0 , pushed_flics = 0x5555558a5c20 , number_of_mouse_areas = 5, mouse_areas = 0x5555558a5b00 , number_of_recopy_areas = 0, recopy_areas = 0x0}
result = 21845
__FUNCTION__ = "DoMainMenuInterface"
#4 0x00005555555faf3f in GetMainMenuOption (pTime_out=30000, pContinue_allowed=0) at /home/juozas/dethrace/src/DETHRACE/common/mainmenu.c:388
result = -1946166247
#5 0x00005555555fb300 in DoMainMenu (pTime_out=30000, pSave_allowed=0, pContinue_allowed=0) at /home/juozas/dethrace/src/DETHRACE/common/mainmenu.c:569
the_result = 29
__FUNCTION__ = "DoMainMenu"
#6 0x00005555555fb4ec in DoMainMenuScreen (pTime_out=30000, pSave_allowed=0, pContinue_allowed=0) at /home/juozas/dethrace/src/DETHRACE/common/mainmenu.c:635
old_status = ePlayer_status_unknown
__FUNCTION__ = "DoMainMenuScreen"
#7 0x0000555555678563 in DoProgram () at /home/juozas/dethrace/src/DETHRACE/common/structur.c:673
No locals.
#8 0x00005555555f8863 in GameMain (pArgc=1, pArgv=0x7fffffffe018) at /home/juozas/dethrace/src/DETHRACE/common/main.c:123
CD_dir = "\000@", '\000' , "\224t\320\031\334\377\213\030\340\377\377\377\177\000\000\000\000\000\000\000\000\000\000\340\336\377\377\377\177\000\000\355N\267\367\377\177\000\000\241xWUUU\000\000\200W\320\367\377\177\000\000\026\000\000\000\000\000\000\000\320\362\217UUU\000\000h\r\000\000\000\000\000\000\341i\267\367\377\177\000\000\000\336\377\377\377\177\000\000\n\000\000\000\000\000\000\000\200W\320\367\377\177\000\000\aՃUUU\000\000\200\257\214UUU\000\000\000\026\320\367\377\177\000\000@\320\377\367\377\177\000\000\000\224t\320\031\334\377\213\025", '\000' , "\220\336\377\377\377\177\000\000\030"...
#9 0x000055555569be94 in original_main (pArgc=1, pArgv=0x7fffffffe018) at /home/juozas/dethrace/src/DETHRACE/pc-win95/win95sys.c:957
arg = 1433433656
i = 1
f = 3.0611365e-41
len = 27
#10 0x00005555555778d8 in main (argc=1, argv=0x7fffffffe018) at /home/juozas/dethrace/src/DETHRACE/main.c:48
No locals.
```
Full gdb backtrace, all threads
```
Thread 3 (Thread 0x7fffd1bfe640 (LWP 30422) "dethrace"):
#0 __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x555555f82e38) at ./nptl/futex-internal.c:57
sc_cancel_oldtype = 0
sc_ret =
resultvar =
__arg6 =
__arg5 =
__arg4 =
__arg3 =
__arg2 =
__arg1 =
_a6 =
_a5 =
_a4 =
_a3 =
_a2 =
_a1 =
#1 __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x555555f82e38) at ./nptl/futex-internal.c:87
err =
clockbit = 256
op = 393
err =
clockbit =
op =
#2 __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x555555f82e38, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
No locals.
#3 0x00007ffff7b7da41 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x555555f82de8, cond=0x555555f82e10) at ./nptl/pthread_cond_wait.c:503
spin = 0
buffer = {__routine = 0x7ffff7b7d720 <__condvar_cleanup_waiting>, __arg = 0x7fffd1bfdb80, __canceltype = 0, __prev = 0x0}
cbuffer = {wseq = 0, cond = 0x555555f82e10, mutex = 0x555555f82de8, private = 0}
err =
g = 0
flags =
g1_start =
maxspin = 0
signals =
result = 0
wseq = 0
seq = 0
private = 0
maxspin =
err =
result =
wseq =
g =
seq =
flags =
private =
signals =
done =
g1_start =
spin =
buffer =
cbuffer =
s =
#4 ___pthread_cond_wait (cond=0x555555f82e10, mutex=0x555555f82de8) at ./nptl/pthread_cond_wait.c:627
No locals.
#5 0x0000555555756560 in ma_semaphore_wait__posix (pSemaphore=0x555555f82de0) at /home/juozas/dethrace/lib/miniaudio/miniaudio.c:4893
No locals.
#6 0x0000555555756a59 in ma_semaphore_wait (pSemaphore=0x555555f82de0) at /home/juozas/dethrace/lib/miniaudio/miniaudio.c:5333
__PRETTY_FUNCTION__ = "ma_semaphore_wait"
#7 0x0000555555758673 in ma_job_queue_next (pQueue=0x555555f82dc8, pJob=0x7fffd1bfdd20) at /home/juozas/dethrace/lib/miniaudio/miniaudio.c:6312
head = 0
tail = 0
next = 0
#8 0x00005555557bccde in ma_resource_manager_next_job (pResourceManager=0x555555f82b30, pJob=0x7fffd1bfdd20) at /home/juozas/dethrace/lib/miniaudio/miniaudio.c:59007
No locals.
#9 0x00005555557b5f80 in ma_resource_manager_job_thread (pUserData=0x555555f82b30) at /home/juozas/dethrace/lib/miniaudio/miniaudio.c:56205
result = MA_SUCCESS
job = {toc = {breakup = {code = 54080, slot = 65535, refcount = 32767}, allocation = 140737488343872}, next = 140737349481555, order = 1442321024, data = {custom = {proc = 0x555555f81270, data0 = 0, data1 = 140736712402496}, resourceManager = {loadDataBufferNode = {pResourceManager = 0x555555f81270, pDataBufferNode = 0x0, pFilePath = 0x7fffd1bfe640 "@\346\277\321\377\177", pFilePathW = 0x7fffd1bfdd70 L"\xd1bfdd90翿\x557a294b啕\x55f81290啕\xd0749400\x8bffdc19\xd1bfddd0翿\x55756647啕", flags = 1433752849, pInitNotification = 0x0, pDoneNotification = 0x555555f81280, pInitFence = 0x7fffd1bfdd90, pDoneFence = 0x5555557a294b }, freeDataBufferNode = {pResourceManager = 0x555555f81270, pDataBufferNode = 0x0, pDoneNotification = 0x7fffd1bfe640, pDoneFence = 0x7fffd1bfdd70}, pageDataBufferNode = {pResourceManager = 0x555555f81270, pDataBufferNode = 0x0, pDecoder = 0x7fffd1bfe640, pDoneNotification = 0x7fffd1bfdd70, pDoneFence = 0x555555755511 }, loadDataBuffer = {pDataBuffer = 0x555555f81270, pInitNotification = 0x0, pDoneNotification = 0x7fffd1bfe640, pInitFence = 0x7fffd1bfdd70, pDoneFence = 0x555555755511 , rangeBegInPCMFrames = 0, rangeEndInPCMFrames = 93825002902144, loopPointBegInPCMFrames = 140736712400272, loopPointEndInPCMFrames = 93824994650443, isLooping = 1442321040}, freeDataBuffer = {pDataBuffer = 0x555555f81270, pDoneNotification = 0x0, pDoneFence = 0x7fffd1bfe640}, loadDataStream = {pDataStream = 0x555555f81270, pFilePath = 0x0, pFilePathW = 0x7fffd1bfe640 L"\xd1bfe640翿\x55f83230啕\xd1bfe640翿\001", initialSeekPoint = 140736712400240, pInitNotification = 0x555555755511 , pInitFence = 0x0}, freeDataStream = {pDataStream = 0x555555f81270, pDoneNotification = 0x0, pDoneFence = 0x7fffd1bfe640}, pageDataStream = {pDataStream = 0x555555f81270, pageIndex = 0}, seekDataStream = {pDataStream = 0x555555f81270, frameIndex = 0}}, device = {aaudio = {reroute = {pDevice = 0x555555f81270, deviceType = 0}}}}}
pResourceManager = 0x555555f82b30
__PRETTY_FUNCTION__ = "ma_resource_manager_job_thread"
#10 0x0000555555756647 in ma_thread_entry_proxy (pData=0x555555f81280) at /home/juozas/dethrace/lib/miniaudio/miniaudio.c:5084
pProxyData = 0x555555f81280
entryProc = 0x5555557b5f0e
pEntryProcData = 0x555555f82b30
result = 0x0
#11 0x00007ffff7b7eac3 in start_thread (arg=) at ./nptl/pthread_create.c:442
ret =
pd =
out =
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140737488343520, -5172698468270725687, 140736712402496, 11, 140737349412816, 140737488343872, 5172737499923228105, 5172680258037884361}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
not_first_call =
#12 0x00007ffff7c10850 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
No locals.
Thread 2 (Thread 0x7fffd23ff640 (LWP 30421) "dethrace"):
#0 0x00007ffff7c02cce in __ppoll (fds=0x555555f78640, nfds=3, timeout=, sigmask=0x0) at ../sysdeps/unix/sysv/linux/ppoll.c:42
sc_ret = -514
sc_cancel_oldtype = 0
sc_ret =
tval = {tv_sec = 140736720792718, tv_nsec = 93825002861864}
#1 0x00007ffff79af621 in pa_mainloop_poll () from /lib/x86_64-linux-gnu/libpulse.so.0
No symbol table info available.
#2 0x00007ffff79ba0bb in pa_mainloop_iterate () from /lib/x86_64-linux-gnu/libpulse.so.0
No symbol table info available.
#3 0x0000555555765bf1 in ma_device_data_loop__pulse (pDevice=0x555555efb130) at /home/juozas/dethrace/lib/miniaudio/miniaudio.c:19392
resultPA = 1
__PRETTY_FUNCTION__ = "ma_device_data_loop__pulse"
#4 0x000055555576a1dc in ma_worker_thread (pData=0x555555efb130) at /home/juozas/dethrace/lib/miniaudio/miniaudio.c:29486
startResult = MA_SUCCESS
stopResult = 21845
pDevice = 0x555555efb130
__PRETTY_FUNCTION__ = "ma_worker_thread"
#5 0x0000555555756647 in ma_thread_entry_proxy (pData=0x555555f83520) at /home/juozas/dethrace/lib/miniaudio/miniaudio.c:5084
pProxyData = 0x555555f83520
entryProc = 0x55555576a026
pEntryProcData = 0x555555efb130
result = 0x0
#6 0x00007ffff7b7eac3 in start_thread (arg=) at ./nptl/pthread_create.c:442
ret =
pd =
out =
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140737488341248, -5172698468270725687, 140736720795200, 11, 140737349412816, 140737488341600, 5172742999091979721, 5172680258037884361}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
not_first_call =
#7 0x00007ffff7c10850 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
No locals.
Thread 1 (Thread 0x7ffff70367c0 (LWP 30418) "dethrace"):
#0 SaveTransient (pIndex=1, pX_coord=131, pY_coord=198) at /home/juozas/dethrace/src/DETHRACE/common/graphics.c:2442
__FUNCTION__ = "SaveTransient"
#1 0x00005555555dab86 in DoMouseCursor () at /home/juozas/dethrace/src/DETHRACE/common/graphics.c:2634
x_coord = 149
y_coord = 200
mouse_moved = 1
new_required = 3
giblet_index =
cursor_offset = 0
button_is_down = 0
giblet_chance = 1
giblet_count = 0
this_call_time = 9208
last_cursor_change = 9209
last_call_time = 9187
last_required_change = 9208
period = 21
delta_x = 7095
required_cursor = 3
zero_count = 0
button_was_down = 0
#2 0x00005555555e229b in DoInterfaceScreen (pSpec=0x5555558a6420 , pOptions=1, pCurrent_choice=0) at /home/juozas/dethrace/src/DETHRACE/common/intrface.c:372
entry_status = eProg_idling
x_coord = -138873773
y_coord = 32767
mouse_in_somewhere = 0
i = 0
key2 =
mouse_was_started =
last_choice = 8
escaped = 0
timed_out = 0
go_ahead = 0
last_mode =
result = -128
the_key = -1
the_max = 0
mouse_down = 0
new_mouse_down = 21845
last_mouse_down = 0
defeat_mode_change = 0
selection_changed = 0
the_str = "\000\000\000\000\000\000\000\000m_\267\367\377\177\000\000\300g\003\367\377\177\000\000\000\026\320\367\377\177\000\000 \360\367UUU\000\000'\215\266\367\377\177\000\000NETWORK.\360\334\377\377\377\177\000\000\030\340\377\377\377\177\000\000\304\370\\UUU", '\000' , "-", '\000' , " \360\367UUU\000\000/home/juozas/Games/CARSPLAT/DATA/ANIM/CANBUTIN.FLI", '\000' , "\n\030\374\367\377\177\000\000NETWORK.\n\030\374\367\377\177\000\000"...
last_press = 4294967295
last_left_press =
last_right_press =
last_up_press =
last_down_press =
copy_areas = 0x0
old_current_splash = 0x0
pixels_copy =
palette_copy =
__FUNCTION__ = "DoInterfaceScreen"
#3 0x00005555555fae9a in DoMainMenuInterface (pTime_out=30000, pContinue_allowed=0) at /home/juozas/dethrace/src/DETHRACE/common/mainmenu.c:354
flicker_on1 = {{flic_index = 14, x = {64, 128}, y = {37, 89}}, {flic_index = 25, x = {59, 118}, y = {54, 130}}, {flic_index = 27, x = {55, 110}, y = {71, 170}}, {flic_index = 29, x = {52, 104}, y = {88, 211}}, {flic_index = 23, x = {53, 106}, y = {105, 252}}, {flic_index = 21, x = {54, 108}, y = {122, 293}}, {flic_index = 17, x = {58, 116}, y = {139, 334}}, {flic_index = 19, x = {64, 128}, y = {155, 372}}}
flicker_off1 = {{flic_index = 13, x = {64, 128}, y = {37, 89}}, {flic_index = 24, x = {59, 118}, y = {54, 130}}, {flic_index = 26, x = {55, 110}, y = {71, 170}}, {flic_index = 28, x = {52, 104}, y = {88, 211}}, {flic_index = 22, x = {53, 106}, y = {105, 252}}, {flic_index = 20, x = {54, 108}, y = {122, 293}}, {flic_index = 16, x = {58, 116}, y = {139, 334}}, {flic_index = 18, x = {64, 128}, y = {155, 372}}}
push1 = {{flic_index = 15, x = {63, 126}, y = {36, 86}}, {flic_index = 15, x = {58, 116}, y = {53, 127}}, {flic_index = 15, x = {54, 108}, y = {70, 168}}, {flic_index = 15, x = {51, 102}, y = {87, 209}}, {flic_index = 15, x = {52, 104}, y = {104, 250}}, {flic_index = 15, x = {53, 106}, y = {121, 290}}, {flic_index = 15, x = {57, 114}, y = {138, 331}}, {flic_index = 15, x = {63, 126}, y = {154, 370}}}
mouse_areas1 = {{left = {64, 128}, top = {37, 89}, right = {265, 530}, bottom = {47, 113}, new_choice = 0, new_mode = 0, available_when_typing = 0, mouse_click = 0x0}, {left = {59, 118}, top = {54, 130}, right = {265, 530}, bottom = {64, 154}, new_choice = 1, new_mode = 0, available_when_typing = 0, mouse_click = 0x0}, {left = {55, 110}, top = {71, 170}, right = {265, 530}, bottom = {81, 194}, new_choice = 2, new_mode = 0, available_when_typing = 0, mouse_click = 0x0}, {left = {52, 104}, top = {88, 211}, right = {265, 530}, bottom = {98, 235}, new_choice = 3, new_mode = 0, available_when_typing = 0, mouse_click = 0x0}, {left = {53, 106}, top = {105, 252}, right = {265, 530}, bottom = {115, 276}, new_choice = 4, new_mode = 0, available_when_typing = 0, mouse_click = 0x0}, {left = {54, 108}, top = {122, 293}, right = {265, 530}, bottom = {132, 317}, new_choice = 5, new_mode = 0, available_when_typing = 0, mouse_click = 0x0}, {left = {58, 116}, top = {139, 334}, right = {265, 530}, bottom = {149, 358}, new_choice = 6, new_mode = 0, available_when_typing = 0, mouse_click = 0x0}, {left = {64, 128}, top = {155, 372}, right = {265, 530}, bottom = {165, 396}, new_choice = 7, new_mode = 0, available_when_typing = 0, mouse_click = 0x0}}
interface_spec1 = {initial_imode = 0, first_opening_flic = 0, second_opening_flic = 0, end_flic_go_ahead = 0, end_flic_escaped = 0, end_flic_otherwise = 0, flic_bunch_to_load = 0, move_left_new_mode = {-1, 0}, move_left_delta = {0, 0}, move_left_min = {0, 0}, move_left_max = {0, 0}, move_left_proc = {0x0, 0x0}, move_right_new_mode = {-1, 0}, move_right_delta = {0, 0}, move_right_min = {0, 0}, move_right_max = {0, 0}, move_right_proc = {0x0, 0x0}, move_up_new_mode = {-1, 0}, move_up_delta = {-1, 0}, move_up_min = {0, 0}, move_up_max = {7, 0}, move_up_proc = {0x0, 0x0}, move_down_new_mode = {-1, 0}, move_down_delta = {1, 0}, move_down_min = {0, 0}, move_down_max = {7, 0}, move_down_proc = {0x0, 0x0}, go_ahead_allowed = {1, 1}, go_ahead_proc = {0x0, 0x0}, escape_allowed = {1, 1}, escape_proc = {0x0, 0x0}, exit_proc = 0x0, draw_proc = 0x0, time_out = 0, start_proc1 = 0x5555555fac07 , start_proc2 = 0x0, done_proc = 0x5555555fa99f , font_needed = 0, typeable = {0, 0}, get_original_string = 0x0, escape_code = 0, dont_save_or_load = 0, number_of_button_flics = 8, flicker_on_flics = 0x5555558a60a0 , flicker_off_flics = 0x5555558a6000 , pushed_flics = 0x5555558a5f60 , number_of_mouse_areas = 8, mouse_areas = 0x5555558a5da0 , number_of_recopy_areas = 0, recopy_areas = 0x0}
flicker_on2 = {{flic_index = 335, x = {58, 116}, y = {51, 122}}, {flic_index = 337, x = {53, 106}, y = {74, 178}}, {flic_index = 339, x = {51, 102}, y = {96, 230}}, {flic_index = 333, x = {52, 104}, y = {119, 286}}, {flic_index = 331, x = {58, 116}, y = {142, 341}}}
flicker_off2 = {{flic_index = 334, x = {58, 116}, y = {51, 122}}, {flic_index = 336, x = {53, 106}, y = {74, 178}}, {flic_index = 338, x = {51, 102}, y = {96, 230}}, {flic_index = 332, x = {52, 104}, y = {119, 286}}, {flic_index = 330, x = {58, 116}, y = {142, 341}}}
push2 = {{flic_index = 15, x = {56, 112}, y = {50, 120}}, {flic_index = 15, x = {51, 102}, y = {73, 175}}, {flic_index = 15, x = {50, 100}, y = {95, 228}}, {flic_index = 15, x = {51, 102}, y = {118, 283}}, {flic_index = 15, x = {57, 114}, y = {141, 338}}}
mouse_areas2 = {{left = {57, 114}, top = {51, 122}, right = {265, 530}, bottom = {61, 146}, new_choice = 0, new_mode = 0, available_when_typing = 0, mouse_click = 0x0}, {left = {52, 104}, top = {74, 178}, right = {265, 530}, bottom = {84, 202}, new_choice = 1, new_mode = 0, available_when_typing = 0, mouse_click = 0x0}, {left = {51, 102}, top = {96, 230}, right = {265, 530}, bottom = {106, 254}, new_choice = 2, new_mode = 0, available_when_typing = 0, mouse_click = 0x0}, {left = {52, 104}, top = {119, 286}, right = {265, 530}, bottom = {129, 310}, new_choice = 3, new_mode = 0, available_when_typing = 0, mouse_click = 0x0}, {left = {58, 116}, top = {142, 341}, right = {265, 530}, bottom = {152, 365}, new_choice = 4, new_mode = 0, available_when_typing = 0, mouse_click = 0x0}}
interface_spec2 = {initial_imode = 0, first_opening_flic = 31, second_opening_flic = 30, end_flic_go_ahead = 0, end_flic_escaped = 0, end_flic_otherwise = 0, flic_bunch_to_load = 0, move_left_new_mode = {-1, 0}, move_left_delta = {0, 0}, move_left_min = {0, 0}, move_left_max = {0, 0}, move_left_proc = {0x0, 0x0}, move_right_new_mode = {-1, 0}, move_right_delta = {0, 0}, move_right_min = {0, 0}, move_right_max = {0, 0}, move_right_proc = {0x0, 0x0}, move_up_new_mode = {-1, 0}, move_up_delta = {-1, 0}, move_up_min = {0, 0}, move_up_max = {4, 0}, move_up_proc = {0x0, 0x0}, move_down_new_mode = {-1, 0}, move_down_delta = {1, 0}, move_down_min = {0, 0}, move_down_max = {4, 0}, move_down_proc = {0x0, 0x0}, go_ahead_allowed = {1, 1}, go_ahead_proc = {0x0, 0x0}, escape_allowed = {1, 1}, escape_proc = {0x0, 0x0}, exit_proc = 0x0, draw_proc = 0x0, time_out = 30000, start_proc1 = 0x0, start_proc2 = 0x0, done_proc = 0x5555555faadf , font_needed = 0, typeable = {0, 0}, get_original_string = 0x0, escape_code = 4, dont_save_or_load = 0, number_of_button_flics = 5, flicker_on_flics = 0x5555558a5d20 , flicker_off_flics = 0x5555558a5ca0 , pushed_flics = 0x5555558a5c20 , number_of_mouse_areas = 5, mouse_areas = 0x5555558a5b00 , number_of_recopy_areas = 0, recopy_areas = 0x0}
result = 21845
__FUNCTION__ = "DoMainMenuInterface"
#4 0x00005555555faf3f in GetMainMenuOption (pTime_out=30000, pContinue_allowed=0) at /home/juozas/dethrace/src/DETHRACE/common/mainmenu.c:388
result = -1946166247
#5 0x00005555555fb300 in DoMainMenu (pTime_out=30000, pSave_allowed=0, pContinue_allowed=0) at /home/juozas/dethrace/src/DETHRACE/common/mainmenu.c:569
the_result = 29
__FUNCTION__ = "DoMainMenu"
#6 0x00005555555fb4ec in DoMainMenuScreen (pTime_out=30000, pSave_allowed=0, pContinue_allowed=0) at /home/juozas/dethrace/src/DETHRACE/common/mainmenu.c:635
old_status = ePlayer_status_unknown
__FUNCTION__ = "DoMainMenuScreen"
#7 0x0000555555678563 in DoProgram () at /home/juozas/dethrace/src/DETHRACE/common/structur.c:673
No locals.
#8 0x00005555555f8863 in GameMain (pArgc=1, pArgv=0x7fffffffe018) at /home/juozas/dethrace/src/DETHRACE/common/main.c:123
CD_dir = "\000@", '\000' , "\224t\320\031\334\377\213\030\340\377\377\377\177\000\000\000\000\000\000\000\000\000\000\340\336\377\377\377\177\000\000\355N\267\367\377\177\000\000\241xWUUU\000\000\200W\320\367\377\177\000\000\026\000\000\000\000\000\000\000\320\362\217UUU\000\000h\r\000\000\000\000\000\000\341i\267\367\377\177\000\000\000\336\377\377\377\177\000\000\n\000\000\000\000\000\000\000\200W\320\367\377\177\000\000\aՃUUU\000\000\200\257\214UUU\000\000\000\026\320\367\377\177\000\000@\320\377\367\377\177\000\000\000\224t\320\031\334\377\213\025", '\000' , "\220\336\377\377\377\177\000\000\030"...
#9 0x000055555569be94 in original_main (pArgc=1, pArgv=0x7fffffffe018) at /home/juozas/dethrace/src/DETHRACE/pc-win95/win95sys.c:957
arg = 1433433656
i = 1
f = 3.0611365e-41
len = 27
#10 0x00005555555778d8 in main (argc=1, argv=0x7fffffffe018) at /home/juozas/dethrace/src/DETHRACE/main.c:48
No locals.
```
Encountered a strange bug while testing dethrace. I noticed that
Ctrl+Q
quit shortcut does not behave correctly. It shows a save menu instead of quitting to OS after selecting ok button or hitting enter, also hitting escape shows a broken menu, moving mouse crashes the game.Screenshots
![Ekrano kopija_2024-07-07_14-38-35](https://github.com/dethrace-labs/dethrace/assets/6626242/71815b79-814a-4ff0-bf91-f48fd7defbf2) ![Ekrano kopija_2024-07-07_14-38-50](https://github.com/dethrace-labs/dethrace/assets/6626242/50eead2e-db60-431a-ba42-7a73bb996432) ![Ekrano kopija_2024-07-07_14-38-59](https://github.com/dethrace-labs/dethrace/assets/6626242/df3cbdfc-e771-4b84-9984-ed8dd8ac6534) ![Ekrano kopija_2024-07-07_14-39-07](https://github.com/dethrace-labs/dethrace/assets/6626242/54173846-d85c-4c0a-8dae-36d62b979650)Game log
``` Dethrace version: v0.7.1-10-g8751f63 [INFO] Harness_Init DETHRACE_ROOT_DIR is set to '/home/juozas/Games/CARSPLAT/' Using root directory: /home/juozas/Games/CARSPLAT/ Game mode: Splat Pack [WARN] S3StopMIDIOutlets stubbed [WARN] S3StopCDAOutlets stubbed [INFO] AudioBackend_Init Playback device: 'GK208 HDMI/DP Audio Controller Digital Stereo (HDMI 2)' ****************** Caught SIGSEGV ****************** Stack trace: 0: SaveTransient at /home/juozas/dethrace/src/DETHRACE/common/graphics.c:2442 1: DoMouseCursor at /home/juozas/dethrace/src/DETHRACE/common/graphics.c:2644 2: DoInterfaceScreen at /home/juozas/dethrace/src/DETHRACE/common/intrface.c:372 3: DoMainMenuInterface at /home/juozas/dethrace/src/DETHRACE/common/mainmenu.c:354 4: GetMainMenuOption at /home/juozas/dethrace/src/DETHRACE/common/mainmenu.c:388 5: DoMainMenu at /home/juozas/dethrace/src/DETHRACE/common/mainmenu.c:569 6: DoMainMenuScreen at /home/juozas/dethrace/src/DETHRACE/common/mainmenu.c:635 7: DoProgram at /home/juozas/dethrace/src/DETHRACE/common/structur.c:673 8: GameMain at /home/juozas/dethrace/src/DETHRACE/common/main.c:124 9: original_main at /home/juozas/dethrace/src/DETHRACE/pc-win95/win95sys.c:958 10: main at /home/juozas/dethrace/src/DETHRACE/main.c:49 11: ?? ??:0 12: ?? ??:0 ```Log with gdb output
``` GNU gdb (Ubuntu 12.1-0ubuntu1~22.04.2) 12.1 Copyright (C) 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or laterGdb backtrace
``` #0 SaveTransient (pIndex=1, pX_coord=131, pY_coord=198) at /home/juozas/dethrace/src/DETHRACE/common/graphics.c:2442 #1 0x00005555555dab86 in DoMouseCursor () at /home/juozas/dethrace/src/DETHRACE/common/graphics.c:2634 #2 0x00005555555e229b in DoInterfaceScreen (pSpec=0x5555558a6420Full gdb backtrace
``` #0 SaveTransient (pIndex=1, pX_coord=131, pY_coord=198) at /home/juozas/dethrace/src/DETHRACE/common/graphics.c:2442 __FUNCTION__ = "SaveTransient" #1 0x00005555555dab86 in DoMouseCursor () at /home/juozas/dethrace/src/DETHRACE/common/graphics.c:2634 x_coord = 149 y_coord = 200 mouse_moved = 1 new_required = 3 giblet_index =Full gdb backtrace, all threads
``` Thread 3 (Thread 0x7fffd1bfe640 (LWP 30422) "dethrace"): #0 __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x555555f82e38) at ./nptl/futex-internal.c:57 sc_cancel_oldtype = 0 sc_ret =