Bug 162814

Summary: digikam crashes when using light table (page down)
Product: digikam Reporter: Mark Purcell <msp>
Component: LightTable-EngineAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: crash    
Priority: NOR    
Version: 0.9.4   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In: 0.9.4
Attachments: back trace from light table crash.
lighttable-crash.png
quick fix
new patch
third patch

Description Mark Purcell 2008-05-29 15:13:24 UTC
Version:           0.9.4-beta5 (using 3.5.9, Debian Package 4:3.5.9.dfsg.1-4 (lenny/sid))
Compiler:          Target: powerpc-linux-gnu
OS:                Linux (ppc) release 2.6.18-5-powerpc

This is a forwarded report from:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=437021

I confirm I am able to reproduce the crash with 0.9.4-beta5. I also noticed there are a couple of light table crash reports, that were never resolved. So I suspect there maybe a real problem here.

I can provide the beta5 backtrace if that is of more help:

From: David Bremner <bremner@unb.ca>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: digikam crashes when using light table
Date: Fri, 10 Aug 2007 08:15:08 +0200

Package: digikam
Version: 2:0.9.2-4
Severity: normal


It seems with the current unstable version of digikam, digikam crashes 
consistently for me if I add 3 pictures to the light table, select one 
to be the left, and press page down once

The backtrace is not very informative; I thought I had the right 
packages (digikam-dbg) installed, but perhaps not.

Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1247365440 (LWP 31937)]
[New Thread -1340671088 (LWP 31969)]
[New Thread -1332282480 (LWP 31968)]
[New Thread -1302103152 (LWP 31967)]
[New Thread -1293714544 (LWP 31966)]
[New Thread -1249895536 (LWP 31953)]
[New Thread -1258284144 (LWP 31952)]
0xb5b3af7c in nanosleep () from /lib/libc.so.6
#0  0xb5b3af7c in nanosleep () from /lib/libc.so.6
#1  0xb5b3ad9a in sleep () from /lib/libc.so.6
#2  0xb6a2b107 in KCrash::startDrKonqi (argv=0xbf983f40, argc=17)
    at /tmp/buildd/kdelibs-3.5.7.dfsg.1/./kdecore/kcrash.cpp:312
#3  0xb6a41107 in KCrash::defaultCrashHandler (sig=11)
    at /tmp/buildd/kdelibs-3.5.7.dfsg.1/./kdecore/kcrash.cpp:229
