[Bug 209207] New: Crash when deleting saved searches (GPS and Timeline)

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

[Bug 209207] Crash when deleting saved searches (GPS and Timeline)

Marcel Wiesweg
https://bugs.kde.org/show_bug.cgi?id=209207





--- Comment #19 from Marcel Wiesweg <marcel wiesweg gmx de>  2009-10-09 18:17:44 ---

> If you use kDebug() to analyze the pointers, you can see that
> QList::erase() is NOT returning the next iter object pointer, but the current
> one.
> Why?

I will assume, until proven otherwise, that QList is working perfectly and our
code is faulty ;-)

Is it returning the same iterator, or the same AlbumHistory pointer? In the
latter case, probably, this pointer is added twice?

What about the idea of rewriting the class value-based around a
QList<HistoryItem> or a QStack<HistoryItem>?

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 209207] Crash when deleting saved searches (GPS and Timeline)

Bugzilla from andi.clemens@gmx.net
In reply to this post by Michael G. Hansen
https://bugs.kde.org/show_bug.cgi?id=209207





--- Comment #20 from Andi Clemens <andi clemens gmx net>  2009-10-09 18:26:52 ---
It is returning the same HistoryItem pointer.
It is not added twice, I checked that.
QList::erase() works perfectly fine in other code. It could be that addAlbum()
is somehow called, but when I set a breakpoint in there, it is not executed
when I delete a HistoryItem.

This bug is killing me, I spent 5 hours in total now on it :D
Weird thing, and without valgrind you will get no useful info at all, gdb is
not detecting that the item has been already removed (invalid read of 4).

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 209207] Crash when deleting saved searches (GPS and Timeline)

Bugzilla from andi.clemens@gmx.net
In reply to this post by Michael G. Hansen
https://bugs.kde.org/show_bug.cgi?id=209207





--- Comment #21 from Andi Clemens <andi clemens gmx net>  2009-10-10 11:58:15 ---
I have extracted our code from AlbumHistory into a separate small app:
http://digikam3rdparty.free.fr/misc.tarballs/temp/crashy.tar.gz

If you compile it, you get the crash (and if you run valgrind you get the same
errors as in digiKam).

Now uncomment the "delete *iter" line, it will work.
Question is: Are we doing something stupid here or is it a bug in Qt?
When we DON'T delete the object that iter points to, it crashes (QList::erase()
returns the same iterator object), but if we DO delete it, everything is fine?
Weird!

Andi

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 209207] Crash when deleting saved searches (GPS and Timeline)

Bugzilla from andi.clemens@gmx.net
In reply to this post by Michael G. Hansen
https://bugs.kde.org/show_bug.cgi?id=209207


Andi Clemens <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




--- Comment #22 from Andi Clemens <andi clemens gmx net>  2009-10-12 19:46:42 ---
SVN commit 1034433 by aclemens:

Fix crash due to invalid iterator usage.
I guess such fixes need to be done throughout the digiKam code base.

BUG:209207

 M  +5 -9      albumhistory.cpp  


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

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 209207] Crash when deleting saved searches (GPS and Timeline)

Gilles Caulier-4
In reply to this post by Michael G. Hansen
https://bugs.kde.org/show_bug.cgi?id=209207


Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|1.0.0-beta5                 |1.0.0




--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
12