Crash while deleting tag in ImageDescEditTab

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

Crash while deleting tag in ImageDescEditTab

Johannes Wienke-3
Hi Marcel,

I just noticed that digikam crashes if you delete an album in the
imagedescedit tab. Backtrace is:

Thread 1 (Thread 0x7faf753337c0 (LWP 7271)):
[KCrash Handler]
#5  0x00007faf6e48f4d9 in __dynamic_cast () from /usr/lib/libstdc++.so.6
#6  0x00000000006fba8a in
Digikam::TagFolderView::handleCustomContextMenuAction (this=0x28d4800,
action=0x4dc8550, album=0x4b47660) at
/home/languitar/workspace/digiKam/digikam/tagfolderview.cpp:143
#7  0x00000000006f1349 in
Digikam::TagCheckView::handleCustomContextMenuAction (this=0x28d4800,
action=0x4dc8550, album=0x4b47660) at
/home/languitar/workspace/digiKam/digikam/tagcheckview.cpp:231
#8  0x0000000000657956 in
Digikam::AbstractAlbumTreeView::contextMenuEvent (this=0x28d4800,
event=0x7fff8ea70440) at
/home/languitar/workspace/digiKam/digikam/albumtreeview.cpp:716

The reason for this is that the tag is already deleted by the
TagModificationHelper so the pointer in the dynamic cast points to
invalid memory.

Does using AlbumPointer in for the whole context menu handling help to
resolve this?

Johannes


_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel

signature.asc (270 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Crash while deleting tag in ImageDescEditTab

Marcel Wiesweg

> Digikam::AbstractAlbumTreeView::contextMenuEvent (this=0x28d4800,
> event=0x7fff8ea70440) at
> /home/languitar/workspace/digiKam/digikam/albumtreeview.cpp:716
>
> The reason for this is that the tag is already deleted by the
> TagModificationHelper so the pointer in the dynamic cast points to
> invalid memory.
>
> Does using AlbumPointer in for the whole context menu handling help to
> resolve this?

Perhaps it's easier to do the check once in
AbstractAlbumTreeView::contextMenuEvent, between 715 and 716. Using
AlbumPointer there, or some other check. The model will be updated in line 716
already.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel