Bug 343548 - Tag Manager crashes when adding a new tag
Summary: Tag Manager crashes when adding a new tag
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Tags-Manager (show other bugs)
Version: 4.6.0
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2015-01-29 22:57 UTC by vato
Modified: 2017-07-29 07:53 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.13.0


Attachments
New crash information added by DrKonqi (6.84 KB, text/plain)
2015-08-06 17:42 UTC, Wolfgang Bauer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vato 2015-01-29 22:57:18 UTC
Application: digikam (4.6.0)
KDE Platform Version: 4.14.3
Qt Version: 4.8.6
Operating System: Linux 3.16.6-2-desktop x86_64
Distribution: "openSUSE 13.2 (Harlequin) (x86_64)"

-- Information about the crash:
- What I was doing when the application crashed: I opened the tag manager, typed in the name of a new tag and clicked on the + next to it to add the tag. This always causes digikam to crash.

The crash can be reproduced every time.

-- Backtrace:
Application: digiKam (digikam), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f3d6d36d880 (LWP 7379))]

Thread 5 (Thread 0x7f3d4dd7d700 (LWP 7380)):
#0  0x00007f3d65e5176d in recvmsg () at /lib64/libc.so.6
#1  0x00007f3d6d3e4eb9 in udev_monitor_receive_device () at /usr/lib64/libudev.so.1
#2  0x00007f3d4e6fc2eb in  () at /usr/lib64/libusb-1.0.so.0
#3  0x00007f3d63d9e0a4 in start_thread () at /lib64/libpthread.so.0
#4  0x00007f3d65e507fd in clone () at /lib64/libc.so.6

Thread 4 (Thread 0x7f3d474fb700 (LWP 7381)):
#0  0x00007f3d63da205f in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1  0x00007f3d66930c86 in QWaitCondition::wait(QMutex*, unsigned long) () at /usr/lib64/libQtCore.so.4
#2  0x00000000005e424e in Digikam::ScanController::run() (this=0x26e43a0) at /usr/src/debug/digikam-4.6.0/core/app/database/scancontroller.cpp:725
#3  0x00007f3d6693079f in  () at /usr/lib64/libQtCore.so.4
#4  0x00007f3d63d9e0a4 in start_thread () at /lib64/libpthread.so.0
#5  0x00007f3d65e507fd in clone () at /lib64/libc.so.6

Thread 3 (Thread 0x7f3d46cfa700 (LWP 7382)):
#0  0x00007fff71ffcbb6 in  ()
#1  0x0000000000000000 in  ()

Thread 2 (Thread 0x7f3d464f9700 (LWP 7385)):
#0  0x00007f3d63da205f in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1  0x00007f3d66930c86 in QWaitCondition::wait(QMutex*, unsigned long) () at /usr/lib64/libQtCore.so.4
#2  0x00007f3d6b1233fa in Digikam::ParkingThread::run() (this=0x2a30ba0) at /usr/src/debug/digikam-4.6.0/core/libs/threads/threadmanager.cpp:119
#3  0x00007f3d6693079f in  () at /usr/lib64/libQtCore.so.4
#4  0x00007f3d63d9e0a4 in start_thread () at /lib64/libpthread.so.0
#5  0x00007f3d65e507fd in clone () at /lib64/libc.so.6

Thread 1 (Thread 0x7f3d6d36d880 (LWP 7379)):
[KCrash Handler]
#5  0x000000000059cd70 in Digikam::TAlbum::icon() const (other=..., this=0x7fff71fccc30, this@entry=0x7fff71fcc940) at /usr/include/QtCore/qstring.h:725
#6  0x000000000059cd70 in Digikam::TAlbum::icon() const (this=this@entry=0x0) at /usr/src/debug/digikam-4.6.0/core/app/album/album.cpp:526
#7  0x000000000064235b in Digikam::TagEditDlg::TagEditDlg(QWidget*, Digikam::TAlbum*, bool) (this=0x8d1dcf0, parent=<optimized out>, album=0x0, create=<optimized out>) at /usr/src/debug/digikam-4.6.0/core/app/tags/tageditdlg.cpp:182
#8  0x00000000006432ad in Digikam::TagEditDlg::tagCreate(QWidget*, Digikam::TAlbum*, QString&, QString&, QKeySequence&) (parent=0x61dfa10, album=album@entry=0x0, title=..., icon=..., ks=...) at /usr/src/debug/digikam-4.6.0/core/app/tags/tageditdlg.cpp:346
#9  0x00000000006482ba in Digikam::TagsManager::slotAddAction() (this=<optimized out>) at /usr/src/debug/digikam-4.6.0/core/app/tags/tagsmanager/tagsmanager.cpp:265
#10 0x000000000064b285 in Digikam::TagsManager::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=<optimized out>, _id=<optimized out>, _a=<optimized out>, _c=<optimized out>) at /usr/src/debug/digikam-4.6.0/build/core/app/tagsmanager.moc:73
#11 0x00007f3d66a461fa in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () at /usr/lib64/libQtCore.so.4
#12 0x00007f3d6743a622 in QAction::triggered(bool) () at /usr/lib64/libQtGui.so.4
#13 0x00007f3d6743bfd3 in QAction::activate(QAction::ActionEvent) () at /usr/lib64/libQtGui.so.4
#14 0x00007f3d677ee112 in  () at /usr/lib64/libQtGui.so.4
#15 0x00007f3d677ee23c in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () at /usr/lib64/libQtGui.so.4
#16 0x00007f3d678a516a in QToolButton::mouseReleaseEvent(QMouseEvent*) () at /usr/lib64/libQtGui.so.4
#17 0x00007f3d6748fc0a in QWidget::event(QEvent*) () at /usr/lib64/libQtGui.so.4
#18 0x00007f3d6744076c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib64/libQtGui.so.4
#19 0x00007f3d67446dea in QApplication::notify(QObject*, QEvent*) () at /usr/lib64/libQtGui.so.4
#20 0x00007f3d68158baa in KApplication::notify(QObject*, QEvent*) () at /usr/lib64/libkdeui.so.5
#21 0x00007f3d66a322ad in QCoreApplication::notifyInternal(QObject*, QEvent*) () at /usr/lib64/libQtCore.so.4
#22 0x00007f3d674465e3 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () at /usr/lib64/libQtGui.so.4
#23 0x00007f3d674b7c9b in  () at /usr/lib64/libQtGui.so.4
#24 0x00007f3d674b670c in QApplication::x11ProcessEvent(_XEvent*) () at /usr/lib64/libQtGui.so.4
#25 0x00007f3d674dd5c2 in  () at /usr/lib64/libQtGui.so.4
#26 0x00007f3d5dea8a04 in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
#27 0x00007f3d5dea8c48 in  () at /usr/lib64/libglib-2.0.so.0
#28 0x00007f3d5dea8cec in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#29 0x00007f3d66a5f0de in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQtCore.so.4
#30 0x00007f3d674dd676 in  () at /usr/lib64/libQtGui.so.4
#31 0x00007f3d66a30e6f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQtCore.so.4
#32 0x00007f3d66a31165 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQtCore.so.4
#33 0x00007f3d66a365b9 in QCoreApplication::exec() () at /usr/lib64/libQtCore.so.4
#34 0x00000000004a11c0 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/digikam-4.6.0/core/app/main/main.cpp:237

Reported using DrKonqi
Comment 1 caulier.gilles 2015-01-30 07:06:38 UTC
It crash in Qt::QString API when TagEditDialog is started to change tag properties, especially the icon. The QString instance content is the path of tag icon on your system.

Gilles Caulier
Comment 2 vato 2015-01-31 03:31:16 UTC
After upgrading to the newest build in the repositories, Digikam does not crash anymore.
Comment 3 Wolfgang Bauer 2015-08-06 17:42:31 UTC
Created attachment 93920 [details]
New crash information added by DrKonqi

digikam (4.11.0) on KDE Platform 4.14.9 using Qt 4.8.6

- What I was doing when the application crashed:
Open the tag editor, select the existing "Persons" tag and click on "+" to create a new sub-tag.
Then delete the sub-tag again.
If you click on '+' again, digikam crahes.

Or just delete the existing "Persons" tag, digikam will crash if you click on'+' to create a new one afterwards.

This is reproducible with both digikam 4.11.0 and the latest git version in the frameworks5 branch.

-- Backtrace (Reduced):
#5  0x000000000059d200 in Digikam::TAlbum::icon() const (other=..., this=0x7ffc1af1cd40, this@entry=0x7ffc1af1ca50) at /usr/include/QtCore/qstring.h:725
#6  0x000000000059d200 in Digikam::TAlbum::icon() const (this=this@entry=0x0) at /usr/src/debug/digikam-4.11.0/core/app/album/album.cpp:526
#7  0x000000000064297b in Digikam::TagEditDlg::TagEditDlg(QWidget*, Digikam::TAlbum*, bool) (this=0x3ba0670, parent=<optimized out>, album=0x0, create=<optimized out>) at /usr/src/debug/digikam-4.11.0/core/app/tags/tageditdlg.cpp:182
#8  0x00000000006438cd in Digikam::TagEditDlg::tagCreate(QWidget*, Digikam::TAlbum*, QString&, QString&, QKeySequence&) (parent=0x6583390, album=album@entry=0x0, title=..., icon=..., ks=...) at /usr/src/debug/digikam-4.11.0/core/app/tags/tageditdlg.cpp:346
#9  0x0000000000648a1a in Digikam::TagsManager::slotAddAction() (this=<optimized out>) at /usr/src/debug/digikam-4.11.0/core/app/tags/tagsmanager/tagsmanager.cpp:265
Comment 4 Wolfgang Bauer 2015-08-06 17:46:22 UTC
Reopening per the previous comment.
Comment 5 Maik Qualmann 2015-08-06 18:53:39 UTC
Git commit 23adeac16184bde826d1287af3bbea8819f4e4ec by Maik Qualmann.
Committed on 06/08/2015 at 18:48.
Pushed by mqualmann into branch 'master'.

disable the add tag action when no tag is selected
FIXED-IN: 4.13.0

M  +2    -1    NEWS
M  +2    -0    app/tags/tagsmanager/tagsmanager.cpp

http://commits.kde.org/digikam/23adeac16184bde826d1287af3bbea8819f4e4ec
Comment 6 Veaceslav Munteanu 2015-08-06 18:55:40 UTC
Haha .. commit collision :D

Maik, revert your commit, this is not the intended bahaviour :))

I commited a fixin frameworks branch
Comment 7 Maik Qualmann 2015-08-06 19:03:33 UTC
Yes, check on whether the parent zero's what I thought. But the add action button should be turned off. I will add your patch of frameworks also to master?

Maik
Comment 8 Veaceslav Munteanu 2015-08-06 19:06:44 UTC
I will revert your commit and  port mine, since default intended behaviour is to add tags under root tag, if nothing is selected.

Add tag must be always enabled.
Comment 9 Maik Qualmann 2015-08-06 19:10:49 UTC
Yes, I have now seen that the root tag is then taken. Ok, make my commit please undo.

Maik
Comment 10 Veaceslav Munteanu 2015-08-06 19:19:25 UTC
done... Wolfgang, please check if crash is fixed
Comment 11 Wolfgang Bauer 2015-08-06 19:25:07 UTC
Wow, thanks for that quick fix! :-)

(In reply to Veaceslav Munteanu from comment #10)
> done... Wolfgang, please check if crash is fixed
I will. I suppose I need commits 6eace13 and 445a9f3 for the KDE4 version, right?
Comment 12 Veaceslav Munteanu 2015-08-06 19:31:13 UTC
Just use the current git master branch  or frameworks branch(where is also 959b42e for KDE4, which reverts Maik's commit).

Both have now the same fix.
Comment 13 Wolfgang Bauer 2015-08-07 10:50:43 UTC
I tried bot the latest git master branch and frameworks now, and cannot reproduce the crash in either.

So this seems to be fixed indeed, thanks again!