Bug 315098 - DNG Converter and DigiKam crashes when opening a .dng file
Summary: DNG Converter and DigiKam crashes when opening a .dng file
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-DImg-RAW (show other bugs)
Version: 2.8.0
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-13 23:05 UTC by tesfabpel
Modified: 2013-03-11 11:10 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 3.2.0


Attachments
"Incriminated" dng file (contained in a zip archive) (55 bytes, text/plain)
2013-02-14 10:11 UTC, tesfabpel
Details
Converted dng with dcraw command and then exported as JPG (61.83 KB, image/jpeg)
2013-02-14 11:21 UTC, tesfabpel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tesfabpel 2013-02-13 23:05:39 UTC
Application: dngconverter (2.8.0)
KDE Platform Version: 4.9.4
Qt Version: 4.8.3
Operating System: Linux 3.5.0-24-generic x86_64
Distribution: Ubuntu 12.10

-- Information about the crash:
- What I was doing when the application crashed:
I open a .dng file and it crashes (I don't know if it does so with every .dng file though as I tried with only 2 of them).

The crash can be reproduced every time.

-- Backtrace:
Application: Convertitore di immagini DNG (dngconverter), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f180beec800 (LWP 17284))]

Thread 6 (Thread 0x7f17f598b700 (LWP 17287)):
#0  0x00007f1808550313 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f1804355d84 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f18043561e2 in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f17fd9a24a6 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007f1804379645 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f180b15ee9a in start_thread (arg=0x7f17f598b700) at pthread_create.c:308
#6  0x00007f180855bccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7f17e7fff700 (LWP 17288)):
[KCrash Handler]
#6  __memmove_ssse3_back () at ../sysdeps/x86_64/multiarch/memcpy-ssse3-back.S:1579
#7  0x00007f180b3abb92 in memmove (__len=<optimized out>, __src=<optimized out>, __dest=0x7f17e000a94c) at /usr/include/x86_64-linux-gnu/bits/string3.h:58
#8  LibRaw::dcraw_make_mem_thumb (this=0x7f17e7fb1e40, errcode=0x7f17e7fb1d6c) at ../libraw/src/libraw_cxx.cpp:1429
#9  0x00007f180b393192 in KDcrawIface::KDcraw::loadEmbeddedPreview (imgData=..., path=...) at ../../libkdcraw/kdcraw.cpp:130
#10 0x00007f180b393525 in KDcrawIface::KDcraw::loadEmbeddedPreview (image=..., path=...) at ../../libkdcraw/kdcraw.cpp:87
#11 0x00007f180b393749 in KDcrawIface::KDcraw::loadDcrawPreview (image=..., path=...) at ../../libkdcraw/kdcraw.cpp:76
#12 0x00007f180af1cc18 in KIPIPlugins::KPRawThumbThread::run() () from /usr/lib/libkipiplugins.so.2
#13 0x00007f1809f8eaec in QThreadPrivate::start (arg=0x154ebe0) at thread/qthread_unix.cpp:338
#14 0x00007f180b15ee9a in start_thread (arg=0x7f17e7fff700) at pthread_create.c:308
#15 0x00007f180855bccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#16 0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7f17e77fe700 (LWP 17289)):
#0  0x00007f1808550313 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f1804355d84 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f1804355ea4 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f180a0b9c16 in QEventDispatcherGlib::processEvents (this=0x7f17d80008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#4  0x00007f180a08a2bf in QEventLoop::processEvents (this=this@entry=0x7f17e77fdd50, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f180a08a548 in QEventLoop::exec (this=0x7f17e77fdd50, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f1809f8bb10 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#7  0x00007f180a06a9af in QInotifyFileSystemWatcherEngine::run (this=0x1518d70) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007f1809f8eaec in QThreadPrivate::start (arg=0x1518d70) at thread/qthread_unix.cpp:338
#9  0x00007f180b15ee9a in start_thread (arg=0x7f17e77fe700) at pthread_create.c:308
#10 0x00007f180855bccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7f17e6ffd700 (LWP 17290)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f1809f8f04b in wait (time=18446744073709551615, this=0x15591f0) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x15096c0, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f180af25388 in KIPIPlugins::KPActionThreadBase::run() () from /usr/lib/libkipiplugins.so.2
#4  0x00007f1809f8eaec in QThreadPrivate::start (arg=0x151b310) at thread/qthread_unix.cpp:338
#5  0x00007f180b15ee9a in start_thread (arg=0x7f17e6ffd700) at pthread_create.c:308
#6  0x00007f180855bccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f17e67fc700 (LWP 17291)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f1809f8f04b in wait (time=18446744073709551615, this=0x17ac3d0) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x1518300, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f180b65e0e1 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x17ef140, th=0x7f17dc002a40) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00007f180b66092b in ThreadWeaver::WorkingHardState::applyForWork (this=0x151b900, th=0x7f17dc002a40) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#5  0x00007f180b65f79f in ThreadWeaver::ThreadRunHelper::run (this=this@entry=0x7f17e67fbd80, parent=0x17ef140, th=th@entry=0x7f17dc002a40) at ../../../threadweaver/Weaver/Thread.cpp:87
#6  0x00007f180b65f82b in ThreadWeaver::Thread::run (this=0x7f17dc002a40) at ../../../threadweaver/Weaver/Thread.cpp:142
#7  0x00007f1809f8eaec in QThreadPrivate::start (arg=0x7f17dc002a40) at thread/qthread_unix.cpp:338
#8  0x00007f180b15ee9a in start_thread (arg=0x7f17e67fc700) at pthread_create.c:308
#9  0x00007f180855bccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f180beec800 (LWP 17284)):
#0  0x00007f180b165d2d in read () at ../sysdeps/unix/syscall-template.S:82
#1  0x00007f180439215f in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f1804355914 in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f1804355d22 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f1804355ea4 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f180a0b9bf6 in QEventDispatcherGlib::processEvents (this=0x11b9740, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#6  0x00007f18094d7c1e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#7  0x00007f180a08a2bf in QEventLoop::processEvents (this=this@entry=0x7fffc1fc9b80, flags=...) at kernel/qeventloop.cpp:149
#8  0x00007f180a08a548 in QEventLoop::exec (this=0x7fffc1fc9b80, flags=...) at kernel/qeventloop.cpp:204
#9  0x00007f180a08f708 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1187
#10 0x00000000004193e7 in main ()

Reported using DrKonqi
Comment 1 caulier.gilles 2013-02-14 04:50:57 UTC
It crash in libraw.

Which version you use ? Go to Help button of the tool and About dialog for info.

Can you share DNG file to try to reproduce the problem ?

Gilles Caulier
Comment 2 tesfabpel 2013-02-14 10:11:37 UTC
Created attachment 77287 [details]
"Incriminated" dng file (contained in a zip archive)

Downloaded from the Internet (to play with RAW import settings) because I don't have a camera that saves to RAW... :-(
Anyway there is a bug in the program, otherwise it would not crash (either it should report that the file is damaged or it should open it)...
Comment 3 caulier.gilles 2013-02-14 10:17:44 UTC
Thanks. I suspect a bug in libraw. I CC libraw author for info...

Gilles Caulier
Comment 4 Alex Tutubalin 2013-02-14 10:59:28 UTC
Tried the sample file you provide with LibRaw 0.14.7 (latest stable) and LibRaw 0.15-Beta3 (latest beta)
Both versions precesses the file without crashes and/or other problems.

What LibRaw version do you use?
Comment 5 caulier.gilles 2013-02-14 11:09:43 UTC
Crash is not reproducible under digiKam and DNG converter using LibRaw 0.15.0-beta3, published with KDE 4.10.0

Gilles Caulier
Comment 6 tesfabpel 2013-02-14 11:12:12 UTC
It should be libkdcraw4:4.9.2-0ubuntu1
/usr/lib/libkdcraw.so.21

since I don't have the libraw package installed and digikam depends on libkdcraw

I forgot to say that I've installed digikam on Xubuntu 12.10 AMD64.
Comment 7 caulier.gilles 2013-02-14 11:15:23 UTC
libraw is included in libkdcraw. Go to digiKam "Help/Components Info" dialog for details

Gilles Caulier
Comment 8 tesfabpel 2013-02-14 11:21:25 UTC
Created attachment 77289 [details]
Converted dng with dcraw command and then exported as JPG

I've tried using the dcraw command and it produces this output...
As you can see the result is not really perfect... :P
But at least it doesn't crash...

The result is the same with another RAW dng file from the same website, it has a black rectangle at the bottom and those "chopped regions" in the upper part of the image... (raw88.dng)

       $       dcraw -v raw87.dng

Loading NIKON D4 image from raw87.dng ...
Scaling with darkness 0, saturation 15520, and
multipliers 2.426840 1.000000 1.240374 1.000000
AHD interpolation...
Converting to sRGB colorspace...
Writing data to raw87.ppm ...
Comment 9 tesfabpel 2013-02-14 11:23:28 UTC
digiKam version 2.8.0
Exiv2 can write to Jp2: Yes
Exiv2 can write to Jpeg: Yes
Exiv2 can write to Pgf: Yes
Exiv2 can write to Png: Yes
Exiv2 can write to Tiff: Yes
Exiv2 supports XMP metadata: Yes
LibCImg: 130
LibClapack: internal library
LibExiv2: 0.23
LibJPEG: 80
LibJasper: 1.900.1
LibKDE: 4.9.4
LibKExiv2: 2.3.0
LibKGeoMap: 2.0.0
LibKdcraw: 2.1.0
LibLCMS: 119
LibLensFun: external shared library
LibLqr: internal library
LibPGF: 6.12.27 - internal library
LibPNG: 1.2.49
LibQt: 4.8.3
LibRaw: 0.14.6
LibTIFF: LIBTIFF, Version 4.0.2 Copyright (c) 1988-1996 Sam Leffler Copyright (c) 1991-1996 Silicon Graphics, Inc.
Marble Widget: 0.14.0 (stable release)
Parallelized PGF codec: No
Parallelized demosaicing: Yes
Database backend: QSQLITE
LibGphoto2: 2.4.14
LibKface: 2.0.0
LibKipi: 1.6.0
LibOpenCV: 2.3.1
Libface: 0.2
Comment 10 caulier.gilles 2013-02-22 23:10:03 UTC
*** Bug 315544 has been marked as a duplicate of this bug. ***
Comment 11 tesfabpel 2013-03-11 11:05:22 UTC
Now it works with DigiKam 3...