Bug 151403 - Crashed trying to save a image downloaded from the camera
Summary: Crashed trying to save a image downloaded from the camera
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Tags-Rating (show other bugs)
Version: 0.9.2
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-26 20:53 UTC by greatbunzinni
Modified: 2017-08-08 10:45 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 0.9.3


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description greatbunzinni 2007-10-26 20:53:59 UTC
Version:           0.9.2 (using KDE KDE 3.5.7)
Installed from:    Ubuntu Packages

Digikam crashes when the user tries to save a image which is being showned by digikam's image viewer and that was loaded directly from the camera. The crash can be reproduce by following these steps:

- connect a camera which has photos stored in it's memory
- launch digikam
- read the camera's content (in my case, "camera"->"USB PTP class camera")
- open an image file by clicking on a thumbnail
- on the digikam's image viewer, save the file as "file"->"save as".
- digikam crashes in a fiery ball of evil flames of fail.


Here is the crash backtrace:
(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 47164845506752 (LWP 11533)]
[New Thread 1090525520 (LWP 11579)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[KCrash handler]
#5  0x00002ae561295c13 in Digikam::ImageInfo::rating ()
   from /usr/lib/libdigikam.so.0
#6  0x00002ae5612a247e in Digikam::MetadataHub::load ()
   from /usr/lib/libdigikam.so.0
#7  0x00002ae56144a64a in Digikam::ImageWindow::saveAs ()
   from /usr/lib/libdigikam.so.0
#8  0x00002ae5614486ab in Digikam::EditorWindow::qt_invoke ()
   from /usr/lib/libdigikam.so.0
#9  0x00002ae561448b0d in Digikam::ImageWindow::qt_invoke ()
   from /usr/lib/libdigikam.so.0
#10 0x00002ae566c8cd76 in QObject::activate_signal ()
   from /usr/lib/libqt-mt.so.3
#11 0x00002ae566c8d910 in QObject::activate_signal ()
   from /usr/lib/libqt-mt.so.3
#12 0x00002ae564fb194d in KAction::slotPopupActivated ()
   from /usr/lib/libkdeui.so.4
#13 0x00002ae564fb1bf3 in KAction::qt_invoke () from /usr/lib/libkdeui.so.4
#14 0x00002ae566c8cd76 in QObject::activate_signal ()
   from /usr/lib/libqt-mt.so.3
#15 0x00002ae566ffae51 in QSignal::signal () from /usr/lib/libqt-mt.so.3
#16 0x00002ae566cabeeb in QSignal::activate () from /usr/lib/libqt-mt.so.3
#17 0x00002ae566dabbbc in QPopupMenu::mouseReleaseEvent ()
   from /usr/lib/libqt-mt.so.3
#18 0x00002ae566cc14c4 in QWidget::event () from /usr/lib/libqt-mt.so.3
#19 0x00002ae566c282a2 in QApplication::internalNotify ()
   from /usr/lib/libqt-mt.so.3
#20 0x00002ae566c2a400 in QApplication::notify () from /usr/lib/libqt-mt.so.3
#21 0x00002ae5658b0248 in KApplication::notify ()
   from /usr/lib/libkdecore.so.4
#22 0x00002ae566bbad84 in QApplication::sendSpontaneousEvent ()
   from /usr/lib/libqt-mt.so.3
#23 0x00002ae566bb96b1 in QETWidget::translateMouseEvent ()
   from /usr/lib/libqt-mt.so.3
#24 0x00002ae566bb7b5a in QApplication::x11ProcessEvent ()
   from /usr/lib/libqt-mt.so.3
#25 0x00002ae566bce43e in QEventLoop::processEvents ()
   from /usr/lib/libqt-mt.so.3
#26 0x00002ae566c417e7 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#27 0x00002ae566c415ef in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#28 0x00002ae566c29d68 in QApplication::exec () from /usr/lib/libqt-mt.so.3
#29 0x00000000004034ce in main ()
Comment 1 caulier.gilles 2007-12-04 11:35:01 UTC
SVN commit 733624 by cgilles:

digiKam from KDE3 branch : fix crash during SaveAs when editor is started from CameraGui to show picture.
There is no ImageInfo instance available to store digiKam properties in image metadata.


 M  +9 -5      imagewindow.cpp


--- branches/extragear/kde3/graphics/digikam/utilities/imageeditor/editor/imagewindow.cpp #733623:733624
@@ -866,11 +866,15 @@

 bool ImageWindow::saveAs()
 {
-    // Write metadata from database to DImg
-    MetadataHub hub;
-    hub.load(d->imageInfoCurrent);
-    DImg image(m_canvas->currentImage());
-    hub.write(image, MetadataHub::FullWrite);
+    // If image editor is started from CameraGUI, there is no ImageInfo instance to use.
+    if (d->imageInfoCurrent)
+    {
+        // Write metadata from database to DImg
+        MetadataHub hub;
+        hub.load(d->imageInfoCurrent);
+        DImg image(m_canvas->currentImage());
+        hub.write(image, MetadataHub::FullWrite);
+    }

    return ( startingSaveAs(d->urlCurrent) );
 }
Comment 2 caulier.gilles 2007-12-04 11:35:44 UTC
This bug is fixed too in KDE4

Gilles