[Bug 176472] New: Moving/Deleting all files from an album crashes digikam

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

[Bug 176472] New: Moving/Deleting all files from an album crashes digikam

yann LE HIR-2
http://bugs.kde.org/show_bug.cgi?id=176472

           Summary: Moving/Deleting all files from an album crashes digikam
           Product: digikam
           Version: unspecified
          Platform: Gentoo Packages
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: crash
          Priority: NOR
         Component: general
        AssignedTo: [hidden email]
        ReportedBy: [hidden email]


Version:           0.10.0-SVN-890620 (using KDE 4.1.3)
Compiler:          cmake 2.6, gcc 4.1.2
OS:                Linux
Installed from:    Gentoo Packages

When moving all photos from an album to an other crashes digikam.

gdb trace & patch coming.


--
Configure bugmail: http://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 176472] Moving/Deleting all files from an album crashes digikam

yann LE HIR-2
http://bugs.kde.org/show_bug.cgi?id=176472





--- Comment #1 from yann LE HIR <yann lehir gmail com>  2008-11-29 18:22:22 ---
Created an attachment (id=28928)
 --> (http://bugs.kde.org/attachment.cgi?id=28928)
gdb trace


--
Configure bugmail: http://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 176472] Moving/Deleting all files from an album crashes digikam

yann LE HIR-2
In reply to this post by yann LE HIR-2
http://bugs.kde.org/show_bug.cgi?id=176472





--- Comment #2 from yann LE HIR <yann lehir gmail com>  2008-11-29 18:24:40 ---
Created an attachment (id=28929)
 --> (http://bugs.kde.org/attachment.cgi?id=28929)
patch

Patch to apply in digikam/utilities/imageeditor/editor
Solved the problem.


--
Configure bugmail: http://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 176472] Moving/Deleting all files from an album crashes digikam

Bugzilla from finex@finex.org
In reply to this post by yann LE HIR-2
http://bugs.kde.org/show_bug.cgi?id=176472





--- Comment #3 from FiNeX <finex finex org>  2008-11-30 13:49:57 ---
Backtrace from comment #1:


digikam(21661) Digikam::ImageScanner::addImage: Adding new item "144.JPG"
digikam(21661) Digikam::ImageScanner::copyFromSource: Recognized "XXX/144.JPG"
as copied from 61584
ASSERT failure in QList<T>::operator[]: "index out of range", file
/usr/include/qt4/QtCore/qlist.h, line 401

Program received signal SIGABRT, Aborted.
[Switching to Thread 0xb4c29700 (LWP 21661)]
0xffffe424 in __kernel_vsyscall ()
(gdb)
(gdb) bt
#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb51edf4f in raise () from /lib/libc.so.6
#2  0xb530eff4 in ?? () from /lib/libc.so.6
#3  0xb4c29700 in ?? ()
#4  0xb51ef958 in abort () from /lib/libc.so.6
#5  0x00000040 in ?? ()
#6  0x0808f38a in Digikam::ImageWindow::removeItem (this=0xaa31cac8, index=1)
    at
/home/build/digikam_4.1/graphics/digikam/utilities/imageeditor/editor/imagewindow.cpp:1135
#7  0x0808f6ae in Digikam::ImageWindow::slotCollectionImageChange (
    this=0xaa31cac8, changeset=@0xa6ff1a88)
    at
/home/build/digikam_4.1/graphics/digikam/utilities/imageeditor/editor/imagewindow.cpp:1184
#8  0x08096b1f in Digikam::ImageWindow::qt_metacall (this=0xaa31cac8,
    _c=QMetaObject::InvokeMetaMethod, _id=30, _a=0xa6ff1a78)
    at
/home/build/digikam_4.1/graphics/build/digikam/digikam/imagewindow.moc:152
#9  0xb7e1517a in QMetaCallEvent::placeMetaCall ()
   from /usr/lib/qt4/libQtCore.so.4
#10 0xb7e1701d in QObject::event () from /usr/lib/qt4/libQtCore.so.4
#11 0xb5fa496a in QWidget::event () from /usr/lib/qt4/libQtGui.so.4
#12 0xb6312dd1 in QMainWindow::event () from /usr/lib/qt4/libQtGui.so.4
#13 0xb79aa1a0 in KMainWindow::event () from /usr/kde/4.1/lib/libkdeui.so.5
#14 0xaa31cac8 in ?? ()
#15 0xaa981670 in ?? ()
#16 0x00000000 in ?? ()


