[Bug 168839] New: digikam crashed after tagging

classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[Bug 168839] New: digikam crashed after tagging

Bugzilla from gassauer@kde.org
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=168839         
           Summary: digikam crashed after tagging
           Product: digikam
           Version: 0.10.0-beta2
          Platform: unspecified
        OS/Version: Linux
            Status: NEW
          Severity: crash
          Priority: NOR
         Component: general
        AssignedTo: digikam-devel kde org
        ReportedBy: gassauer kde org


Version:           0.10.0-beta2 (using 4.1.1 (KDE 4.1.0 (4.1 >= 20080722)) "release 26.2", KDE:KDE4:Factory:Desktop / openSUSE_10.3)
Compiler:          gcc
OS:                Linux (x86_64) release 2.6.22.18-0.2-default

the images are tagged but the app crashed after tagging

Application: digiKam (digikam), signal SIGSEGV
[?1034hUsing host libthread_db library "/lib64/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 0x2ab7aa2b1030 (LWP 16507)]
[New Thread 0x4580a950 (LWP 16574)]
[New Thread 0x45009950 (LWP 16572)]
[New Thread 0x44808950 (LWP 16570)]
[New Thread 0x44007950 (LWP 16568)]
[New Thread 0x43806950 (LWP 16567)]
[New Thread 0x43005950 (LWP 16562)]
[New Thread 0x42804950 (LWP 16561)]
[New Thread 0x42003950 (LWP 16558)]
[New Thread 0x41001950 (LWP 16555)]
[New Thread 0x41802950 (LWP 16554)]
[New Thread 0x40800950 (LWP 16508)]
[KCrash handler]
#5  0x00002ab7a0bd1052 in QWidgetAction::releaseWidget ()
   from /usr/lib64/libQtGui.so.4
#6  0x00002ab7a0eb99cd in QMenu::~QMenu () from /usr/lib64/libQtGui.so.4
#7  0x00002ab79ca6c390 in QObjectPrivate::deleteChildren ()
   from /usr/lib64/libQtCore.so.4
#8  0x00002ab7a0bc5bcb in QWidget::~QWidget () from /usr/lib64/libQtGui.so.4
#9  0x00002ab7a0eb9358 in QMenu::~QMenu () from /usr/lib64/libQtGui.so.4
#10 0x0000000000664601 in Digikam::TagsPopupMenu::~TagsPopupMenu ()
#11 0x00000000005b08a1 in Digikam::AlbumIconView::slotRightButtonClicked ()
#12 0x00000000005b2e5d in Digikam::AlbumIconView::qt_metacall ()
#13 0x00002ab79ca6ec8b in QMetaObject::activate ()
   from /usr/lib64/libQtCore.so.4
#14 0x0000000000625df5 in Digikam::IconView::signalRightButtonClicked ()
#15 0x0000000000628905 in Digikam::IconView::contentsMousePressEvent ()
#16 0x00002ab7a4971e09 in Q3ScrollView::viewportMousePressEvent ()
   from /usr/lib64/libQt3Support.so.4
#17 0x00002ab7a4973af2 in Q3ScrollView::eventFilter ()
   from /usr/lib64/libQt3Support.so.4
#18 0x00002ab79ca5f20e in QCoreApplicationPrivate::sendThroughObjectEventFilters () from /usr/lib64/libQtCore.so.4
#19 0x00002ab7a0b85650 in QApplicationPrivate::notify_helper ()
   from /usr/lib64/libQtGui.so.4
#20 0x00002ab7a0b8c28b in QApplication::notify () from /usr/lib64/libQtGui.so.4
#21 0x00002ab79d571a6b in KApplication::notify () from /usr/lib64/libkdeui.so.5
#22 0x00002ab79ca5f2f4 in QCoreApplication::notifyInternal ()
   from /usr/lib64/libQtCore.so.4
#23 0x00002ab7a0b8bd13 in QApplicationPrivate::sendMouseEvent ()
   from /usr/lib64/libQtGui.so.4
#24 0x00002ab7a0bdf827 in QETWidget::translateMouseEvent ()
   from /usr/lib64/libQtGui.so.4
#25 0x00002ab7a0bdea9b in QApplication::x11ProcessEvent ()
   from /usr/lib64/libQtGui.so.4
#26 0x00002ab7a0c00d12 in QEventDispatcherX11::processEvents ()
   from /usr/lib64/libQtGui.so.4
#27 0x00002ab79ca5e6b5 in QEventLoop::processEvents ()
   from /usr/lib64/libQtCore.so.4
#28 0x00002ab79ca5e827 in QEventLoop::exec () from /usr/lib64/libQtCore.so.4
#29 0x00002ab79ca607d1 in QCoreApplication::exec ()
   from /usr/lib64/libQtCore.so.4
#30 0x000000000063e5ec in main ()
#0  0x00002ab7a71c46a1 in nanosleep () from /lib64/libc.so.6
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 168839] digikam crashed after tagging

Bugzilla from gassauer@kde.org
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=168839         




------- Additional Comments From gassauer kde org  2008-08-10 10:05 -------
btw this happens after every tagging
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 168839] digikam crashed after tagging

Gilles Caulier-4
In reply to this post by Bugzilla from gassauer@kde.org
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=168839         




------- Additional Comments From caulier.gilles gmail com  2008-08-10 12:07 -------
The crash is not very unstructive. It sound like a broken package... update or compile digiKam yourself and try again. (the crash is not reproductible here)

Thanks in advance

Gilles Caulier
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 168839] digikam crashed after tagging

Gilles Caulier-4
In reply to this post by Bugzilla from gassauer@kde.org
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=168839         
caulier.gilles gmail com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|general                     |Tags
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 168839] digikam crashed after tagging

Bugzilla from andi.clemens@gmx.net
In reply to this post by Bugzilla from gassauer@kde.org
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=168839         




------- Additional Comments From andi.clemens gmx net  2008-08-10 12:54 -------
Gilles,

I can confirm this, too. It happens when deleting "assignTagsPopup". But for me digiKam code looks normal... strangely it doesn't happen when deleting "removeTagsPopup"... I will compare the code line by line to find any difference.

Andi
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 168839] digikam crashed after tagging

Bugzilla from andi.clemens@gmx.net
In reply to this post by Bugzilla from gassauer@kde.org
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=168839         




------- Additional Comments From andi.clemens gmx net  2008-08-10 13:07 -------
Hmm there is nothing to compare at all, both items are the same class (TagsPopupMenu) and both are initialized identically. I have no clue what is happening here. I changed the deletion order of the two TagsPopupMenu objects, but still it crashes when deleting "assignTagsPopup". So it is not an issue of the removal order.
Since both objects are QObject classes, can't we just remove those delete lines? I thought Qt will handle it be itself and you should never use delete on such objects. When removing those lines, it is working again. Maybe we delete too much here?

Andi
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 168839] digikam crashed after tagging

Bugzilla from andi.clemens@gmx.net
In reply to this post by Bugzilla from gassauer@kde.org
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=168839         




------- Additional Comments From andi.clemens gmx net  2008-08-10 13:13 -------
Created an attachment (id=26766)
 --> (http://bugs.kde.org/attachment.cgi?id=26766&action=view)
fix

Do we really need to delete Q objects here? Without it everything works fine
again...

Andi
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 168839] digikam crashed after tagging

Gilles Caulier-4
In reply to this post by Bugzilla from gassauer@kde.org
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=168839         




------- Additional Comments From caulier.gilles gmail com  2008-08-10 15:28 -------
Andi,

No, we don't need to delete these items here using QT4. I think this code is sequel from Qt3 version of digiKam which can give a side effect in Qt4. I think we have another code like this to remove later, if another report like this are registered.

So for me, it's fine to apply your patch. Just to be sure, try with valgrind if no memory leak appear. If no. go ahead (:=)))

Gilles
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 168839] digikam crashed after tagging

Bugzilla from andi.clemens@gmx.net
In reply to this post by Bugzilla from gassauer@kde.org
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=168839         




------- Additional Comments From andi.clemens gmx net  2008-08-10 17:59 -------
I always thought Q objects (Qt3 and Qt4) are never removed by the user via the delete command, but removing the four lines in the above patch will create memory leaks.
I don't understand why I can delete the removeTag menu but not the assign tag menu... it always crashes. Maybe it is not working because TagsPopupMenu doesn't have a parent widget in the constructor...
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 168839] digikam crashed after tagging

Bugzilla from andi.clemens@gmx.net
In reply to this post by Bugzilla from gassauer@kde.org
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=168839         
andi.clemens gmx net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #26766|0                           |1
        is obsolete|                            |



------- Additional Comments From andi.clemens gmx net  2008-08-11 15:57 -------
Created an attachment (id=26782)
 --> (http://bugs.kde.org/attachment.cgi?id=26782&action=view)
still crashing

I don't know what to do about this... I changed all TagPopupMenu lines in this
patch and removed the "new" operator.
Still it crashes and the stack trace tells me that it is trying to delete a
TagPopupMenu (and strangely it calls ~QMenu twice...).

Gilles, Marcel,

any idea? It shouldn't crash now because the menus are not called with new
anymore and the KActions also have a parent, so they should be removed
correctly by Qt itself.
The good thing: No memory leak anymore :-) But with digiKam crashing this is a
bad compromise.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 168839] digikam crashed after tagging

Bugzilla from andi.clemens@gmx.net
In reply to this post by Bugzilla from gassauer@kde.org
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=168839         




------- Additional Comments From andi.clemens gmx net  2008-08-12 12:34 -------
Ferdinand,

do you have upgraded Qt in the last time? I did so on 07-08-2008 from Qt 4.4.0 to 4.4.1. Maybe this is the reason? For me it looks like a Qt problem, not a digiKam problem because whatever I do here it crashes, although no memory leaks or null pointer issues can be detected.
What Qt version are you running? If you also have 4.4.1 installed, we might have to contact Trolltech about this.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 168839] digikam crashed after tagging

Bugzilla from gassauer@kde.org
In reply to this post by Bugzilla from gassauer@kde.org
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=168839         




------- Additional Comments From gassauer kde org  2008-08-12 16:00 -------
here I have libqt4-4.4.1-6.1
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 168839] digikam crashed after tagging

Bugzilla from andi.clemens@gmx.net
In reply to this post by Bugzilla from gassauer@kde.org
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=168839         




------- Additional Comments From andi.clemens gmx net  2008-08-12 16:07 -------
Do you know when you have updated it from 4.4.0 to 4.4.1?
Gilles, do you run Qt 4.4.0?
So maybe this is an Qt issue, because the source code looks alright, and if you remove all "new" operators and create "normal" objects, it still crashes, although these objects should be deleted correctly when leaving the slot.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 168839] digikam crashed after tagging

Gilles Caulier-4
In reply to this post by Bugzilla from gassauer@kde.org
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=168839         




------- Additional Comments From caulier.gilles gmail com  2008-08-12 16:12 -------
Andy,

Sorry for the delay. I'm just back from Akademy. A great event. Last time, you and Marcel you must come to this event and present your work into digiKam project (:=)))

Here i use Qt 4.4.1 with unstable Mandriva 2009-beta1 + cooker repository (KDE 4.1).

else, stable Mandriva 2008.1 use Qt 4.3.3 (KDE 4.0.3)

Gilles
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 168839] digikam crashed after tagging

Bugzilla from andi.clemens@gmx.net
In reply to this post by Bugzilla from gassauer@kde.org
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=168839         




------- Additional Comments From andi.clemens gmx net  2008-08-12 16:29 -------
Nice that you had a great time... normally I would have been on my way to
norway now :-( but you know my car also is broken... damn... (so there is no
holiday or Akademy this year). But maybe next time I will be able to come to
Akademy...

Damn so this is no Qt problem? I don't get it. This is very strange, even with
this new patch it will crash (although it shouldn't, but maybe I'm wrong
here, memory management has never been the topic I'm good at, I come from a
python background where you don't have to deal with those things...).

And I still don't get why it calls ~QMenu() twice, although the TagPopupMenus
have no children... so what is it doing... hmm... and why only assignTagsMenu
and not the other...? question upon question... :-)

Andi
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 168839] digikam crashed after tagging

Gilles Caulier-4
In reply to this post by Bugzilla from gassauer@kde.org
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=168839         




------- Additional Comments From caulier.gilles gmail com  2008-08-12 16:40 -------
Andi,

In case of crash, what valgrind backtrace report exactly ?

If crash appears about delete operation, the backtrace come from internal Qt4 or still into digiKam code ?

Gilles
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 168839] digikam crashed after tagging

Bugzilla from andi.clemens@gmx.net
In reply to this post by Bugzilla from gassauer@kde.org
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=168839         




------- Additional Comments From andi.clemens gmx net  2008-08-12 17:41 -------
This is what I get from valgrind:

==10925== Invalid read of size 4
==10925==    at 0x5DE73F2: QWidgetAction::releaseWidget(QWidget*) (in /usr/lib/libQtGui.so.4.4.1)
==10925==    by 0x60EA774: QMenu::~QMenu() (in /usr/lib/libQtGui.so.4.4.1)
==10925==    by 0x58D0324: QObjectPrivate::deleteChildren() (in /usr/lib/libQtCore.so.4.4.1)
==10925==    by 0x5DE294A: QWidget::~QWidget() (in /usr/lib/libQtGui.so.4.4.1)
==10925==    by 0x60E8377: QMenu::~QMenu() (in /usr/lib/libQtGui.so.4.4.1)
==10925==    by 0x82F736E: Digikam::TagsPopupMenu::~TagsPopupMenu() (tagspopupmenu.cpp:404)
==10925==    by 0x8228ED0: Digikam::AlbumIconView::slotRightButtonClicked(Digikam::IconItem*, QPoint const&) (albumiconview.cpp:797)
==10925==    by 0x82295A2: Digikam::AlbumIconView::qt_metacall(QMetaObject::Call, int, void**) (albumiconview.moc:190)
==10925==    by 0x58D48D6: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/libQtCore.so.4.4.1)
==10925==    by 0x58D4DEC: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/libQtCore.so.4.4.1)
==10925==    by 0x82AFF66: Digikam::IconView::signalRightButtonClicked(Digikam::IconItem*, QPoint const&) (iconview.moc:113)
==10925==    by 0x82B2834: Digikam::IconView::contentsMousePressEvent(QMouseEvent*) (iconview.cpp:953)
==10925==  Address 0xa22596c is 4 bytes inside a block of size 12 free'd
==10925==    at 0x402272A: operator delete(void*) (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==10925==    by 0x82FAE1B: Digikam::TagToggleAction::~TagToggleAction() (tagspopupmenu.cpp:69)
==10925==    by 0x58D0324: QObjectPrivate::deleteChildren() (in /usr/lib/libQtCore.so.4.4.1)
==10925==    by 0x58D7A03: QObject::~QObject() (in /usr/lib/libQtCore.so.4.4.1)
==10925==    by 0x5D970AF: QActionGroup::~QActionGroup() (in /usr/lib/libQtGui.so.4.4.1)
==10925==    by 0x58D0324: QObjectPrivate::deleteChildren() (in /usr/lib/libQtCore.so.4.4.1)
==10925==    by 0x5DE294A: QWidget::~QWidget() (in /usr/lib/libQtGui.so.4.4.1)
==10925==    by 0x60E8377: QMenu::~QMenu() (in /usr/lib/libQtGui.so.4.4.1)
==10925==    by 0x82F736E: Digikam::TagsPopupMenu::~TagsPopupMenu() (tagspopupmenu.cpp:404)
==10925==    by 0x8228ED0: Digikam::AlbumIconView::slotRightButtonClicked(Digikam::IconItem*, QPoint const&) (albumiconview.cpp:797)
==10925==    by 0x82295A2: Digikam::AlbumIconView::qt_metacall(QMetaObject::Call, int, void**) (albumiconview.moc:190)
==10925==    by 0x58D48D6: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/libQtCore.so.4.4.1)


It is the same backtrace as from GDB.

I used valgrind with those options:

valgrind  --tool=memcheck --leak-check=yes --db-attach=yes --suppressions=digikam4.sup /usr/bin/digikam
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 168839] digikam crashed after tagging

Gilles Caulier-4
In reply to this post by Bugzilla from gassauer@kde.org
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=168839         




------- Additional Comments From caulier.gilles gmail com  2008-08-12 19:42 -------
Andi,

Sound like a similar problem that i have fixed in a past with this commit :

http://websvn.kde.org/?view=rev&revision=787473

Using deleteLater() must fix the problem

Gilles
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 168839] digikam crashed after tagging

Gilles Caulier-4
In reply to this post by Bugzilla from gassauer@kde.org
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=168839         




------- Additional Comments From caulier.gilles gmail com  2008-08-12 19:45 -------
Andy,


>And I still don't get why it calls ~QMenu() twice, although the TagPopupMenus
>have no children... so what is it doing... hmm... and why only assignTagsMenu
>and not the other...? question upon question... :-)

Well it's simple to understand: it's a race condition with Qt when it delete internal menu contents. If menu is big it take a while else it's very fast.

When we delete menu in digiKam before than Qt have deleted internal component, we have a crash. Note this problem is specific to Qt4. With Wt3 i have never seen that.

There is a lots of place where tagpopupmenu is used and deleted by hand. All these codes need to be fixed by this way.

Gilles
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 168839] digikam crashed after tagging

Bugzilla from andi.clemens@gmx.net
In reply to this post by Bugzilla from gassauer@kde.org
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=168839         




------- Additional Comments From andi.clemens gmx net  2008-08-12 19:52 -------
Gilles,

I'm sorry but this doesn't seem to fix the problem, I just tried it. But maybe
I need to call this on the popupmenu (the main menu so to say)...? I'll try
this, too.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
12