Bug 238044 - Ark crashes when updating file
Summary: Ark crashes when updating file
Status: RESOLVED FIXED
Alias: None
Product: ark
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Harald Hvaal
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-18 14:40 UTC by Amichai Rothman
Modified: 2010-05-20 10:02 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Amichai Rothman 2010-05-18 14:40:53 UTC
Application: ark (2.14)
KDE Platform Version: 4.4.2 (KDE 4.4.2)
Qt Version: 4.6.2
Operating System: Linux 2.6.32-22-generic x86_64
Distribution: Ubuntu 10.04 LTS

-- Information about the crash:
I have a  password-protected 7z file with a single text file inside it. Seeing that I cannot edit it from within Ark (a feture I miss from winrar), I extracted it to a temp location, edited the file, and intended to update the 7z file with the new text File, But when I dragged the text file (from Dolphin) into the open 7z file in Ark, the crash occured.

Expected behavior: when dragging the text file into Ark, it should ask for confirmation to overwrite the existing file, and if accepted, the 7z file should be updated with the new text file (and of course password protection should be preserved etc.).


The crash can be reproduced every time.

 -- Backtrace:
Application: Ark (ark), signal: Segmentation fault
[Current thread is 1 (Thread 0x7fa3d258e760 (LWP 26476))]

Thread 2 (Thread 0x7fa3c6e04710 (LWP 26485)):
#0  0x00007fa3cf89ef53 in *__GI___poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007fa3cbe4c4a9 in ?? () from /lib/libglib-2.0.so.0
#2  0x00007fa3cbe4c8fc in g_main_context_iteration () from /lib/libglib-2.0.so.0
#3  0x00007fa3cfff2566 in QEventDispatcherGlib::processEvents (this=0x2339a90, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:414
#4  0x00007fa3cffc7992 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#5  0x00007fa3cffc7d6c in QEventLoop::exec (this=0x7fa3c6e03db0, flags=) at kernel/qeventloop.cpp:201
#6  0x00007fa3cfed1d59 in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:487
#7  0x00007fa3cffa8178 in QInotifyFileSystemWatcherEngine::run (this=0x2344840) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007fa3cfed4775 in QThreadPrivate::start (arg=0x2344840) at thread/qthread_unix.cpp:248
#9  0x00007fa3cd84d9ca in start_thread (arg=<value optimized out>) at pthread_create.c:300
#10 0x00007fa3cf8ab69d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fa3d258e760 (LWP 26476)):
[KCrash Handler]
#4  QBasicAtomicInt::ref (this=0x1ea6be0, receivedEntry=<value optimized out>, behaviour=ArchiveModel::NotifyViews) at /usr/include/qt4/QtCore/qatomic_x86_64.h:121
#5  QList (this=0x1ea6be0, receivedEntry=<value optimized out>, behaviour=ArchiveModel::NotifyViews) at /usr/include/qt4/QtCore/qlist.h:114
#6  QForeachContainer (this=0x1ea6be0, receivedEntry=<value optimized out>, behaviour=ArchiveModel::NotifyViews) at /usr/include/qt4/QtCore/qglobal.h:2231
#7  ArchiveDirNode::find (this=0x1ea6be0, receivedEntry=<value optimized out>, behaviour=ArchiveModel::NotifyViews) at ../../../ark/part/archivemodel.cpp:140
#8  ArchiveModel::newEntry (this=0x1ea6be0, receivedEntry=<value optimized out>, behaviour=ArchiveModel::NotifyViews) at ../../../ark/part/archivemodel.cpp:744
#9  0x00007fa3c7260cc8 in ArchiveModel::qt_metacall (this=0x1ea6be0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fa3c0003050) at ./archivemodel.moc:102
#10 0x00007fa3cffd8d49 in QObject::event (this=0x1ea6be0, e=0x7fa3c00010d0) at kernel/qobject.cpp:1248
#11 0x00007fa3d049c22c in QApplicationPrivate::notify_helper (this=0x1d36bf0, receiver=0x1ea6be0, e=0x7fa3c00010d0) at kernel/qapplication.cpp:4300
#12 0x00007fa3d04a26fb in QApplication::notify (this=0x7fff6ed462b0, receiver=0x1ea6be0, e=0x7fa3c00010d0) at kernel/qapplication.cpp:4183
#13 0x00007fa3d1648526 in KApplication::notify (this=0x7fff6ed462b0, receiver=0x1ea6be0, event=0x7fa3c00010d0) at ../../kdeui/kernel/kapplication.cpp:302
#14 0x00007fa3cffc906c in QCoreApplication::notifyInternal (this=0x7fff6ed462b0, receiver=0x1ea6be0, event=0x7fa3c00010d0) at kernel/qcoreapplication.cpp:704
#15 0x00007fa3cffcb7e7 in QCoreApplication::sendEvent (receiver=0x0, event_type=<value optimized out>, data=0x1d1dc30) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#16 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=<value optimized out>, data=0x1d1dc30) at kernel/qcoreapplication.cpp:1345
#17 0x00007fa3cfff29d3 in QCoreApplication::sendPostedEvents (s=<value optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
#18 postEventSourceDispatch (s=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:276
#19 0x00007fa3cbe488c2 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#20 0x00007fa3cbe4c748 in ?? () from /lib/libglib-2.0.so.0
#21 0x00007fa3cbe4c8fc in g_main_context_iteration () from /lib/libglib-2.0.so.0
#22 0x00007fa3cfff2513 in QEventDispatcherGlib::processEvents (this=0x1d1d380, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:412
#23 0x00007fa3d054c46e in QGuiEventDispatcherGlib::processEvents (this=0x7fa3cfb42e40, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#24 0x00007fa3cffc7992 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#25 0x00007fa3cffc7d6c in QEventLoop::exec (this=0x7fff6ed46200, flags=) at kernel/qeventloop.cpp:201
#26 0x00007fa3cffcbaab in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981
#27 0x0000000000409c97 in main (argc=<value optimized out>, argv=<value optimized out>) at ../../../ark/app/main.cpp:210

