| Summary: | Digikam crash when assigning a new tag to a large number of photos | ||
|---|---|---|---|
| Product: | [Applications] digikam | Reporter: | krienke |
| Component: | Tags-Engine | Assignee: | Digikam Developers <digikam-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | crash | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | openSUSE | ||
| OS: | NetBSD | ||
| Latest Commit: | Version Fixed/Implemented In: | 7.6.0 | |
| Sentry Crash Report: | |||
| Attachments: | Try to fix crash | ||
|
Description
krienke
2007-02-13 08:35:39 UTC
Does it crash if you assign the tag by selecting all images and adding the tag from the "Comments/tags" tab of the right sidebar? Does it crash if you drag-and-drop the other way, dragging all selected pictures on the tag in the left or right sidebar? Am Dienstag, 13. Februar 2007 schrieb Marcel Wiesweg:
> ------- Additional Comments From marcel.wiesweg gmx de 2007-02-13 19:08
> ------- Does it crash if you assign the tag by selecting all images and
> adding the tag from the "Comments/tags" tab of the right sidebar? Does it
> crash if you drag-and-drop the other way, dragging all selected pictures on
> the tag in the left or right sidebar?
No it does not crash in these situations. Only if I drag the tag one photo and
then say "assign tag to all photos".
However I found out one more thing. By default I have activated the option to
store tags in the photos IPTC metadata. If I turn this option of in digikams
setup then the crash does no longer happen.
Rainer
Created attachment 19691 [details]
Try to fix crash
Still not reproducible here...I have three ideas:
- recompile with --enable-debug, run digikam under gdb and provide a backtrace
(instructions in HACKING file)
- try if the attached patch fixes the problem
- in your debug log, there are the lines
digikam: WARNING: No album found for ID: 4915295 // take the ID shown here
digikam: ==> Comment:
digikam: ==> Rating: 0
(null) ==> Keywords: Leute
This is probably the problem! Please check then if there is such an image in
your database:
sqlite3 <your library path>/digikam3.db "SELECT Albums.url, Images.name FROM
Images JOIN Albums ON Images.dirid = Albums.id WHERE Images.id=<ID from debug
log>;
Am Mittwoch, 14. Februar 2007 schrieb Marcel Wiesweg: > - recompile with --enable-debug, run digikam under gdb and provide a > backtrace (instructions in HACKING file) > - try if the attached patch fixes the problem > - in your debug log, there are the lines Ok, I did. Here are the last lines up to the crash: (gdb) run Starting program: /opt/kde3/bin/digikam Failed to read a valid object file image from memory. [Thread debugging using libthread_db enabled] [New Thread -1245612336 (LWP 26130)] [New Thread -1247687792 (LWP 26149)] [New Thread -1256080496 (LWP 26150)] [Thread -1247687792 (LWP 26149) exited] [Thread -1256080496 (LWP 26150) exited] digikam: ScanLib: Nach nicht existierenden Alben suchen: 3632 ms digikam: ScanLib: Nach Einträgen, die nicht in der Datenbank oder auf der Festpl atte sind, suchen: 9828 ms digikam: ScanLib: Einträge ohne Datum werden aktualisiert: 76 ms digikam: Found dcraw version: 8.41 KIPI (loading): WARNING: KIPI::PluginLoader:: createInstanceFromLibrary returned 0 for MPEG-Encoder (kipiplugin_mpegencoder) with error number 3 KIPI (loading): WARNING: KLibLoader says: Bibliotheksdateien <b>kipiplugin_mpege ncoder.la</b> sind nicht in den Pfaden auffindbar. digikam: ImagePlugin_Core plugin loaded digikam: ImagePluginLoader: Loaded plugin ImagePlugin_Core digikam: ImagePlugin_RainDrop plugin loaded ... ... digikam: Dirty: / digikam: Dirty: /rainer/tmp digikam: /home/family/photos/rainer/tmp/dsc_2579.jpg ==> Comment: digikam: /home/family/photos/rainer/tmp/dsc_2579.jpg ==> Rating: 0 /home/family/photos/rainer/tmp/dsc_2579.jpg ==> Keywords: Menschen digikam: /home/family/photos/rainer/tmp/dsc_2580.jpg ==> Comment: digikam: /home/family/photos/rainer/tmp/dsc_2580.jpg ==> Rating: 0 /home/family/photos/rainer/tmp/dsc_2580.jpg ==> Keywords: Menschen digikam: /home/family/photos/rainer/tmp/dsc_2581.jpg ==> Comment: digikam: /home/family/photos/rainer/tmp/dsc_2581.jpg ==> Rating: 0 /home/family/photos/rainer/tmp/dsc_2581.jpg ==> Keywords: Menschen digikam: /home/family/photos/rainer/tmp/dsc_2584.jpg ==> Comment: digikam: /home/family/photos/rainer/tmp/dsc_2584.jpg ==> Rating: 0 /home/family/photos/rainer/tmp/dsc_2584.jpg ==> Keywords: Menschen digikam: Dirty: /rainer/tmp digikam: /home/family/photos/rainer/tmp/dsc_2585.jpg ==> Comment: digikam: /home/family/photos/rainer/tmp/dsc_2585.jpg ==> Rating: 0 /home/family/photos/rainer/tmp/dsc_2585.jpg ==> Keywords: Menschen digikam: /home/family/photos/rainer/tmp/dsc_2586.jpg ==> Comment: digikam: /home/family/photos/rainer/tmp/dsc_2586.jpg ==> Rating: 0 /home/family/photos/rainer/tmp/dsc_2586.jpg ==> Keywords: Menschen digikam: /home/family/photos/rainer/tmp/dsc_2587.jpg ==> Comment: digikam: /home/family/photos/rainer/tmp/dsc_2587.jpg ==> Rating: 0 /home/family/photos/rainer/tmp/dsc_2587.jpg ==> Keywords: Menschen digikam: Dirty: / digikam: /home/family/photos/rainer/tmp/dsc_2588.jpg ==> Comment: Die Republic Street digikam: /home/family/photos/rainer/tmp/dsc_2588.jpg ==> Rating: 0 /home/family/photos/rainer/tmp/dsc_2588.jpg ==> Keywords: Menschen QDateTime::fromString: Parameter out of range Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1245612336 (LWP 26130)] 0xb670c907 in QString::operator+= () from /usr/lib/qt3/lib/libqt-mt.so.3 Then I took a look at the photo dsc_2588.jpg with exiv2: Filename : dsc_2588.jpg Filesize : 1500216 Bytes Camera make : NIKON CORPORATION Camera model : NIKON D70 Image timestamp : 2006:10:07 10:28:50 Image number : Exposure time : 1/90 s Aperture : F8 Exposure bias : +1/2 Flash : No flash Flash bias : Focal length : 48.0 mm (35 mm equivalent: 72.0 mm) Subject distance: ISO speed : 200 Exposure mode : Aperture priority Metering mode : Multi-segment Macro mode : Image quality : NORMAL Exif Resolution : 2000 x 3008 White balance : AUTO Thumbnail : JPEG, 3983 Bytes Copyright : Exif comment : Die Republic Street I cannot anything wrong in this file. > > digikam: WARNING: No album found for ID: 4915295 // take the ID shown here > digikam: ==> Comment: > digikam: ==> Rating: 0 > (null) ==> Keywords: Leute This message happened only one time I do not see it any longer. But the crash still happens each and every time I assign a tag to all the photos. So this is probably not the reason. Rainer Sorry in my report yesterday I forgot the backtrace :-( . Well I tried again
and this time (on another host with not 100% the same photos) and I did a
backtrace. By the this time there are again the messages "No album found for
ID: 7471215". But using the SQL-statement you gave to me a query for an id
like the one above results in an empty string.
(gdb) run
....
digikam: WARNING: No album found for ID: 3080307
digikam: ==> Comment:
digikam: ==> Rating: 0
(null) ==> Keywords: Orte/Uni
digikam: WARNING: No album found for ID: 7471215
digikam: ==> Comment:
digikam: ==> Rating: 0
(null) ==> Keywords: Orte/Uni
digikam: WARNING: No album found for ID: 7471215
digikam: ==> Comment:
digikam: ==> Rating: 0
(null) ==> Keywords: Orte/Uni
digikam: WARNING: No album found for ID: 3080307
digikam: ==> Comment:
digikam: ==> Rating: 0
(null) ==> Keywords: Orte/Uni
digikam: WARNING: No album found for ID: 3080307
digikam: ==> Comment:
digikam: ==> Rating: 0
(null) ==> Keywords: Orte/Uni
digikam: Dirty: /
digikam: WARNING: No album found for ID: 7536741
digikam: ==> Comment:
digikam: ==> Rating: 0
(null) ==> Keywords: Orte/Asien,Orte/Uni
digikam: WARNING: No album found for ID: 7471215
digikam: ==> Comment:
digikam: ==> Rating: 0
(null) ==> Keywords: Orte/Uni
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1245804848 (LWP 21808)]
0xb66dd907 in QString::operator+= () from /usr/lib/qt3/lib/libqt-mt.so.3
(gdb) bt
#0 0xb66dd907 in QString::operator+= () from /usr/lib/qt3/lib/libqt-mt.so.3
#1 0x0804b1ec in operator+ (s1=@0xbfe40f04, s2=@0x86179cc)
at /usr/lib/qt3/include/qstring.h:1038
#2 0xb7cf8bbf in Digikam::ImageInfo::filePath (this=0x86179c0)
at imageinfo.cpp:185
#3 0xb7c9d8b0 in Digikam::AlbumIconView::changeTagOnImageInfos (
this=0x81386b8, list=@0xbfe4144c, tagIDs=@0xbfe41448, addOrRemove=true,
progress=true) at albumiconview.cpp:1335
#4 0xb7c9f46d in Digikam::AlbumIconView::contentsDropEvent (this=0x81386b8,
event=0xbfe418ec) at albumiconview.cpp:1212
#5 0xb651be47 in QScrollView::viewportDropEvent ()
from /usr/lib/qt3/lib/libqt-mt.so.3
#6 0xb651d12a in QScrollView::eventFilter ()
from /usr/lib/qt3/lib/libqt-mt.so.3
#7 0xb6407ccc in QObject::activate_filters ()
from /usr/lib/qt3/lib/libqt-mt.so.3
#8 0xb6407d3b in QObject::event () from /usr/lib/qt3/lib/libqt-mt.so.3
#9 0xb6440e3c in QWidget::event () from /usr/lib/qt3/lib/libqt-mt.so.3
#10 0xb63a9647 in QApplication::internalNotify ()
from /usr/lib/qt3/lib/libqt-mt.so.3
#11 0xb63aa4f9 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3
#12 0xb6b212b2 in KApplication::notify () from /opt/kde3/lib/libkdecore.so.4
#13 0xb63548c9 in qt_handle_xdnd_drop () from /usr/lib/qt3/lib/libqt-mt.so.3
#14 0xb6354a97 in QDragManager::drop () from /usr/lib/qt3/lib/libqt-mt.so.3
#15 0xb6356981 in QDragManager::eventFilter ()
from /usr/lib/qt3/lib/libqt-mt.so.3
#16 0xb63a960b in QApplication::internalNotify ()
from /usr/lib/qt3/lib/libqt-mt.so.3
#17 0xb63aa641 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3
#18 0xb6b212b2 in KApplication::notify () from /opt/kde3/lib/libkdecore.so.4
#19 0xb63490f7 in QETWidget::translateMouseEvent ()
from /usr/lib/qt3/lib/libqt-mt.so.3
#20 0xb634801f in QApplication::x11ProcessEvent ()
from /usr/lib/qt3/lib/libqt-mt.so.3
#21 0xb635891a in QEventLoop::processEvents ()
#22 0xb63c00e0 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3
#23 0xb63a8f7f in QApplication::enter_loop ()
from /usr/lib/qt3/lib/libqt-mt.so.3
#24 0xb63566d6 in QDragManager::drag () from /usr/lib/qt3/lib/libqt-mt.so.3
#25 0xb63b7376 in QDragObject::drag () from /usr/lib/qt3/lib/libqt-mt.so.3
#26 0xb63b7099 in QDragObject::drag () from /usr/lib/qt3/lib/libqt-mt.so.3
#27 0xb7e0a3f4 in Digikam::TAlbumListView::startDrag (this=0x8262d58)
at talbumlistview.cpp:229
#28 0xb64ec0c8 in QListView::contentsMouseMoveEvent ()
from /usr/lib/qt3/lib/libqt-mt.so.3
#29 0xb7e0a7b7 in Digikam::TAlbumListView::contentsMouseMoveEvent (
this=0x8262d58, e=0xbfe422e4) at talbumlistview.cpp:138
#30 0xb651fcb1 in QScrollView::viewportMouseMoveEvent ()
from /usr/lib/qt3/lib/libqt-mt.so.3
#31 0xb651d1c3 in QScrollView::eventFilter ()
from /usr/lib/qt3/lib/libqt-mt.so.3
#32 0xb64eafd6 in QListView::eventFilter ()
from /usr/lib/qt3/lib/libqt-mt.so.3
#33 0xb6407ccc in QObject::activate_filters ()
from /usr/lib/qt3/lib/libqt-mt.so.3
#34 0xb6407d3b in QObject::event () from /usr/lib/qt3/lib/libqt-mt.so.3
#35 0xb6440e3c in QWidget::event () from /usr/lib/qt3/lib/libqt-mt.so.3
#36 0xb63a9647 in QApplication::internalNotify ()
from /usr/lib/qt3/lib/libqt-mt.so.3
#37 0xb63aa641 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3
#38 0xb6b212b2 in KApplication::notify () from /opt/kde3/lib/libkdecore.so.4
#39 0xb63490f7 in QETWidget::translateMouseEvent ()
from /usr/lib/qt3/lib/libqt-mt.so.3
#40 0xb634801f in QApplication::x11ProcessEvent ()
from /usr/lib/qt3/lib/libqt-mt.so.3
#41 0xb635891a in QEventLoop::processEvents ()
from /usr/lib/qt3/lib/libqt-mt.so.3
#42 0xb63c00e0 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3
#43 0xb63bff76 in QEventLoop::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#44 0xb63a900f in QApplication::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#45 0x0804afb8 in main (argc=-1208703828, argv=0xb5d243a2) at main.cpp:306
Rainer
Thanks for your debugging. It still seems that the ImageInfos list the method operates on is invalid, I dont think you have 7 million images ;-) This would explain the crash, it happens when a member variable of the invalid object is accessed. I don't know when and where the relevant object are deleted. I will commit the patch anyway because now that the UI is not locked while tags are applied, I can imagine situations where this list becomes invalid. But I cannot proof that the patch solves the problem. SVN commit 633912 by mwiesweg:
Pass a copy of current ImageInfo list to changeTagOnImageInfos
CCBUG: 141624
M +6 -6 albumiconview.cpp
--- trunk/extragear/graphics/digikam/digikam/albumiconview.cpp #633911:633912
@@ -1194,7 +1194,7 @@
i18n("Assign tag to pictures. Please wait..."));
// get selected image infos
- QPtrList<ImageInfo> infos = selectedImageInfos(false);
+ QPtrList<ImageInfo> infos = selectedImageInfos(true);
// add droppted item
AlbumIconItem *dropItem = findItem(event->pos());
if (dropItem)
@@ -1209,7 +1209,7 @@
emit signalProgressBarMode(StatusProgressBar::ProgressBarMode,
i18n("Assign tag to pictures. Please wait..."));
- changeTagOnImageInfos(allImageInfos(false), QValueList<int>() << tagID, true, true);
+ changeTagOnImageInfos(allImageInfos(true), QValueList<int>() << tagID, true, true);
emit signalProgressBarMode(StatusProgressBar::TextMode, QString::null);
break;
@@ -1275,7 +1275,7 @@
i18n("Assign tags to pictures. Please wait..."));
// get selected image infos
- QPtrList<ImageInfo> infos = selectedImageInfos(false);
+ QPtrList<ImageInfo> infos = selectedImageInfos(true);
// add droppted item
AlbumIconItem *dropItem = findItem(event->pos());
if (dropItem)
@@ -1290,7 +1290,7 @@
emit signalProgressBarMode(StatusProgressBar::ProgressBarMode,
i18n("Assign tags to pictures. Please wait..."));
- changeTagOnImageInfos(allImageInfos(false), tagIDs, true, true);
+ changeTagOnImageInfos(allImageInfos(true), tagIDs, true, true);
emit signalProgressBarMode(StatusProgressBar::TextMode, QString::null);
break;
@@ -1865,7 +1865,7 @@
emit signalProgressBarMode(StatusProgressBar::ProgressBarMode,
i18n("Assign tag to pictures. Please wait..."));
- changeTagOnImageInfos(selectedImageInfos(false), QValueList<int>() << tagID, true, true);
+ changeTagOnImageInfos(selectedImageInfos(true), QValueList<int>() << tagID, true, true);
emit signalProgressBarMode(StatusProgressBar::TextMode, QString::null);
}
@@ -1875,7 +1875,7 @@
emit signalProgressBarMode(StatusProgressBar::ProgressBarMode,
i18n("Remove tag from pictures. Please wait..."));
- changeTagOnImageInfos(selectedImageInfos(false), QValueList<int>() << tagID, false, true);
+ changeTagOnImageInfos(selectedImageInfos(true), QValueList<int>() << tagID, false, true);
emit signalProgressBarMode(StatusProgressBar::TextMode, QString::null);
}
<krienke@uni-koblenz.de>: > Thanks for the patch. I tried it and it solved the problem the crash does no > longer happen. Closing now. |