Summary: | showfoto crashes when doing any modification to a loaded directory | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Fabien <fabien.ubuntu> |
Component: | Showfoto-Workflow | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | ach, ahuggel, caulier.gilles, marcel.wiesweg |
Priority: | VHI | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 0.9.0 | |
Sentry Crash Report: | |||
Attachments: | patch to fix file-extention parsing when it's a null string |
Description
Fabien
2006-11-17 17:14:49 UTC
Not reproductible here. showfoto "Open Folder" run exactly like you want, normally. Witch KDE version you use ? Witch messages are you on the console ? Gilles Sorry, I wasn't precise enough. I opened a directory in command line, eg : # showfoto mydir/ Then, I will get a blank "photo". If then I apply any fix or filter, showfoto will crash : << QFile::open: No file name specified QFile::open: No file name specified showfoto: /tmp : RAW file identified showfoto: Cannot load metadata using Exiv2 (/tmp: The file contains data of an unknown image type) showfoto: Running dcraw command (digikamdcraw,-c,-w,-a,-H,0,-b,1,-q,0,-o,1,/tmp) showfoto: Dcraw StdErr: Cannot decode /tmp showfoto: Cannot load metadata using Exiv2 (/tmp: The file contains data of an unknown image type) Apply any filter or any fix then, crash KCrash: Application 'showfoto' crashing... >> I did more tests and the problem is the same if you try to open a directory in "File/Open" instead of "File/Open folder". But, the problem is not only that : - if you open from cmdline any unsupported file or even a file that doesn't exist, you will get the same problem. Eg : <<< QFile::open: No file name specified QFile::open: No file name specified showfoto: /etc/passwd : RAW file identified showfoto: Cannot load metadata using Exiv2 (/etc/passwd: The file contains data of an unknown image type) showfoto: Running dcraw command (digikamdcraw,-c,-w,-a,-H,0,-b,1,-q,0,-o,1,/etc/passwd) showfoto: Dcraw StdErr: Cannot decode /etc/passwd showfoto: Cannot load metadata using Exiv2 (/etc/passwd: The file contains data of an unknown image type) kio_digikamthumbnail: Cannot load metadata using Exiv2 (/etc/passwd: The file contains data of an unknown image type) kio_digikamthumbnail: Running dcraw command dcraw -c -e '/etc/passwd' sh: dcraw: command not found kio_digikamthumbnail: Running dcraw command dcraw -c -h -w -a '/etc/passwd' sh: dcraw: command not found kio_digikamthumbnail: Running dcraw command dcraw -c -e '/etc/passwd' sh: dcraw: command not found kio_digikamthumbnail: Running dcraw command dcraw -c -h -w -a '/etc/passwd' sh: dcraw: command not found kio_digikamthumbnail: /etc/passwd : RAW file identified kio_digikamthumbnail: Cannot load metadata using Exiv2 (/etc/passwd: The file contains data of an unknown image type) kioslave: ####### CRASH ###### protocol = kio_digikamthumbnail pid = 30395 signal = 11 >>> I also made some tests with a false jpeg file. Just create a text file and name it textfile.jpg Open digikam ImageEditor on an invalid picture (textfile.jpg), you'll get an error : Failed to load image "textfile.jpg" But, this doesn't prevent you to apply any filter or fix <<< digikam: Cannot load metadata using Exiv2 (/home/fabien/Photos/2006-11-18_tests/test_ixus/textfile.jpg: The file contains data of an unknown ima ge type) QFile::open: No file name specified QFile::open: No file name specified digikam: /home/fabien/Photos/2006-11-18_tests/test_ixus/textfile.jpg : JPEG file identified digikam: Cannot load metadata using Exiv2 (/home/fabien/Photos/2006-11-18_tests/test_ixus/textfile.jpg: The file contains data of an unknown ima ge type) digikam: WARNING: [Digikam::DImg* Digikam::DImgInterface::getImg()] d->image is NULL digikam: Cannot load metadata using Exiv2 (/home/fabien/Photos/2006-11-18_tests/test_ixus/textfile.jpg: The file contains data of an unknown ima ge type) digikam: WARNING: Failed to load image textfile.jpg digikam: WARNING: [Digikam::DImg* Digikam::DImgInterface::getImg()] d->image is NULL digikam: CimgIface::m_resize is on, new size: (0, 0) digikam: ::No valid image data !!! ... digikam: WARNING: [Digikam::DImg* Digikam::DImgInterface::getImg()] d->image is NULL digikam: WARNING: [Digikam::DImg* Digikam::DImgInterface::getImg()] d->image is NULL digikam: Reading LensDistortion settings digikam: Preview lensdistortion started... digikam: WARNING: [Digikam::DImg* Digikam::DImgInterface::getImg()] d->image is NULL KCrash: Application 'digikam' crashing... >>> These file must be fixed before final release. Gilles Marcel, - Why 'etc/passwd' is identified like a RAW file ? - Something is wrong in DImg::RAWLoader because dcraw fail to decode '/etc/passwd' of course, but the loader do not return false in this case... Gilles > - Why 'etc/passwd' is identified like a RAW file ?
Achim, this point is fixed on my computer. Because there is a lot of changes, i'm waiting 0.9.0-RC1 release before to commit.
Gilles
Created attachment 18644 [details]
patch to fix file-extention parsing when it's a null string
Fabien,
attached, a fresh patch against svn to test. Take a care than kio-slave are
fixed. You need to re-install all on your computer.
Gilles
Marcel, My current patch do not solve the RAWLoader problem if we trying to load a dumy raw file. The loader do not return the right value when dcraw decoding is failed. Note: do not apply my patch to debug RAWoader, because it catch the problem... Gilles It looks ok for me : 1) # showfoto /etc/passwd QFile::open: No file name specified QFile::open: No file name specified showfoto: /etc/passwd : QIMAGE file identified showfoto: Cannot loading "/etc/passwd" using DImg::QImageLoader! kio_digikamthumbnail: /etc/passwd : QIMAGE file identified kio_digikamthumbnail: Cannot loading "/etc/passwd" using DImg::QImageLoader! kio_digikamthumbnail: No relevant plugin found kio_digikamthumbnail: WARNING: Cannot create thumbnail for /etc/passwd And I can't do any action 2) # showfoto /etc QFile::open: No file name specified QFile::open: No file name specified showfoto: [static Digikam::DImg::FORMAT Digikam::DImg::fileFormat(const QString&)] Failed to read header of file "/etc" showfoto: /etc : Unknown image format !!! kio_digikamthumbnail: [static Digikam::DImg::FORMAT Digikam::DImg::fileFormat(const QString&)] Failed to read header of file "/etc" kio_digikamthumbnail: [static Digikam::DImg::FORMAT Digikam::DImg::fileFormat(const QString&)] Failed to read header of file "/etc" kio_digikamthumbnail: /etc : Unknown image format !!! kio_digikamthumbnail: No relevant plugin found kio_digikamthumbnail: WARNING: Cannot create thumbnail for /etc showfoto: WARNING: Failed to load image etc showfoto: WARNING: [Digikam::DImg* Digikam::DImgInterface::getImg()] d->image is NULL showfoto: [static Digikam::DImg::FORMAT Digikam::DImg::fileFormat(const QString&)] Failed to read header of file "/etc" showfoto: [static Digikam::DImg::FORMAT Digikam::DImg::fileFormat(const QString&)] Failed to read header of file "/etc" And I can't do any action 3) # showfoto textfile.jpg QFile::open: No file name specified QFile::open: No file name specified showfoto: /home/tests/Pictures/test02/textfile.jpg : JPEG file identified showfoto: Cannot load metadata using Exiv2 (/home/tests/Pictures/test02/textfile.jpg: The file contains data of an unknown image type) kio_digikamthumbnail: Cannot load metadata using Exiv2 (/home/tests/Pictures/test02/textfile.jpg: The file contains data of an unknown image type) kio_digikamthumbnail: /home/tests/Pictures/test02/textfile.jpg : JPEG file identified kio_digikamthumbnail: Cannot load metadata using Exiv2 (/home/tests/Pictures/test02/textfile.jpg: The file contains data of an unknown image type) kio_digikamthumbnail: No relevant plugin found kio_digikamthumbnail: WARNING: Cannot create thumbnail for /home/tests/Pictures/test02/textfile.jpg showfoto: WARNING: Failed to load image textfile.jpg showfoto: WARNING: [Digikam::DImg* Digikam::DImgInterface::getImg()] d->image is NULL showfoto: Cannot load metadata using Exiv2 (/home/tests/Pictures/test02/textfile.jpg: The file contains data of an unknown image type) And I can't do any action 4) Digikam Image Editor on textfile.jpg kio_digikamthumbnail: Cannot load metadata using Exiv2 (/home/tests/Pictures/test02/textfile.jpg: The file contains data of an unknown image type) kio_digikamthumbnail: /home/tests/Pictures/test02/textfile.jpg : JPEG file identified kio_digikamthumbnail: Cannot load metadata using Exiv2 (/home/tests/Pictures/test02/textfile.jpg: The file contains data of an unknown image type) kio_digikamthumbnail: No relevant plugin found kio_digikamthumbnail: WARNING: Cannot create thumbnail for /home/tests/Pictures/test02/textfile.jpg kio_digikampreview: Exif Orientation: 1 digikam: WARNING: Trying to append a Metadata item for an unknown key (no ItemInfo): EXIF comment kio (KIOConnection): ERROR: Could not write data digikam: Cannot load metadata using Exiv2 (/home/tests/Pictures/test02/textfile.jpg: The file contains data of an unknown image type) digikam: Cannot load metadata using Exiv2 (/home/tests/Pictures/test02/textfile.jpg: The file contains data of an unknown image type) QFile::open: No file name specified QFile::open: No file name specified digikam: /home/tests/Pictures/test02/textfile.jpg : JPEG file identified digikam: Cannot load metadata using Exiv2 (/home/tests/Pictures/test02/textfile.jpg: The file contains data of an unknown image type) digikam: /home/tests/Pictures/test02/textfile.jpg : JPEG file identified digikam: Cannot load metadata using Exiv2 (/home/tests/Pictures/test02/textfile.jpg: The file contains data of an unknown image type) kio_digikampreview: Cannot load metadata using Exiv2 (/home/tests/Pictures/test02/textfile.jpg: The file contains data of an unknown image type) kio_digikampreview: WARNING: Cannot extract preview for /home/tests/Pictures/test02/textfile.jpg digikam: WARNING: Failed to load image textfile.jpg digikam: WARNING: [Digikam::DImg* Digikam::DImgInterface::getImg()] d->image is NULL digikam: Cannot load metadata using Exiv2 (/home/tests/Pictures/test02/textfile.jpg: The file contains data of an unknown image type) digikam: WARNING: Failed to load image textfile.jpg digikam: WARNING: [Digikam::DImg* Digikam::DImgInterface::getImg()] d->image is NULL And I can't do any action Fabien, In the report #4, there are 2 bad points that i can reproduce here : > digikam: WARNING: Trying to append a Metadata item for an unknown key (no ItemInfo): EXIF comment Strange, normally it's "EXIFUserComment", not "EXIF comment". I suspect a KFileMetaInfo bug, but not sure. In all cal this not come from digiKam and Exiv2 library. > kio (KIOConnection): ERROR: Could not write data I suspect a crash of KIO-slave (preview kioslave not thumnail kioslave) This one will be automaticly restarted, but if you use intensivly this KIO-slave and if a crash appear, there is a risk to crash digiKam. I think that it's a C++ exception management problem. Something is wrong somewhere, perhaps in Exiv2 when a dummy file is parsed. Andreas, are you tested the libexiv2 (not Exiv2 command line tool) with a dummy jpeg file (for example to do "#touch dumy.jpg") Gilles > Andreas, are you tested the libexiv2 (not Exiv2 command line tool) with a dummy jpeg file (for example to do "#touch dumy.jpg")
It shouldn't make a difference. Class Exiv2::Image (and derived) take care of that. Exiv2 looks for a signature in the file to determine the image type (it doesn't care about the filename).
-ahu.
Thanks andreas, i will look witch part in kioslave crash. Gilles Here is the patch for the rawloader problem. KProcess::normalExit() does not cover a normal exit with return status != 0. Index: libs/dimg/loaders/rawloader.cpp =================================================================== --- libs/dimg/loaders/rawloader.cpp (revision 606518) +++ libs/dimg/loaders/rawloader.cpp (working copy) @@ -392,7 +392,7 @@ QMutexLocker lock(&m_mutex); m_running = false; - m_normalExit = m_process->normalExit(); + m_normalExit = m_process->normalExit() && m_process->exitStatus() == 0; delete m_process; m_process = 0; delete m_queryTimer; Both patch have been commited to svn. I close this file now. Gilles |