Possible duplicates by query: bug 225573, bug 224229, bug 222547, bug 221469.

Reported using DrKonqi
Comment 1 Raphael Kubo da Costa 2010-05-18 22:23:46 UTC
Hi there.

Is the crash always reproducible? Does it happen to unencrypted 7zip files and to other formats as well?
Comment 2 Amichai Rothman 2010-05-20 01:16:01 UTC
Just gave it another round of testing: it occurs with unencrypted 7z as well, but zip seems to be ok. I Haven't tried other formats. It is reproducible every time when the new text file is dragged onto the old text file in Ark, and reproducible sometimes when dragging it elsewhere in Ark (anywhere in the empty space of the file view). Other times when doing this, instead of the file being added, the 7z file is added itself (recursively?) with a full path of folders, instead of the text file which was dragged. I've made sure several times that the text file is indeed the only one selected and dragged (not the 7z being dragged onto itself). Strange.
Comment 3 Raphael Kubo da Costa 2010-05-20 01:38:07 UTC
Indeed, I was able to confirm it with a sample 7z archive.
Comment 4 Raphael Kubo da Costa 2010-05-20 03:34:34 UTC
SVN commit 1128701 by rkcosta:

Change the way 7z's listing output is parsed.

7z first lists some information about the archive itself before showing
information about the entries in it, and the code did not take that into
account.

We now make that distinction, so that parsing entries after an entry is
added, for example, works as expected.

CCBUG: 238044

 M  +16 -17    cliplugin.cpp  
 M  +7 -1      cliplugin.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1128701
Comment 5 Raphael Kubo da Costa 2010-05-20 03:36:36 UTC
SVN commit 1128702 by rkcosta:

Backport r1128701.

Change the way 7z's listing output is parsed.

7z first lists some information about the archive itself before showing
information about the entries in it, and the code did not take that into
account.

We now make that distinction, so that parsing entries after an entry is
added, for example, works as expected.

BUG: 238044

 M  +16 -17    cliplugin.cpp  
 M  +7 -1      cliplugin.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1128702
Comment 6 Amichai Rothman 2010-05-20 10:02:22 UTC
Thanks Raphael for your quick responses! Looking forward to the next release...

Also looking forward to using a proper API someday rather than parsing cli output :-)