-
Notifications
You must be signed in to change notification settings - Fork 102
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
Segfault during demo #371
Comments
Interestingly after playing some run and updating the settings (enabling "shoot by default", toggling it back changes nothing), I can no longer reproduce… |
Maybe try it with a clean userdir ( If you do manage to reproduce it, try building with ASan ( |
Confirmed consistently reproducible with a clean userdir. |
Found the problem. It was a bad interaction between the intro and the demoplayer system, hence why it stopped occurring for you once you had your progress file saved — the intro stopped playing on subsequent runs. See the commit message for details. Thanks for the report. I'll land the fix in |
This fixes a nasty interaction between the intro sequence and the demoplayer introduced in 3ff6204. The cutscene tries to suspend the demoplayer for its duration and then resume it later. When the suspension counter hits 0, the demoplayer event handlers are installed globally. And then AFTER that happens, the demoplayer is actually initialized, resetting the suspension counter and installing the event handlers AGAIN. When the demoplayer is then suspended (e.g. by starting the actual demo playback), only one set of those handlers is removed, which has the effect of the demoplayer remaining active even in-game. Eventually, it tries to play a demo while a game is already running, at which point all hell breaks loose. Fix this by making suspend and resume no-ops until the demoplayer has been properly initialized. Fixes #371
Information
How to reproduce
Backtraces
First coredump:
From launching it in
lldb
:Second coredump got while recording display to get more context
Building taisei with LLVM/clang
scan-build
utility also reports 42 bugs found, including some memory errors and logic errors (majority of bugs found being unused code due to dead assignments).The text was updated successfully, but these errors were encountered: