Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lady Bug and Sinthea crash game on race start #178

Closed
rafalp opened this issue Sep 25, 2022 · 11 comments · Fixed by #226
Closed

Lady Bug and Sinthea crash game on race start #178

rafalp opened this issue Sep 25, 2022 · 11 comments · Fixed by #226

Comments

@rafalp
Copy link

rafalp commented Sep 25, 2022

Repro:

  1. download Carmageddon files from GoG.com
  2. run 0.4 release with splat pack files
  3. start new game
  4. if one of racers will be Lady Bug, game will crash on start

Note that this behavior was also crashing the original game. So either car needs fixing/workaround for it needs to be implemented or it needs to be prevented from running in races.

lady-bug.mp4
@madebr
Copy link
Collaborator

madebr commented Sep 25, 2022

I cannot reproduce this on Linux, neither with the released binary neither with current master.
@dethrace-labs
Can you reproduce?

@rafalp
Copy link
Author

rafalp commented Sep 25, 2022

I'll try compiling the game locally to get proper backtrace in dev build, but I don't know when I'll have time for that.

@madebr
Copy link
Collaborator

madebr commented Sep 26, 2022

We build dethrace on ci with debug symbols.

cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTS=ON -DDETHRACE_WERROR=ON -B build

So you should be able to get a backtrace without needing to build dethrace yourself using gdb/lldb (I verified on Linux).

On my Linux machine, you can run an executable under gdb using

DETHRACE_ROOT_DIR=/path/to/my/carmageddon/data gdb ./dethrace -ex run

When a segmentation fault happens, you can then print a full backtrace using:

set pagination off
bt full

Looking at the macos build script, it can be used without change on any Macos machine.

@rafalp
Copy link
Author

rafalp commented Sep 26, 2022

Okay, I'll try with lldb and come back to you.

@rafalp
Copy link
Author

rafalp commented Sep 26, 2022

Output from lldb:

* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x00000001000e3aba dethrace`ControlBoundFunkGroovePlus + 122
dethrace`ControlBoundFunkGroovePlus:
->  0x1000e3aba <+122>: addss  (%rbx), %xmm0
    0x1000e3abe <+126>: movss  0xef3fa(%rip), %xmm1      ; xmm1 = mem[0],zero,zero,zero
    0x1000e3ac6 <+134>: callq  0x1001a4216               ; symbol stub for: fmodf
    0x1000e3acb <+139>: movss  %xmm0, (%rbx)
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  * frame #0: 0x00000001000e3aba dethrace`ControlBoundFunkGroovePlus + 122
    frame #1: 0x000000010004795b dethrace`MungeCarGraphics + 2603
    frame #2: 0x000000010008dcca dethrace`MainGameLoop + 1066
    frame #3: 0x00000001000daea6 dethrace`DoGame + 838
    frame #4: 0x00000001000db11c dethrace`DoProgram + 172
    frame #5: 0x000000010008c38d dethrace`GameMain + 189
    frame #6: 0x00000001000f44ce dethrace`original_main + 558
    frame #7: 0x0000000100003c70 dethrace`main + 32
    frame #8: 0x000000010039152e dyld`start + 462

@rafalp
Copy link
Author

rafalp commented Sep 28, 2022

Exactly same thing happens when Sinthea starts in race.

@rafalp rafalp changed the title Lady Bug crashes the race Lady Bug and Sinthea crash game on race start Sep 28, 2022
@dethrace-labs
Copy link
Owner

dethrace-labs commented Sep 30, 2022

I wonder why we cannot display a correct backtrace in the release build?

I also cannot repro on my mac :(

I'm using splatpack data from the GOG release, how about you @rafalp ?

@madebr

This comment was marked as off-topic.

@madebr

This comment was marked as off-topic.

@madebr
Copy link
Collaborator

madebr commented Oct 26, 2022

I can reproduce OP's problem 100% of the times with the splatpack x-mas demo game data.

Sinthea (SLED.TXT) is causing issues.

@madebr
Copy link
Collaborator

madebr commented Oct 26, 2022

SLED.TXT from the xmas demo references groove/funk binding indices 1-11.
But the groove section only creates bindings for indices 1 up to 10. It creates no 11.

Comparing SLED.TXT with the one from the full splat game, this is the only difference.
In there, the index is -1 (=> disabled) instead of 11.

I"m wondering:

  • how the xmas demo handles this
  • whether the windows executable can handle SLED.TXT from the xmas demo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants