Bug 379802 - Renaming files or folders in root position generates a crash in Ark
Summary: Renaming files or folders in root position generates a crash in Ark
Status: RESOLVED FIXED
Alias: None
Product: ark
Classification: Applications
Component: general (show other bugs)
Version: 17.04.0
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Elvis Angelaccio
URL:
Keywords:
: 380803 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-05-14 09:13 UTC by g03ffry
Modified: 2017-06-04 08:29 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 17.04.2
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description g03ffry 2017-05-14 09:13:01 UTC
If I try to rename a file or a folder in root position inside a compressed file I've got always a crash.

The problem doesn't occur when I try to rename a file or a folder that are in subdirectories.

The crash happens with various compressed formats.
Comment 1 Christoph Feck 2017-05-27 00:13:59 UTC
Application: Ark (ark), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f998bbe78c0 (LWP 22287))]

Thread 2 (Thread 0x7f996cece700 (LWP 22289)):
#0  0x00007f9987d387bd in poll () from /lib64/libc.so.6
#1  0x00007f99823f9a96 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f99823f9bac in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f998864647b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#4  0x00007f99885f210a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#5  0x00007f998842fb3b in QThread::exec() () from /usr/lib64/libQt5Core.so.5
#6  0x00007f9985a334f5 in QDBusConnectionManager::run() () from /usr/lib64/libQt5DBus.so.5
#7  0x00007f99884343ca in QThreadPrivate::start(void*) () from /usr/lib64/libQt5Core.so.5
#8  0x00007f99840bd537 in start_thread () from /lib64/libpthread.so.0
#9  0x00007f9987d4204f in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f998bbe78c0 (LWP 22287)):
[KCrash Handler]
#6  0x00007f998862559b in QObject::installEventFilter(QObject*) () from /usr/lib64/libQt5Core.so.5
#7  0x00007f996c4b7895 in ArchiveView::openEntryEditor (this=0x1222170, index=...) at /usr/src/debug/ark-17.07.70git.20170516T042208~6821fb3/part/archiveview.cpp:160
#8  0x00007f996c4948c2 in Ark::Part::slotEditFileName (this=0x1267bf0) at /usr/src/debug/ark-17.07.70git.20170516T042208~6821fb3/part/part.cpp:1419
#9  0x00007f998861ebeb in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib64/libQt5Core.so.5
#10 0x00007f9989340002 in QAction::triggered(bool) () from /usr/lib64/libQt5Widgets.so.5
#11 0x00007f99893424e0 in QAction::activate(QAction::ActionEvent) () from /usr/lib64/libQt5Widgets.so.5
#12 0x00007f998949757a in QMenuPrivate::activateCausedStack(QVector<QPointer<QWidget> > const&, QAction*, QAction::ActionEvent, bool) () from /usr/lib64/libQt5Widgets.so.5
#13 0x00007f998949e6ac in QMenuPrivate::activateAction(QAction*, QAction::ActionEvent, bool) () from /usr/lib64/libQt5Widgets.so.5
#14 0x00007f998949f620 in QMenu::mouseReleaseEvent(QMouseEvent*) () from /usr/lib64/libQt5Widgets.so.5
#15 0x00007f9989384848 in QWidget::event(QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#16 0x00007f99894a19ab in QMenu::event(QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#17 0x00007f9989345fdc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#18 0x00007f998934e058 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#19 0x00007f99885f3968 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#20 0x00007f998934c8cd in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib64/libQt5Widgets.so.5
#21 0x00007f998939e146 in QWidgetWindow::handleMouseEvent(QMouseEvent*) () from /usr/lib64/libQt5Widgets.so.5
#22 0x00007f99893a062b in QWidgetWindow::event(QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#23 0x00007f9989345fdc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#24 0x00007f998934d2e1 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#25 0x00007f99885f3968 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#26 0x00007f9988baf0f3 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/lib64/libQt5Gui.so.5
#27 0x00007f9988bb0b75 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib64/libQt5Gui.so.5
#28 0x00007f9988b8cf4b in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Gui.so.5
#29 0x00007f997c027ac0 in userEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /usr/lib64/libQt5XcbQpa.so.5
#30 0x00007f99823f9897 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#31 0x00007f99823f9b00 in ?? () from /usr/lib64/libglib-2.0.so.0
#32 0x00007f99823f9bac in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#33 0x00007f998864645f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#34 0x00007f99885f210a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#35 0x00007f99885fa5e4 in QCoreApplication::exec() () from /usr/lib64/libQt5Core.so.5
#36 0x000000000040cbfc in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/ark-17.07.70git.20170516T042208~6821fb3/app/main.cpp:301
Comment 2 Elvis Angelaccio 2017-06-01 09:18:16 UTC
Git commit ed46c0d66e82ee33c7342052a91d1ebf0e465bef by Elvis Angelaccio.
Committed on 01/06/2017 at 09:14.
Pushed by elvisangelaccio into branch 'Applications/17.04'.

Fix crash when renaming top-level entries

After commit 7781d6ef79, the model of the archive view changed to the
filter model. So we were asking `m_model` to get an index from
`currentIndex`, which instead belongs to `m_filterModel`.
The returned index is invalid and this causes a crash in the view.
FIXED-IN: 17.04.2

Differential Revision: https://phabricator.kde.org/D5869

M  +1    -1    part/part.cpp

https://commits.kde.org/ark/ed46c0d66e82ee33c7342052a91d1ebf0e465bef
Comment 3 Elvis Angelaccio 2017-06-01 09:27:19 UTC
Git commit f22d84c9db116e7c5a27c6317fdef832f4923ea9 by Elvis Angelaccio.
Committed on 01/06/2017 at 09:23.
Pushed by elvisangelaccio into branch 'master'.

Simplify renaming of entries

Add a slot in ArchiveView that the Part can just connect to, without the
need to figure out which is the correct model to call index() on.

M  +9    -0    part/archiveview.cpp
M  +3    -1    part/archiveview.h
M  +1    -10   part/part.cpp
M  +0    -1    part/part.h

https://commits.kde.org/ark/f22d84c9db116e7c5a27c6317fdef832f4923ea9
Comment 4 Elvis Angelaccio 2017-06-04 08:29:55 UTC
*** Bug 380803 has been marked as a duplicate of this bug. ***