-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Rework the splash screen part 1 & 2 #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. |
|
@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? |
|
And then if it is, he could try changing to and see if that helps. |
|
Sorry, I had to present in a meeting. Yeah, that f8281 has to be it. I'm building it now (windows is slow to compile) to confirm. 1c11e84 - No crash 07Aug2025 16d6695 - No crash 12Aug2025 5e965db - No crash 14Aug2025 f8281cc - This has to be it building 15d4c0a - Crash 14Aug2025 f29de89 - Crash 21Aug2025 |
|
Yes, f8281cc is when we start to crash. |
|
Lunch was good. This change if(old_view && new_view != old_view) worked on top of 1270eac |
Do i understand this correctly, this does not make dt crash or hanging? BTW while being here,
|
Correct. Changing |
|
It seems that just Could someone do more extensive testing after replacing with The thing to test, under x11/windows/mac, is if double clicking on an image in the lighttable still immediately shows the "waiting" cursor while the image is being loaded. |
|
@dterrahe : I'd like to go safe and simple for 5.4.1, so I'll fix the line as you've proposed in your first message. The change with |
|
Moving this for 5.6 now that we have a fix for 5.4.1. The goal here is to clean-up splash screen by avoid the static variables and to avoid the crawler to splash a screen even if there is no message to be displayed. |
|
@gi-man : Thanks for the hard work, please do not hesitate to test tomorrow nightly build to ensure all is back to normal. |
|
I may have found the reason why |
- 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.
Remove all static routines and move the needed variable into darktable struct (dt_splash_t). Do not use a dialog but instead a simple top level window. Remove code for the exit window. Not activated/implemented and if we need to implement this we can recover the code from history.
53f7316 to
03dc648
Compare
I was just able to test after a busy weekend. Current master works without issues. |
|
The splash screen is only used in |
|
Good point @dterrahe, I had also in mind to add more to the splash screen like the name of all modules (iop and libs) loaded (as done in GIMP). That would mean passing |
|
It would be nice to then also have a percentage progress indicator, but that quickly becomes tricky, because the generic |
|
You could extend (you'd need to include gui/splash.h and common/darktable.h) |
|
A minor addition (no progress, the display is so fast anyway...). We now see the loading iop & utility module. |
a79d295 to
73616ef
Compare
Also add the loading information into the verbose debug output.
73616ef to
fffdbf1
Compare
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.
Remove all static routines and move the needed variable into darktable struct (dt_splash_t).
Do not use a dialog but instead a simple top level window.
Remove code for the exit window. Not activated/implemented and if we need to implement this we can recover the code from history.