Summary: | Tagging some face then go to tag manager and test tag manager UI... | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | e.longuemare |
Component: | Tags-Manager | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | caulier.gilles, e.longuemare, veaceslav.munteanu90 |
Priority: | NOR | Keywords: | drkonqi |
Version: | 4.0.0 | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 4.0.0 | |
Sentry Crash Report: | |||
Attachments: |
New crash information added by DrKonqi
Screen capture - left digikam 3.5.0 - right digikam 4.0.0 beta1 that crash |
Description
e.longuemare
2013-10-24 02:43:06 UTC
recognition.db was 19.1mo after run a "facetraining" with an empty db (13.3ko). Now the db is about 38.2mo. Two face have been tagged since training. Memory load jump, I was able to go in tag manager, and digikam crash with a segfault. I think it's related to this : https://bugs.kde.org/show_bug.cgi?id=323888 (posts on database grow) Yes, it's a crash in tags manager. Gilles Caulier Can you tell me more, about what you did exaclty, because I can't reproduce crash locally, and backtrace doesn't tell me too much, code is ok, I can't even add additional guards... I try to reproduce it today, and give you more backtrace and detail.
Thank you,
Eric
Le jeudi 24 octobre 2013 à 06:11 +0000, Veaceslav Munteanu a écrit :
> https://bugs.kde.org/show_bug.cgi?id=326542
>
> --- Comment #3 from Veaceslav Munteanu <slavuttici@gmail.com> ---
> Can you tell me more, about what you did exaclty, because I can't reproduce
> crash locally, and backtrace doesn't tell me too much, code is ok, I can't even
> add additional guards...
>
Veaceslav, Accordingly with BT; crash is in this code : int ListItem::row() const { if (d->parentItem) return d->parentItem->d->childItems.indexOf(const_cast<ListItem*>(this)); return 0; } I recommend to check the cast of "const_cast<ListItem*>(this)" using dynamic_cast and to check returned value to see if it's null, before to use it with indexOf(). Something like this : ListItem* const item = dynamic_cast<ListItem*>(this); if (item) { ... } Gilles Created attachment 83082 [details]
New crash information added by DrKonqi
digikam (4.0.0-beta1) on KDE Platform 4.11.2 using Qt 4.8.2
- What I was doing when the application crashed:
1 - goto tag manager
2 - click on button add (up to category)
3 - select added category
4 - right clic on category and delete
I have done anythyng else, Digikam crash as soon as delete is clicked
-- Backtrace (Reduced):
#7 0x0827f923 in Digikam::ListItem::row (this=0x5) at /home/eric/digikamgit2/dk2/digikam/tags/tagsmanager/models/tagmngrlistitem.cpp:187
#8 0x0827f0d5 in Digikam::TagMngrListModel::parent (this=0xb938568, index=...) at /home/eric/digikamgit2/dk2/digikam/tags/tagsmanager/models/tagmngrlistmodel.cpp:298
#9 0x02ff05fd in parent (this=<optimized out>) at kernel/qabstractitemmodel.h:393
#10 QPersistentModelIndex::parent (this=0xb81cee0) at kernel/qabstractitemmodel.cpp:347
#11 0x02af8def in parent (this=0xb81cee0) at itemviews/qitemselectionmodel.h:78
Created attachment 83083 [details]
Screen capture - left digikam 3.5.0 - right digikam 4.0.0 beta1 that crash
1 - add a tag to quick access list
2 - delete it (right clic on tag and delete)
3 - digikam crash
PS - i use the two in the same time for tag control (same content of databases but different databases for the two digikam version) -
> Git commit 4ecd5abeb3673519e6de7f155e1cc4ac37f5f1b6 by Veaceslav Munteanu. > Committed on 24/10/2013 at 22:45. > Pushed by munteanu into branch 'master'. > > M +3 -1 digikam/tags/tagsmanager/models/tagmngrlistitem.cpp > M +3 -1 digikam/tags/tagsmanager/models/tagmngrlistitem.h > M +14 -1 digikam/tags/tagsmanager/models/tagmngrlistmodel.cpp > > http://commits.kde.org/digikam/4ecd5abeb3673519e6de7f155e1cc4ac37f5f1b6 This one was really hard to debug... after all deleting a item wasn't a good idea since it was still in use... but now it's a memory leak that I don't know how to fix (look for comment in diffs) Any ideas? From your comment : /** NOTE: trying to delete the item here will cause a crash since * somehow, View still use the old item * Even deleteLater() doesn't help ... */ //item->deleteLater(); Do you identified where item still used and by what ? Gilles Caulier Are you sure that you have a memory leak. item is QObject based and must be cleaned by Qt and end of digiKam session. Use valgrind to check, following these intructions: https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/entry/HACKING#L281 Gilles Caulier It was a memory leak before my fix, I added QObject later, It may leak while digikam is active, but I think user won't delete 1 million entries to make a serious leak... Veaceslav, I checked with valgrind to see if memory leak exists in TagsManager implementation, and i cannot see any report about. So for me, this file can be closed as solved, if crash has disappear... Gilles Caulier Ok, then I will delete that message and close this bug. |