-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Attempt to fix the splash screen issue. #20157
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
base: master
Are you sure you want to change the base?
Conversation
|
Yes, not starting in another thread is for sure good! |
|
I built this PR on Windows 11. Dt crashes when I disable the splash screen. |
- Rename all routines from darktable_ prefix to dt_ to conform to style. - Never force the splash screen. We are then loosing the crawler messages but this could create a race condition. We create the splash in a different threads than the main one. This is wrong as the creation of the splash screen is not protected against concurrent access. Possibly fixes #19992 #20111
|
@gi-man : And you do not see very briefly the splash screen anymore, right? Are you willing to debug this with me? If I instrument the code, would you be able to compile, run and report what you see? |
Where? I only see it in |
It is removed from this PR. The creation was done on the main treads (my message was incorrect on this) but then multiple threads (if you include the crawler) where updating the splash with messages. |
|
Like I said, |
|
@dterrahe : Indeed, missed that, I really thought that the crawler was in an independent thread. That explain why this PR did not fix the issue. Back to debug... |
The screen showing up is on Fedora KDE current master. On Windows it initially just has the terminal, then dt window shows up with the tittle bar (the one with the X to close or minimize) with a white background. It will remain like this until I close/stop the process. I'm willing to debug. I am 6hrs behind you so there will be a delay. Yes, I can compile and run it on Windows. |
f7837cd to
53f7316
Compare
|
@gi-man : Perfect ! I have just push a new version I had prepared. The goal is to run darktable from command line with SPLASH_DEBUG set to some value and report if it work or not and the output in the console.
And we'll advise for the next step. Thanks for your help! |
|
Last but not least, do you have Lua scripts? If so, can you disable Lua completely (remove the luarc file). |
I have to drive into work today. I will continue to test in the evening. |
|
For clarity it did crash. I just did another run using -d all to see if it provides more insights. |
|
To run it should be on a standard Windows console: Sorry for not having been clear. |
version: darktable 5.5.0+97~g53f7316e96 darktable.exe --configdir C:\msys64\opt\test --cachedir C:\msys64\opt\test |
|
So not crash here, right? |
|
If no crash, now let's set SPLASH_DEBUG to other values and report if it crashes or not and the actual log. TIA. |
It did crash with SPLASH_DEBUG=15 |
|
As an experiment I tried, even with the show_splash_screen=TRUE, it crashes with any value in SPLASH_DEBUG!=0. If I set SPLASH_DEBUG=0 and show_splash_screen=TRUE, then no crash. |
This means that the issue is not really the splash screen as with value 15 the splash screen is a no-op. Only a printf to display some information and that's all. No dialog created, no widget created, no manual handling of events...
Ok, that's then basically the current code on master.
Even for value 2? as this only reset to NULL a widget that should be null anyway. |
|
show_splash_screen, SPLASH_DEBUG, Crash? |
|
What about 0,2 ? |
|
0, 2, Crash |
|
Ok, all this seems to indicate a memory corruption, but not something directly related to the splash screen. Are you able to use the gdb debugger? |
|
If yes, you can run darktable with:
and when it crashes, enter the command
And report the output. |
|
What would help, is for all |
|
I can try gdb, but this is Windows. I tried last night via the URTC terminal but it did not work. I need to google for more info. I can send you the 0,n terminal. It looks to be the same, but I will confirm. |
|
0, 2, Crash |
|
0, 8, Crash |
|
Can you edit
(delete the line). |
|
Ok, 0,2 & 0,8 just confirms that all is ok and that the splash screen is not the culprit (I'm confident at 99%). |
|
0, 4, Crash This one is different |
@gi-man Maybe you installed the wrong gdb package. A while back I also had a problem with gdb which was installed in /usr/bin from the Backtraces are an invaluable source of information in case of crashes, so it would be very helpful if you could run darktable under gdb. |
With this change on top of your PR. 0, 15, Crash 0, 1, Crash 0, 8, Crash 1, 0, No crash (just to confirm the build was good after the edits) I need to step away for a while. I will try gdb later tonight. |
|
I managed to get it to run in gdb. It does not crash. It is very slow. I tried it multiple times with and without the splash screen active. With the splash screen set to FALSE, the splash screen does show very briefly like on Fedora. I took a video with the cellphone. The bottom of the splash screen says: This is the only info in gdb: |
|
I wanted to rule out the UCRT packages updates, therefore I compiled 5.2.1 using the current UCRT. 5.2.1 does not crash with the splash screen off. |
|
@gi-man : Not sure what you call a crash. But if it crashes under gdb what we need is the backtrace. That is when you're back into gdb (you should have the prompt (gdb) ) then enter the command bt. |
I see, if you could find a combination where it crashes and get a backtrace it would be nice. Again, the fact that it does not crashes on gdb but crash on the same condition without gdb really favor a memory corruption or possibly a race condition. |
|
Something else to test is to build without Lua. I have found some comments in the code saying that we had issues... Be sure to clean completely the build directory:
And build without Lua:
I let you adapt the command for Windows. |
Possibly fixes #19992 #20111