-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix darktable.gui initializing and cleanup #20070
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?
Fix darktable.gui initializing and cleanup #20070
Conversation
|
So I was curious why the gui needed any mutexes. "Intuitively" the gui object would only be accessed in the gui thread (but obviously, there could be exceptions (that might still benefit from rewriting using signals, but anyway)). Doing a search, the mutex seems to only "protect" the darktable.gui is initialised early "ensure that we can load the Gtk theme early enough that the splash screen..." but then, the value of gui->gtkrc that is set during that early Don't know where the last module group in darkroom is initialised? I see |
Concur. So the mutex can be removed (if one wanted to be extra-sure to avoid races on |
632f65f to
0394ff5
Compare
|
Focus_peaking yes, but also
Neither me but as darktable.gui was memset zero later that idea was not working anyway :-) |
Presumably those were meant to make sure they picked up the latest versions of focus peaking. They also run in the gui thread only. Presumably focus peaking was originally implemented in the pipe so it may have had a purpose at some point, but not now as far as I can tell. |
|
So let's remove this mutex on early cycle for 5.6 to have some field testing. But as said here, a mutex for something only in GUI thread is not needed so we should be safe. |
|
oki, doki |
1. We don't want to clear darktable.gui in dt_gui_gtk_init() as we did that via calloc very early. Some things have been set up so far, one example is the last module group in darkroom. 2. There is no reason for the protecting mutex as we do all gui data changing in main thread. 3. Avoid darktable.gui memleaks 4. dt_gui_gtk_init() possibly returns gboolean TRUE in case of an error
0394ff5 to
2358597
Compare
@wpferguson you might also want to check :-)