#4  0xffffe420 in ?? ()
#5  0x0000000b in ?? ()
#6  0x00000033 in ?? ()
#7  0xc0100000 in ?? ()
#8  0xc010007b in ?? ()
#9  0xffff007b in ?? ()
#10 0xbf984364 in ?? ()
#11 0xbf984360 in ?? ()
#12 0xbf9842f8 in ?? ()
#13 0xbf9842bc in ?? ()
#14 0xb68865ac in ?? () from /usr/lib/libqt-mt.so.3
#15 0x0886f5d0 in ?? ()
#16 0x00000004 in ?? ()
#17 0x00000000 in ?? ()

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.22 (PREEMPT)
Locale: LANG=en_CA, LC_CTYPE=en_CA (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages digikam depends on:
ii  kdebase-kio-plugins     4:3.5.7-2+b1     core I/O slaves for KDE
ii  kdelibs4c2a             4:3.5.7.dfsg.1-3 core libraries and binaries for al
ii  libacl1                 2.2.42-1         Access control list shared library
ii  libart-2.0-2            2.3.19-3         Library of functions for 2D graphi
ii  libattr1                1:2.4.32-1.2     Extended attribute shared library
ii  libaudio2               1.9-2+b1         The Network Audio System (NAS). (s
ii  libc6                   2.6.1-1          GNU C Library: Shared libraries
ii  libexif12               0.6.16-2         library to parse EXIF files
ii  libexiv2-0              0.15-1           EXIF/IPTC metadata manipulation li
ii  libfontconfig1          2.4.2-1.2        generic font configuration library
ii  libfreetype6            2.3.5-1+b1       FreeType 2 font engine, shared lib
ii  libgamin0 [libfam0]     0.1.8-2          Client library for the gamin file 
ii  libgcc1                 1:4.2.1-2        GCC support library
ii  libgphoto2-2            2.3.1-8          gphoto2 digital camera library
ii  libgphoto2-2-dev        2.3.1-8          gphoto2 digital camera library (de
ii  libgphoto2-port0        2.3.1-8          gphoto2 digital camera port librar
ii  libice6                 2:1.0.3-3        X11 Inter-Client Exchange library
ii  libidn11                1.0-0            GNU libidn library, implementation
ii  libjasper1              1.900.1-3        The JasPer JPEG-2000 runtime libra
ii  libjpeg62               6b-13            The Independent JPEG Group's JPEG 
ii  libkdcraw1              0.1.1-2          Raw picture decoding C++ library (
ii  libkexiv2-1             0.1.5-1+b1       Qt like interface for the libexiv2
ii  libkipi0                0.1.5-2          library for apps that want to use 
ii  liblcms1                1.16-6           Color management library
ii  libltdl3                1.5.24-1         A system independent dlopen wrappe
ii  libpcre3                7.2-1            Perl 5 Compatible Regular Expressi
ii  libpng12-0              1.2.15~beta5-2   PNG library - runtime
ii  libqt3-mt               3:3.3.7-6        Qt GUI Library (Threaded runtime v
ii  libsm6                  2:1.0.3-1+b1     X11 Session Management library
ii  libsqlite3-0            3.4.1-1          SQLite 3 shared library
ii  libstdc++6              4.2.1-2          The GNU Standard C++ Library v3
ii  libtiff4                3.8.2-7          Tag Image File Format (TIFF) libra
ii  libx11-6                2:1.0.3-7        X11 client-side library
ii  libxcursor1             1:1.1.8-2        X cursor management library
ii  libxext6                1:1.0.3-2        X11 miscellaneous extension librar
ii  libxft2                 2.1.12-2         FreeType-based font drawing librar
ii  libxi6                  2:1.1.2-1        X11 Input extension library
ii  libxinerama1            1:1.0.2-1        X11 Xinerama extension library
ii  libxrandr2              2:1.2.1-1        X11 RandR extension library
ii  libxrender1             1:0.9.2-1        X Rendering Extension client libra
ii  libxt6                  1:1.0.5-3        X11 toolkit intrinsics library
ii  zlib1g                  1:1.2.3.3.dfsg-5 compression library - runtime

Versions of packages digikam recommends:
ii  kdeprint                    4:3.5.7-2+b1 print system for KDE
ii  kipi-plugins                0.1.4-1+b1   image manipulation/handling plugin
ii  konqueror                   4:3.5.7-2+b1 KDE's advanced file manager, web b

-- no debconf information





Message #10 received at 437021@bugs.debian.org (full text, mbox):
From: bremner@unb.ca
To: 437021@bugs.debian.org
Subject: better backtrace
Date: Fri, 10 Aug 2007 20:08:59 +0200

Doh!  I guess I should have tried this earlier. Here is a backtrace
from within gdb (as opposed to from the KDE crash handler widget)

#0  0xb7c6cf59 in QString::length (this=0xbff96c20)
    at /usr/share/qt3/include/qstring.h:879
#1  0x0804b368 in operator+ (s1=@0xbff96c24, s2=@0xb27032d4)
    at /usr/share/qt3/include/qstring.h:1038
#2  0xb7c24624 in Digikam::ImageInfo::filePath (this=0xb27032c8)
    at /home/mark/src/debian/kde-extras/build-area/digikam-0.9.2/./digikam/digik                           am/imageinfo.cpp:188
#3  0xb7e55946 in Digikam::LightTablePreview::setImageInfo (this=0x881ad30,
    info=0xb27032c8, previous=0x0, next=0x0)
    at /home/mark/src/debian/kde-extras/build-area/digikam-0.9.2/./digikam/utili                           ties/lighttable/lighttablepreview.cpp:330
#4  0xb7e55b61 in Digikam::LightTableView::setLeftImageInfo (this=0x881a720,
    info=0xb27032c8)
    at /home/mark/src/debian/kde-extras/build-area/digikam-0.9.2/./digikam/utili                           ties/lighttable/lighttableview.cpp:364
#5  0xb7e55ba5 in Digikam::LightTableWindow::slotSetItemOnLeftPanel (
    this=0x8749558, info=0xb27032c8)
    at /home/mark/src/debian/kde-extras/build-area/digikam-0.9.2/./digikam/utili                           ties/lighttable/lighttablewindow.cpp:764
#6  0xb7e5a91c in Digikam::LightTableWindow::slotSetItemLeft (this=0x8749558)
    at /home/mark/src/debian/kde-extras/build-area/digikam-0.9.2/./digikam/utili                           ties/lighttable/lighttablewindow.cpp:750
#7  0xb7e61fe7 in Digikam::LightTableWindow::qt_invoke (this=0x8749558,
    _id=78, _o=0xbff96dbc) at ./lighttablewindow.moc:233
#8  0xb62c9d23 in QObject::activate_signal (this=0x876d918, clist=0x881fb58,
    o=0xbff96dbc) at kernel/qobject.cpp:2356
#9  0xb62ca7c8 in QObject::activate_signal (this=0x876d918, signal=2)
    at kernel/qobject.cpp:2325
#10 0xb6c11709 in KAction::activated (this=0x876d918) at ./kaction.moc:176
#11 0xb6c46ab2 in KAction::slotActivated (this=0x876d918)
    at /tmp/buildd/kdelibs-3.5.7.dfsg.1/./kdeui/kaction.cpp:1102
#12 0xb6c46a4c in KAction::slotButtonClicked (this=0x876d918, state=LeftButton)
    at /tmp/buildd/kdelibs-3.5.7.dfsg.1/./kdeui/kaction.cpp:1147
#13 0xb6d13016 in KAction::qt_invoke (this=0x876d918, _id=17, _o=0xbff96ec0)
    at ./kaction.moc:220
#14 0xb62c9d23 in QObject::activate_signal (this=0x8906f00, clist=0x8901208,
    o=0xbff96ec0) at kernel/qobject.cpp:2356
#15 0xb6c48c60 in KToolBarButton::buttonClicked (this=0x8906f00, t0=-25,
    t1=LeftButton) at ./ktoolbarbutton.moc:154
#16 0xb6c48f66 in KToolBarButton::mouseReleaseEvent (this=0x8906f00,
    e=0xbff97384)
    at /tmp/buildd/kdelibs-3.5.7.dfsg.1/./kdeui/ktoolbarbutton.cpp:479
#17 0xb6300cb2 in QWidget::event (this=0x8906f00, e=0xbff97384)
    at kernel/qwidget.cpp:4702
#18 0xb6cc35d1 in KToolBarButton::event (this=0x4, e=0xb27043b8)
    at /tmp/buildd/kdelibs-3.5.7.dfsg.1/./kdeui/ktoolbarbutton.cpp:651
#19 0xb62614e0 in QApplication::internalNotify (this=0xbff9795c,
    receiver=0x8906f00, e=0xbff97384) at kernel/qapplication.cpp:2635
#20 0xb62636a1 in QApplication::notify (this=0xbff9795c, receiver=0x8906f00,
    e=0xbff97384) at kernel/qapplication.cpp:2421
#21 0xb6a07122 in KApplication::notify (this=0xbff9795c, receiver=0x8906f00,
    event=0xbff97384)
    at /tmp/buildd/kdelibs-3.5.7.dfsg.1/./kdecore/kapplication.cpp:550
#22 0xb61f4609 in QApplication::sendSpontaneousEvent (receiver=0x8906f00,
    event=0xbff97384) at kernel/qapplication.h:523
#23 0xb61f3292 in QETWidget::translateMouseEvent (this=0x8906f00,
    event=0xbff977b8) at kernel/qapplication_x11.cpp:4301
#24 0xb61f16da in QApplication::x11ProcessEvent (this=0xbff9795c,
    event=0xbff977b8) at kernel/qapplication_x11.cpp:3478
#25 0xb6207fb8 in QEventLoop::processEvents (this=0x8081c68, flags=4)
    at kernel/qeventloop_x11.cpp:192
#26 0xb627bbe6 in QEventLoop::enterLoop (this=0x8081c68)
    at kernel/qeventloop.cpp:198
#27 0xb627b9f6 in QEventLoop::exec (this=0x8081c68)
    at kernel/qeventloop.cpp:145
#28 0xb6263089 in QApplication::exec (this=0xbff9795c)
    at kernel/qapplication.cpp:2758
#29 0x0804b148 in main (argc=1, argv=0xbff97be4)
    at /home/mark/src/debian/kde-extras/build-area/digikam-0.9.2/./digikam/digikam/main.cpp:322
(gdb)
Comment 1 caulier.gilles 2008-05-29 15:19:56 UTC
Arnd,

What do you think about ?

Gilles
Comment 2 Andi Clemens 2008-05-29 20:50:27 UTC
I can't confirm this... light table works just fine here (I'm also using beta5).
Comment 3 caulier.gilles 2008-05-29 21:10:53 UTC
Thanks Andy.

Same for me. i cannot reproduce the crash here...

Gilles
Comment 4 Arnd Baecker 2008-05-29 21:41:42 UTC
I can't reproduce that problem either,
and the above backtrace does not really help, right?

Mark, you wrote:

>  I also noticed there are a couple of light table crash reports, 
> that were never resolved.
I don't see any open crash reports for the light-table, did I miss one?
(It might be that a couple of crash reports had to be closed, because
those crashes were not reproducible and no back-trace with further information
was available).

Of course it might very well be possible that in certain
situtations one can trigger a crash, so a full back trace
in such a case would be very helpful!

Best, Arnd
Comment 5 Mark Purcell 2008-05-30 00:20:02 UTC
Arnd,

> I don't see any open crash reports for the light-table, did I miss one? 
> (It might be that a couple of crash reports had to be closed, because 
> those crashes were not reproducible and no back-trace with further
> information was available). 

Sorry, yes I was referring to those that were closed without a back-trace.

I'll try and generate the backtrack from -beta5 to be of more use.

Mark
Comment 6 Mark Purcell 2008-05-30 00:39:22 UTC
Created attachment 25002 [details]
back trace from light table crash.
Comment 7 caulier.gilles 2008-05-30 06:16:21 UTC
Mark,

==> #5  0x0fd4633c in Digikam::ThumbBarItem::next (this=0x0)

"This" is null. this is why LT crash.

Can you give us exactly all steps done on gui to reproduce it ?

Gilles Caulier 
Comment 8 Mark Purcell 2008-05-30 09:42:34 UTC
On Fri, 30 May 2008, Gilles Caulier wrote:
> ==> #5  0x0fd4633c in Digikam::ThumbBarItem::next (this=0x0)
>
> "This" is null. this is why LT crash.
>
> Can you give us exactly all steps done on gui to reproduce it ?


Gilles,

I can reproduce using the following steps.

1. Load three images onto the light table
2. Drag the right hand image onto the left and right panes (or Ctrl+L, Ctrl+R)
3. Right click the right hand image and select "Remove Item" (or Ctrl+K)
4. Digikam crash (this=0x0)

Attached screen shot just prior to crash.

Mark


Created an attachment (id=25005)
lighttable-crash.png
Comment 9 caulier.gilles 2008-05-30 10:03:13 UTC
Mark, Arnd, Andy,

Yes, now i can reproduce the crash...

Who want to check source code (:=))) ?

Gilles
Comment 10 Andi Clemens 2008-05-30 13:55:27 UTC
Ok, now I can confirm it, too.
Maybe I'll take a look at the code later on, right now I'm too busy.

It seems to crash only if the last image is displayed in the left and right window, otherwise the image will be just removed from the list as expected.
Comment 11 Andi Clemens 2008-05-30 15:11:12 UTC
Created attachment 25010 [details]
quick fix
Comment 12 Andi Clemens 2008-05-30 15:32:22 UTC
Created attachment 25011 [details]
new patch

I think it is more logical to display the last image in the thumbar than the
first one
Comment 13 Andi Clemens 2008-05-30 15:55:19 UTC
Created attachment 25012 [details]
third patch

When just two images were in the thumbbar and the last one was removed, no
image was displayed in the panel. Now the only remaining image is displayed in
the left panel.
Comment 14 Andi Clemens 2008-06-02 21:53:25 UTC
SVN commit 815897 by aclemens:

digiKam from KDE3 branch: fixed null-pointer issue when removing the last item in lighttable thumbbar

CCBUGS: 162814
TODO: KDE4PORT

 M  +2 -1      NEWS  
 M  +16 -5     utilities/lighttable/lighttablewindow.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=815897
Comment 15 Andi Clemens 2008-06-02 21:54:03 UTC
*** Bug has been marked as fixed ***.
Comment 16 caulier.gilles 2008-06-03 12:02:36 UTC
SVN commit 816103 by cgilles:

backport commit #815897 from KDE3 branch
CCBUGS: 162814


 M  +18 -8     lighttablewindow.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=816103
Comment 17 Andi Clemens 2008-07-03 00:37:23 UTC
SVN commit 827415 by aclemens:

If only one image is left in thumbbar and it is removed from the list, lighttable crashes. Again this is the same nullpointer issue as mentioned in this bugreport and has been fixed now.

CCBUGS:162814

 M  +0 -6      lighttablewindow.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=827415
Comment 18 Andi Clemens 2008-07-03 01:09:56 UTC
SVN commit 827429 by aclemens:

backport commit #827415 from KDE3 branch 
CCBUGS: 162814

 M  +0 -6      lighttablewindow.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=827429