[Digikam-devel] [Bug 273765] New: replacing pgf files with an open digikam lead to reproducible crash

Francesco Riosa francesco+kde at pnpitalia.it
Sat May 21 00:24:56 BST 2011


https://bugs.kde.org/show_bug.cgi?id=273765

           Summary: replacing pgf files with an open digikam lead to
                    reproducible crash
           Product: digikam
           Version: 2.0.0
          Platform: Compiled Sources
        OS/Version: Linux
            Status: NEW
          Severity: crash
          Priority: NOR
         Component: general
        AssignedTo: digikam-devel at kde.org
        ReportedBy: francesco+kde at pnpitalia.it


Version:           2.0.0 (using KDE 4.6.3) 
OS:                Linux

ok, I'm a bit stuck in debugging this one, while it's a corner case it would be
interesting to discover why the crash happen.

The point I'm stuck at is how to correlate the backtrace of the signalled
thread, working in pgf library to a call in digikam

there is some way to know from where the data is feed into libpgf?

BTW the crash happen even with external libpgf

Reproducible: Always

Steps to Reproduce:
1) download a bunch of .nef files in raw/
2) convert it to lossy pgf (resized) to be put in tmp/
3) change your mind, w/o close digikam open a shell and remove all files in
tmp/
4) convert raw/ and put it again in tmp/ this time with lossless pgf
compression
5) close and reopen digikam, then try to navigate into tmp/
6) crash




tried to use gdb for the live program but found that working on a core file has
more flexibility so:

digikam.sh --nocrashhandler
# steps to reproduce
gdb /home/vivo/usr/bin/digikam  core

(gdb) info threads
  7 Thread 18247  0x00007fdf6625b54e in pthread_cond_timedwait@@GLIBC_2.3.2 ()
from /lib64/libpthread.so.0
  6 Thread 16802  0x00007fdf652927e9 in ?? () from /lib64/libc.so.6
  5 Thread 18245  0x00007fdf6625b54e in pthread_cond_timedwait@@GLIBC_2.3.2 ()
from /lib64/libpthread.so.0
  4 Thread 16807  0x00007fdf6625b1e4 in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib64/libpthread.so.0
  3 Thread 16808  0x00007fdf6527db23 in poll () from /lib64/libc.so.6
  2 Thread 16895  0x00007fdf6625b1e4 in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib64/libpthread.so.0
* 1 Thread 18246  ClearBitBlock (stream=0x7fdf26ba94c0, pos=82071, len=<value
optimized out>)
    at
/home/vivo/digikam-devel/digikam-sc/core/libs/3rdparty/libpgf/BitStream.h:159

(gdb) info source
Current source file is
/home/vivo/digikam-devel/digikam-sc/core/libs/3rdparty/libpgf/BitStream.h
Compilation directory is
/home/vivo/digikam-devel/digikam-sc/build2/core/digikam
Located in /srv/git/digikam-sc/core/libs/3rdparty/libpgf/BitStream.h
Contains 269 lines.
Source language is c++.
Compiled with unknown debugging format.
Includes preprocessor macro info.

(gdb) info line
Line 159 of
"/home/vivo/digikam-devel/digikam-sc/core/libs/3rdparty/libpgf/BitStream.h"
   starts at address 0x7fdf6b2ab8e0 <ClearBitBlock(UINT32*, UINT32, UINT32)+48>
and ends at 0x7fdf6b2ab8e3 <ClearBitBlock(UINT32*, UINT32, UINT32)+51>.
(gdb) 

(gdb) frame 1
#1  0x00007fdf6b2aaaab in CDecoder::RLDSigsAndSigns (this=0x7fdf44095d90,
bufferSize=16384, codeLen=109243, sigBits=0x7fdf26ba94c0,
signBits=0x7fdf26ba8cc0)
    at
/home/vivo/digikam-devel/digikam-sc/core/libs/3rdparty/libpgf/Decoder.cpp:726
726                             ClearBitBlock(sigBits, sigPos, runlen); 
(gdb) line 
Undefined command: "line".  Try "help".
(gdb) info line
Line 726 of
"/home/vivo/digikam-devel/digikam-sc/core/libs/3rdparty/libpgf/Decoder.cpp"
   starts at address 0x7fdf6b2aaa93 <CDecoder::RLDSigsAndSigns(UINT32, UINT32,
UINT32*, UINT32*)+291>
   and ends at 0x7fdf6b2aaa96 <CDecoder::RLDSigsAndSigns(UINT32, UINT32,
UINT32*, UINT32*)+294>.

(gdb) frame 2
#2  0x00007fdf6b2aaea0 in CDecoder::BitplaneDecode (this=0x7fdf44095d90,
bufferSize=16384)
    at
/home/vivo/digikam-devel/digikam-sc/core/libs/3rdparty/libpgf/Decoder.cpp:536
536                             sigLen = RLDSigsAndSigns(bufferSize, codeLen,
sigBits, signBits); ASSERT(sigLen <= bufferSize);
(gdb) info line
Line 536 of
"/home/vivo/digikam-devel/digikam-sc/core/libs/3rdparty/libpgf/Decoder.cpp"
   starts at address 0x7fdf6b2aad46 <CDecoder::BitplaneDecode(UINT32)+278> and
ends at 0x7fdf6b2aad4e <CDecoder::BitplaneDecode(UINT32)+286>.


(gdb) thread apply all bt

Thread 7 (Thread 18247):
#0  0x00007fdf6625b54e in pthread_cond_timedwait@@GLIBC_2.3.2 () from
/lib64/libpthread.so.0
#1  0x00007fdf664ec1b8 in wait (this=<value optimized out>, mutex=0x18fc5a0,
time=<value optimized out>) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x18fc5a0,
time=<value optimized out>) at thread/qwaitcondition_unix.cpp:160
#3  0x00007fdf664df19f in QThreadPoolThread::run (this=0x54496b0) at
concurrent/qthreadpool.cpp:140
#4  0x00007fdf664eba8a in QThreadPrivate::start (arg=0x54496b0) at
thread/qthread_unix.cpp:320
#5  0x00007fdf66256c00 in start_thread () from /lib64/libpthread.so.0
#6  0x00007fdf65285b0d in clone () from /lib64/libc.so.6


Thread 6 (Thread 16802):
#0  0x00007fdf652927e9 in ?? () from /lib64/libc.so.6
#1  0x00007fdf65229ea6 in ?? () from /lib64/libc.so.6
#2  0x00007fdf65227eca in malloc () from /lib64/libc.so.6
#3  0x00007fdf65a8f1ad in operator new(unsigned long) () from
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.2/libstdc++.so.6
#4  0x00007fdf67395ddc in QPainter::save (this=<value optimized out>) at
painting/qpainter.cpp:1604
#5  0x00007fdf4e5973b3 in Oxygen::Style::drawControl (this=0x172e0b0,
element=QStyle::CE_ShapedFrame, option=0x7ffffa529200, painter=0x7ffffa529290,
widget=
    0x17f5170) at
/usr/src/debug/kde-base/kstyles-4.6.3/kstyles-4.6.3/kstyles/oxygen/oxygenstyle.cpp:1026
#6  0x00007fdf676702ed in QFrame::drawFrame (this=0x17f5170, p=0x7ffffa529290)
at widgets/qframe.cpp:534
#7  0x00007fdf676703a8 in QFrame::paintEvent (this=0x17f5170) at
widgets/qframe.cpp:496
#8  0x00007fdf67292590 in QWidget::event (this=0x17f5170, event=0x7ffffa529b00)
at kernel/qwidget.cpp:8405
#9  0x00007fdf67670446 in QFrame::event (this=0x17f5170, e=0x7ffffa529b00) at
widgets/qframe.cpp:557
#10 0x00007fdf67238ea4 in QApplicationPrivate::notify_helper (this=0x16fbc80,
receiver=0x17f5170, e=0x7ffffa529b00) at kernel/qapplication.cpp:4462
#11 0x00007fdf6723e351 in QApplication::notify (this=<value optimized out>,
receiver=0x17f5170, e=0x7ffffa529b00) at kernel/qapplication.cpp:4341
#12 0x00007fdf67ff4002 in KApplication::notify (this=0x7ffffa52b5b0,
receiver=0x17f5170, event=0x7ffffa529b00)
    at
/usr/src/debug/kde-base/kdelibs-4.6.3-r1/kdelibs-4.6.3/kdeui/kernel/kapplication.cpp:311
#13 0x00007fdf665e4a9b in QCoreApplication::notifyInternal
(this=0x7ffffa52b5b0, receiver=0x17f5170, event=0x7ffffa529b00) at
kernel/qcoreapplication.cpp:731
#14 0x00007fdf6728f17e in sendSpontaneousEvent (this=0x18e3ae0, pdev=0x18e3998,
rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x19347e0)
    at ../../src/corelib/kernel/qcoreapplication.h:218
#15 QWidgetPrivate::drawWidget (this=0x18e3ae0, pdev=0x18e3998, rgn=...,
offset=..., flags=4, sharedPainter=0x0, backingStore=0x19347e0)
    at kernel/qwidget.cpp:5492
#16 0x00007fdf6728fddd in QWidgetPrivate::paintSiblingsRecursive
(this=0x18dfed0, pdev=0x18e3998, siblings=..., index=<value optimized out>,
rgn=..., 
    offset=..., flags=4, sharedPainter=0x0, backingStore=0x19347e0) at
kernel/qwidget.cpp:5699
#17 0x00007fdf6728fc93 in QWidgetPrivate::paintSiblingsRecursive
(this=0x18dfed0, pdev=0x18e3998, siblings=..., index=132, rgn=..., offset=...,
flags=4, 
    sharedPainter=0x0, backingStore=0x19347e0) at kernel/qwidget.cpp:5686
#18 0x00007fdf6728fc93 in QWidgetPrivate::paintSiblingsRecursive
(this=0x18dfed0, pdev=0x18e3998, siblings=..., index=151, rgn=..., offset=...,
flags=4, 
    sharedPainter=0x0, backingStore=0x19347e0) at kernel/qwidget.cpp:5686
#19 0x00007fdf6728ee40 in QWidgetPrivate::drawWidget (this=0x18dfed0,
pdev=0x18e3998, rgn=..., offset=..., flags=<value optimized out>,
sharedPainter=0x0, 
    backingStore=0x19347e0) at kernel/qwidget.cpp:5545
#20 0x00007fdf6747fdd5 in QWidgetBackingStore::sync (this=0x19347e0) at
painting/qbackingstore.cpp:1333
#21 0x00007fdf67283bd0 in QWidgetPrivate::syncBackingStore (this=0x18dfed0) at
kernel/qwidget.cpp:1842
#22 0x00007fdf67292d02 in QWidget::event (this=0x1879de0, event=0x7fdf4400bc80)
at kernel/qwidget.cpp:8552
#23 0x00007fdf6768badb in QMainWindow::event (this=0x1879de0,
event=0x7fdf4400bc80) at widgets/qmainwindow.cpp:1480
#24 0x00007fdf680e6990 in KXmlGuiWindow::event (this=0x1879de0,
ev=0x7fdf4400bc80)
    at
/usr/src/debug/kde-base/kdelibs-4.6.3-r1/kdelibs-4.6.3/kdeui/xmlgui/kxmlguiwindow.cpp:126
#25 0x00007fdf67238ea4 in QApplicationPrivate::notify_helper (this=0x16fbc80,
receiver=0x1879de0, e=0x7fdf4400bc80) at kernel/qapplication.cpp:4462
#26 0x00007fdf6723e351 in QApplication::notify (this=<value optimized out>,
receiver=0x1879de0, e=0x7fdf4400bc80) at kernel/qapplication.cpp:4341
#27 0x00007fdf67ff4002 in KApplication::notify (this=0x7ffffa52b5b0,
receiver=0x1879de0, event=0x7fdf4400bc80)
    at
/usr/src/debug/kde-base/kdelibs-4.6.3-r1/kdelibs-4.6.3/kdeui/kernel/kapplication.cpp:311
#28 0x00007fdf665e4a9b in QCoreApplication::notifyInternal
(this=0x7ffffa52b5b0, receiver=0x1879de0, event=0x7fdf4400bc80) at
kernel/qcoreapplication.cpp:731
#29 0x00007fdf665e89be in sendEvent (receiver=0x0, event_type=0,
data=0x16b2a00) at kernel/qcoreapplication.h:215
#30 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0,
data=0x16b2a00) at kernel/qcoreapplication.cpp:1372
#31 0x00007fdf66612c53 in sendPostedEvents (s=<value optimized out>) at
kernel/qcoreapplication.h:220
#32 postEventSourceDispatch (s=<value optimized out>) at
kernel/qeventdispatcher_glib.cpp:277
#33 0x00007fdf64acdb3e in g_main_context_dispatch () from
/usr/lib64/libglib-2.0.so.0
#34 0x00007fdf64ace328 in ?? () from /usr/lib64/libglib-2.0.so.0
#35 0x00007fdf64ace5bd in g_main_context_iteration () from
/usr/lib64/libglib-2.0.so.0
#36 0x00007fdf66612def in QEventDispatcherGlib::processEvents (this=0x16faff0,
flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:422
#37 0x00007fdf672ea03e in QGuiEventDispatcherGlib::processEvents (this=<value
optimized out>, flags=<value optimized out>)
    at kernel/qguieventdispatcher_glib.cpp:204
#38 0x00007fdf665e3562 in QEventLoop::processEvents (this=<value optimized
out>, flags=...) at kernel/qeventloop.cpp:149
#39 0x00007fdf665e37a5 in QEventLoop::exec (this=0x7ffffa52b3f0, flags=...) at
kernel/qeventloop.cpp:201
#40 0x00007fdf665e8cb9 in QCoreApplication::exec () at
kernel/qcoreapplication.cpp:1008
#41 0x000000000063635f in main (argc=7818496, argv=0x7ffffa52bc58) at
/home/vivo/digikam-devel/digikam-sc/core/digikam/main/main.cpp:232

Thread 5 (Thread 18245):
#0  0x00007fdf6625b54e in pthread_cond_timedwait@@GLIBC_2.3.2 () from
/lib64/libpthread.so.0
#1  0x00007fdf664ec1b8 in wait (this=<value optimized out>, mutex=0x18fc5a0,
time=<value optimized out>) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x18fc5a0,
time=<value optimized out>) at thread/qwaitcondition_unix.cpp:160
#3  0x00007fdf664df19f in QThreadPoolThread::run (this=0x5f1c430) at
concurrent/qthreadpool.cpp:140
#4  0x00007fdf664eba8a in QThreadPrivate::start (arg=0x5f1c430) at
thread/qthread_unix.cpp:320
#5  0x00007fdf66256c00 in start_thread () from /lib64/libpthread.so.0
#6  0x00007fdf65285b0d in clone () from /lib64/libc.so.6

Thread 4 (Thread 16807):
#0  0x00007fdf6625b1e4 in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib64/libpthread.so.0
#1  0x00007fdf664ec29f in wait (this=<value optimized out>, mutex=0x17fc0d8,
time=<value optimized out>) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x17fc0d8,
time=<value optimized out>) at thread/qwaitcondition_unix.cpp:160
#3  0x000000000058b2a1 in Digikam::ScanController::run (this=0x17fbd60) at
/home/vivo/digikam-devel/digikam-sc/core/digikam/database/scancontroller.cpp:618
#4  0x00007fdf664eba8a in QThreadPrivate::start (arg=0x17fbd60) at
thread/qthread_unix.cpp:320
#5  0x00007fdf66256c00 in start_thread () from /lib64/libpthread.so.0
#6  0x00007fdf65285b0d in clone () from /lib64/libc.so.6

Thread 3 (Thread 16808):
#0  0x00007fdf6527db23 in poll () from /lib64/libc.so.6
#1  0x00007fdf64ace08d in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007fdf64ace5bd in g_main_context_iteration () from
/usr/lib64/libglib-2.0.so.0
#3  0x00007fdf66612def in QEventDispatcherGlib::processEvents (this=0x182d6d0,
flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:422
#4  0x00007fdf665e3562 in QEventLoop::processEvents (this=<value optimized
out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007fdf665e37a5 in QEventLoop::exec (this=0x7fdf49672d20, flags=...) at
kernel/qeventloop.cpp:201
#6  0x00007fdf664e8db8 in QThread::exec (this=<value optimized out>) at
thread/qthread.cpp:492
#7  0x00007fdf665c3480 in QInotifyFileSystemWatcherEngine::run (this=0x183a020)
at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007fdf664eba8a in QThreadPrivate::start (arg=0x183a020) at
thread/qthread_unix.cpp:320
#9  0x00007fdf66256c00 in start_thread () from /lib64/libpthread.so.0
#10 0x00007fdf65285b0d in clone () from /lib64/libc.so.6

Thread 2 (Thread 16895):
#0  0x00007fdf6625b1e4 in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib64/libpthread.so.0
#1  0x00007fdf664ec29f in wait (this=<value optimized out>, mutex=0x18cf348,
time=<value optimized out>) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x18cf348,
time=<value optimized out>) at thread/qwaitcondition_unix.cpp:160
#3  0x00007fdf6b2b89c6 in Digikam::ParkingThread::run (this=0x18cf330) at
/home/vivo/digikam-devel/digikam-sc/core/libs/threads/threadmanager.cpp:119
#4  0x00007fdf664eba8a in QThreadPrivate::start (arg=0x18cf330) at
thread/qthread_unix.cpp:320
#5  0x00007fdf66256c00 in start_thread () from /lib64/libpthread.so.0
#6  0x00007fdf65285b0d in clone () from /lib64/libc.so.6

Thread 1 (Thread 18246):
#0  ClearBitBlock (stream=0x7fdf26ba94c0, pos=82071, len=<value optimized out>)
    at
/home/vivo/digikam-devel/digikam-sc/core/libs/3rdparty/libpgf/BitStream.h:159
#1  0x00007fdf6b2aaaab in CDecoder::RLDSigsAndSigns (this=0x7fdf44095d90,
bufferSize=16384, codeLen=109243, sigBits=0x7fdf26ba94c0,
signBits=0x7fdf26ba8cc0)
    at
/home/vivo/digikam-devel/digikam-sc/core/libs/3rdparty/libpgf/Decoder.cpp:726
#2  0x00007fdf6b2aaea0 in CDecoder::BitplaneDecode (this=0x7fdf44095d90,
bufferSize=16384)
    at
/home/vivo/digikam-devel/digikam-sc/core/libs/3rdparty/libpgf/Decoder.cpp:536
#3  0x0000000000000000 in ?? ()

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Digikam-devel mailing list