-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
crash on exit in debug mode #17876
Comments
@ralfbrown: First bad commit is
|
I tracked down and found the reason for the crash in darktable/src/control/control.c Lines 303 to 332 in 2702ef6
If I comment out @ralfbrown: Not sure what was your intention here. It shouldn't hurt to wait for the threads to finish? |
But we were getting a hang because the threads had never been created if the user managed to request a program exit fast enough..... Which of the join calls is actually causing the assertion failure? Do you still get the issue if you move line 323 above 319/320? |
The assertion failure is triggered when none of the join calls is made due to the early return above.
That does not help, but when I move the first loop above, the crash is gone.
|
So now the question is whether it is possible with this change to trigger a crash or hang by typing Ctrl-Q or clicking on the main window's close button in the interval between the window appearing and it fully drawing. You can extend the interval during which you could click by disabling the splash screen (Ctrl-Q isn't affected, but the splash screen hides the initial appearance of the main window). |
I am not able to trigger this hang at all. Even not if the early return is commented out.
So this change works ok on my Mac. Just another hint which I found during my analysis: In darktable/src/common/darktable.c Lines 2039 to 2059 in 584d614
If I put a breakpoint at line And indeed, putting a
This is of course not a solution but maybe it helps to understand whats going on. |
The assertion failure is also reproducible on Windows and the change described above (move the early return between the two for-loops) fixes it as well. |
YES. If i remove the
part to later i can easily trigger the same error - by pressing
|
Just mentioning, on release build today I observed one crash in OpenCL and one with double free. No easy to trigger and can't provide a log unfortunately. But, more hints to a race condition while closing ... |
Did some further analysis here, unfortunately still without a real success.
|
A quick check leads me to believe that the biggest problem with |
@zisoft i think you can relax, i think i found the problem. PR following tomorrow. |
Describe the bug
When built with Debug mode, dt crashes reproducible on exit in line
195
ofsrc/common/dtpthread.h
:darktable/src/common/dtpthread.h
Lines 193 to 198 in e079290
Steps to reproduce
Expected behavior
No response
Logfile | Screenshot | Screencast
Commit
No response
Where did you obtain darktable from?
self compiled
darktable version
current master
What OS are you using?
Mac
What is the version of your OS?
macOS 15.1.1
Describe your system?
No response
Are you using OpenCL GPU in darktable?
Yes
If yes, what is the GPU card and driver?
No response
Please provide additional context if applicable. You can attach files too, but might need to rename to .txt or .zip
No response
The text was updated successfully, but these errors were encountered: