-
Notifications
You must be signed in to change notification settings - Fork 151
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
Freezing and crashes in 4th tutorial #6442
Comments
Mirrored from Codeberg Well I believe the linked bug #6388 is unrelated as it is a clear lua error. I will try to fix that in the other thread. |
Mirrored from Codeberg
Look at the stdout_crash_example_debug.gdb.txt. At the time the gdb prompt was available, the application was already finished (with exit value 3). No more backtrace available. In mingw the application crash behaves differently than in linux. |
Mirrored from Codeberg The verbose logs says e.g.:
I've played the 4th tutorial with widelands version 1.2 on linux now without any issues. |
Mirrored from Codeberg ok i can reliably reproduce the hangs. they happen reliably after having opened the ware statistics menu. |
Mirrored from Codeberg <@>Nordfriese |
Mirrored from Codeberg I am renaming issue, from hessenfarmer's analysis it seems just mission thread script was faulty and mingw has nothing to do with the problems. |
Mirrored from Codeberg I've analysed crash handlings in various scenarios + comparison between mingw and linux. The result: under mingw it is bad - without gdb there is practically no clue which code part crashed.
I see the following comment in main.cc, which I don't fully understand: I may have time for doing PR next weeks, let's see. |
Mirrored from Codeberg
But yes, this is the only place where we redirect |
Mirrored from Codeberg I've prepared autohotkey script which simplifies testing (under Windows in foreground - mouse & keyboard should not be used that time). If you find it useful, I can create PR to include it somewhere in git.
Download v2.0 exe from https://www.autohotkey.com/download/, install it. After getting to main menu of widelands, you can doubleclik on the wct4.ahk script to execute automatic clicking. For release build, it could reproduce issue only very seldom (it seems manual clicking is more effective). But for debug build, when I run widelands under mingw's gdb, the reproducibility is 100%. |
Mirrored from Codeberg
Created on Tue Apr 30 14:30:57 CEST 2024 by Pavol Gono (palino)
Describe the bug
I am experiencing game freezing and crashes. I've noticed it shortly before 1.2 release for the first time, when translating 4th economic tutorial.
On my PC, the combination of mingw + 4th tutorial seems to produce frequent problems of random nature.
Most frequent are game freezings (deadlocks?), my rough estimation is 1/4 probability that playing 4th tutorial freezes.
I've experienced two crashes - game silently finished without suspicious stdout line. Luckily, second time I run widelands under gdb and I noticed strange exit code 3. I couldn't find such return value in sources.
And finally, I've seen "Error in Lua Coroutine" once.
All attached logs are generated when playing 4th tutorial, from the same PC.
To reproduce
Play 4th tutorial and sometimes freezing/crash happens.
Expected behavior
Stable gameplay without freezing and crashes.
Crash log
Version:
git26591 (46b2005@master) and 1.3git26620 (9f2be64@master); both Debug and Release buildsAdditional context
I have feeling that clicking with mouse outside of modal dialogs triggers these problems more frequently, but not sure.
I have also frequent game saving turned on (each minute or two), maybe it has infuence.
May be related to https://codeberg.org/wl/widelands/issues/4750 - the same environment.
Question
For the crash cases - it seems running gdb in Debug mode is useless.
Do you think "Structured Exception Handling" could catch the crashes?
https://learn.microsoft.com/en-us/cpp/cpp/structured-exception-handling-c-cpp?view=msvc-170
Or just removing "#ifdef NDEBUG" at the end of main.cc could improve it?
The text was updated successfully, but these errors were encountered: