GUI stops responding after lua callback is triggered
To reproduce the bug¶
- Add the 'select images with given color label' example from the blog to the
- Assign a shortcut
- Import more than 15 images
- mark several images with red color label
- Activate the callback with the shortcut
Darktable stops responding: none of the GUI elements respond, window refreshing does not work.
'killall darktable' or <CTRL-C> (if started from terminal) the only way to quit.
uname -a: Linux L-teszt 3.11.0-13-generic #20-Ubuntu SMP Wed Oct 23 07:38:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
darktable version: 1.3+1389~gc83cc58
lua : fix bug #9682
we properly release the lua lock and take the gtk lock
when updating the selection
#1 Updated by Jérémy Rosen over 5 years ago
- Status changed from New to In Progress
- % Done changed from 0 to 50
I can't reproduce what you describe... I don't see a freez but a crash (which is worse)
can you reproduce with today's git ? there have been some recent changes in the way lua deals with the gui thread...
#2 Updated by Jérémy Rosen over 5 years ago
note to self :
lua uses dt_selection_toggle to set the image, each call to this function tries to update a hint message which assumes that the gdk lock is held.
I need to implement a new dt_selection_set(glist*) function that would set the list without updating the hint.
#3 Updated by Attila Gróf over 5 years ago
I used virtualbox VM with a single CPU for the initial test.In this round:
- I have updated to the latest version (1.3+1413~g722fd01) from the unstable repository.
- It worked fine with 40+ images in the database with in the virtual machine.
I have also executed tests with 5500 images in the DB.
: worked fine.
: The callback function was completed and the GUI is responsive while the callback function is running (I have added dt.print_error to the loop to print an attribute for each image, therefore the callback execution lasts for cca 30 secs). Darktable freezes after the callback function is completed.
It crashed only once for me with the single CPU VM. Darktable printed an error message that it is not able to start gdb right before the crash. It also claimed that a backtrace file in /tmp was created, however there was no such file. I use the default core dump settings of lubuntu which is 'no core dump' as far as I know.
#9 Updated by Jérémy Rosen over 5 years ago
Ok, I have fixed that for the single CPU case.
the single cpu case was actually triggering something serious but hard to trigger with multiple CPU, thx for reporting it
could you confirm that everything is fine with latest git on your side ?
after that i'll close the bug