Summary: | RawEngine is crashing on decoding some sigma raw files | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Manfred Usselmann <usselmann.m> |
Component: | Plugin-DImg-RAW | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | caulier.gilles, lexa, usselmann.m |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/libkdcraw/655c5ac08726eee4219d0a8830953a22d7f3d371 | Version Fixed In: | 7.0.0 |
Sentry Crash Report: | |||
Attachments: |
Example file causing the crash
Proposed patch to fix double-free() on broken full-color images |
Description
Manfred Usselmann
2013-05-20 13:28:58 UTC
Created attachment 79973 [details]
Example file causing the crash
A example file causing the crash
1/ We need to know which libkdcraw/libraw versions you use. do to Help button from DNG converter for info. 2/ the crash is in libkdcraw, and probably in libraw, but it miss debug symbols to see where in code. Please install libkdcraw debug package and run dngconverter in gdb as it's explained here : http://www.digikam.org/contrib 3/ We need a Sigma raw file sample to try to reproduce here. Share it somewhere in web. Gilles Caulier (In reply to comment #2) > 1/ We need to know which libkdcraw/libraw versions you use. do to Help > button from DNG converter for info. LibRaw 0.15.0-Beta1 LibKdcraw 2.2.0 > 2/ the crash is in libkdcraw, and probably in libraw, but it miss debug > symbols to see where in code. Please install libkdcraw debug package and run > dngconverter in gdb as it's explained here : (gdb) run Starting program: /usr/bin/dngconverter warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7fffe24b2700 (LWP 29847)] [New Thread 0x7fffe1cb1700 (LWP 29848)] [New Thread 0x7fffd89f4700 (LWP 29849)] [New Thread 0x7fffcffff700 (LWP 29850)] [New Thread 0x7fffce765700 (LWP 29854)] [Thread 0x7fffe24b2700 (LWP 29847) exited] Corrupt JPEG data: 27 extraneous bytes before marker 0xd9 JPEG datastream contains no image /mnt/server/manfred/restore/Image-ExifTool-5.72/t/CanonRaw.crw: Unexpected end of file /mnt/server/manfred/restore/Image-ExifTool-5.72/t/Sigma.x3f: Unexpected end of file Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffce765700 (LWP 29854)] __GI___libc_free (mem=0x7fffcc28c010) at malloc.c:2892 2892 malloc.c: Datei oder Verzeichnis nicht gefunden. (gdb) bt #0 __GI___libc_free (mem=0x7fffcc28c010) at malloc.c:2892 #1 0x00007ffff74414eb in ?? () from /usr/lib/libkdcraw.so.22 #2 0x00007ffff7446905 in ?? () from /usr/lib/libkdcraw.so.22 #3 0x00007ffff742bae5 in KDcrawIface::KDcraw::loadHalfPreview(QImage&, QString const&) () from /usr/lib/libkdcraw.so.22 #4 0x00007ffff6fc703d in KIPIPlugins::KPRawThumbThread::run() () from /usr/lib/libkipiplugins.so.3 #5 0x00007ffff602cbec in QThreadPrivate::start (arg=0xd91b90) at thread/qthread_unix.cpp:338 #6 0x00007ffff71f6f8e in start_thread (arg=0x7fffce765700) at pthread_create.c:311 #7 0x00007ffff45eee1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113 > 3/ We need a Sigma raw file sample to try to reproduce here. Share it > somewhere in web. I already did attach it to this bug. Thanks, Manfred Alex, I can confirm that sample X3F image crash libraw on my computer : (gdb) bt #0 0x00007ffff2a39a65 in raise () from /lib64/libc.so.6 #1 0x00007ffff2a3b0c8 in abort () from /lib64/libc.so.6 #2 0x00007ffff2a7920b in __libc_message () from /lib64/libc.so.6 #3 0x00007ffff2a801d6 in _int_free () from /lib64/libc.so.6 #4 0x00007ffff6f87fb0 in LibRaw::recycle (this=this@entry=0x7fffc3175460) at /mnt/devel/GIT/3.x/extra/libkdcraw/libraw/src/libraw_cxx.cpp:410 #5 0x00007ffff6f89f44 in LibRaw::unpack (this=0x7fffc3175460) at /mnt/devel/GIT/3.x/extra/libkdcraw/libraw/src/libraw_cxx.cpp:1196 #6 0x00007ffff6f6d3a7 in KDcrawIface::KDcraw::loadHalfPreview (image=..., path=...) at /mnt/devel/GIT/3.x/extra/libkdcraw/libkdcraw/kdcraw.cpp:182 #7 0x00007ffff78cf7d2 in Digikam::ThumbnailCreator::createThumbnail (this=0x18c41b0, info=..., detailRect=...) at /mnt/devel/GIT/3.x/core/libs/threadimageio/thumbnailcreator.cpp:514 #8 0x00007ffff78ce21d in Digikam::ThumbnailCreator::load (this=0x18c41b0, path=..., rect=..., pregenerate=false) at /mnt/devel/GIT/3.x/core/libs/threadimageio/thumbnailcreator.cpp:260 #9 0x00007ffff78cde46 in Digikam::ThumbnailCreator::load (this=0x18c41b0, path=...) at /mnt/devel/GIT/3.x/core/libs/threadimageio/thumbnailcreator.cpp:199 #10 0x00007ffff78dce16 in Digikam::ThumbnailLoadingTask::execute (this=0x27ff520) at /mnt/devel/GIT/3.x/core/libs/threadimageio/thumbnailtask.cpp:172 #11 0x00007ffff78b7fcd in Digikam::LoadSaveThread::run (this=0x19dc740) at /mnt/devel/GIT/3.x/core/libs/threadimageio/loadsavethread.cpp:136 #12 0x00007ffff78f56d6 in Digikam::DynamicThread::DynamicThreadPriv::run (this=0x19dbca0) at /mnt/devel/GIT/3.x/core/libs/threads/dynamicthread.cpp:186 #13 0x00007ffff3a6823d in QThreadPoolThread::run() () from /lib64/libQtCore.so.4 #14 0x00007ffff3a745ec in QThreadPrivate::start(void*) () from /lib64/libQtCore.so.4 #15 0x00007ffff37e4d18 in start_thread () from /lib64/libpthread.so.0 #16 0x00007ffff2af47cd in clone () from /lib64/libc.so.6 #17 0x0000000000000000 in ?? () (gdb) Note : this X3F file sound like corrupted or something like that. File size is 1,5Kb only. I check file structure, and it's really a X3F file, but with no image data. I don't know how this file have been generated, but in all case, libraw must not crash as well... Gilles Caulier Reproduced with command-line LibRaw tool (dcraw_emu) , thanks for sample. Created attachment 80087 [details]
Proposed patch to fix double-free() on broken full-color images
Proposed patch to fix double-free() on broken full-color images
Please try the proposed patch (above). Works for me (Win32) :) Alex, Patch work fine. There is no crash in digiKam and Showfoto now... Gilles Caulier Fine. Expect LibRaw 0.15.2 within next few days. Git commit 655c5ac08726eee4219d0a8830953a22d7f3d371 by Gilles Caulier. Committed on 26/05/2013 at 11:39. Pushed by cgilles into branch 'master'. update internal Libraw to last 0.15.2 M +6 -0 libraw/Changelog.txt M +1 -1 libraw/internal/dcraw_common.cpp M +2 -2 libraw/libraw/libraw.h M +1 -1 libraw/libraw/libraw_version.h M +1 -1 libraw/src/libraw_c_api.cpp M +9 -3 libraw/src/libraw_cxx.cpp M +2 -2 libraw/src/libraw_datastream.cpp http://commits.kde.org/libkdcraw/655c5ac08726eee4219d0a8830953a22d7f3d371 Not reproducible with digiKam 7.0.0-beta1. |