--
Configure bugmail: http://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 176472] Moving/Deleting all files from an album crashes digikam

Gilles Caulier-4
In reply to this post by yann LE HIR-2
http://bugs.kde.org/show_bug.cgi?id=176472


Gilles Caulier caulier gilles gmail com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|general                     |Image Editor




--- Comment #4 from Gilles Caulier <caulier gilles gmail com>  2008-12-01 12:58:01 ---
Yann,

Thanks for the patch... It's sound fine for me...

Andi, What do you think about ?

Gilles


--
Configure bugmail: http://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 176472] Moving/Deleting all files from an album crashes digikam

Bugzilla from andi.clemens@gmx.net
In reply to this post by yann LE HIR-2
http://bugs.kde.org/show_bug.cgi?id=176472





--- Comment #5 from Andi Clemens <andi clemens gmx net>  2008-12-01 13:09:48 ---
Sounds ok, although I can not reproduce the crash here... moved my whole albums
and images around, works like a charm.

Andi


--
Configure bugmail: http://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 176472] Moving/Deleting all files from an album crashes digikam

Marcel Wiesweg
In reply to this post by yann LE HIR-2
http://bugs.kde.org/show_bug.cgi?id=176472





--- Comment #6 from Marcel Wiesweg <marcel wiesweg gmx de>  2008-12-01 19:22:41 ---
SVN commit 891327 by mwiesweg:

Patch by Yann Le Hir:
Fix off-by-one error causing a crash when the last image is removed

CCBUG: 176472

 M  +1 -1      imagewindow.cpp  


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


--
Configure bugmail: http://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 176472] Moving/Deleting all files from an album crashes digikam

Marcel Wiesweg
In reply to this post by yann LE HIR-2
http://bugs.kde.org/show_bug.cgi?id=176472


Marcel Wiesweg marcel wiesweg gmx de changed:

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




--- Comment #7 from Marcel Wiesweg <marcel wiesweg gmx de>  2008-12-01 19:32:50 ---
Yann, you see that I committed one line of your patch that fixes a problem that
can lead to a crash.

As to the rest of your patch:
If you remove index first, then index and not index+1 already points to the
next entry. If you increment index, you get the entry two slots after the
initial entry. Or am I mistaken?


--
Configure bugmail: http://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 176472] Moving/Deleting all files from an album crashes digikam

yann LE HIR-2
In reply to this post by yann LE HIR-2
http://bugs.kde.org/show_bug.cgi?id=176472





--- Comment #8 from yann LE HIR <yann lehir gmail com>  2008-12-01 20:00:18 ---
Yes, you're right about my patch , I completly forgot about this index changing
after a remove.
But with your patch the program will never delete the first element (id 0) of a
list which has 1 element.

So maybe doing something like that :

d->urlList.removeAt(index);
if (!d->imageInfoList.isEmpty())
    d->imageInfoList.removeAt(index);

if (index < d->urlList.size())
{
    // Try to get the next image in the current Album...
    d->urlCurrent       = d->urlList[index];
    d->imageInfoCurrent = d->imageInfoList[index];
    return true;
}
else if(index - 1 >= 0)
{
    // Try to get the previous image in the current Album.
    --index;
    d->urlCurrent       = d->urlList[index];
    d->imageInfoCurrent = d->imageInfoList[index];
    return true;
}


--
Configure bugmail: http://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 176472] Moving/Deleting all files from an album crashes digikam

Marcel Wiesweg
In reply to this post by yann LE HIR-2
http://bugs.kde.org/show_bug.cgi?id=176472





--- Comment #9 from Marcel Wiesweg <marcel wiesweg gmx de>  2008-12-01 21:21:08 ---
SVN commit 891351 by mwiesweg:

Patch from Yann Le Hir:
The last element of a list of size 1 was never deleted.

CCBUG: 176472

 M  +7 -10     imagewindow.cpp  


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


--
Configure bugmail: http://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