Bug 89541

Summary: Exporting to HTML from Digikam doesn't seem to work due to unsafe thread access
Product: [Applications] digikam Reporter: Teemu Rytilahti <tpr>
Component: Plugin-Generic-HTMLGalleryAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: major CC: caulier.gilles
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 5.7.0
Sentry Crash Report:

Description Teemu Rytilahti 2004-09-15 07:31:41 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources

Exporting to HTML seems to be very slow or it doesn't actually try to do anything. Last night it had 8 hours to generate the thumbnails, but it was unable to create even the thumbnail of the first image.
Comment 1 Teemu Rytilahti 2004-09-15 18:32:38 UTC
Oh. When the thumbnail creation starts, I get this message to the console:
Xlib: unexpected async reply (sequence 0x14764)!

Renchi Raju said that it'd happen when the threads are trying to access the main window.
Comment 2 Renchi Raju 2004-09-15 19:07:05 UTC
i had a look at the plugin and the threading implementation is all wrong, with access to the main GUI being made in a separate thread. this by itself will cause random crashes. but what makes it a very serious bug is that in digikam for eg, the retrieval of information for images and imagecollections comes from the database and accessing the database from a separate thread (which this plugin does) can potentially corrupt the database and lead to loss of data (i can see plenty of internal database errors being printed out when the plugin is running) so i'm upgrading the severity level to major.
please note, this might not be always be reproducible because thats the nature of threaded code.
Comment 3 caulier.gilles 2004-09-24 14:49:57 UTC
Imagegallery and CdArchiving threaded implementation fixed. Please try again !
Comment 4 Teemu Rytilahti 2004-09-27 16:46:42 UTC
Well, your "first" commit didn't fix it completely, but the latter did. Thank you :)
Comment 5 caulier.gilles 2004-09-27 16:53:04 UTC
Hum, not completly fixed...

I have tested this week 10 HTML expot and CDarchiving (with html interface) using the threaded implementation. I have to see some crash.

My recent fix have very reduced the crash context but not completly fixed that.

So i have decided to remove the threaded capability in this plugins. The GUI reactivity is lesser, but the implementation will be certainly better stable.

This plugin needed a complete rewrite a best threading support. We will do that later (need to do an XHTML export or a 'Gallery' program support).

Regards

Gilles Caulier
Comment 6 caulier.gilles 2017-07-09 13:15:58 UTC
This problem is not reproducible with current HTML Gallery tool implemented in digiKam core.

Gilles Caulier