Bug 409722 - Krusader crash when trying to view any archive using the ark part
Summary: Krusader crash when trying to view any archive using the ark part
Status: RESOLVED FIXED
Alias: None
Product: ark
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Elvis Angelaccio
URL:
Keywords: drkonqi
: 405410 411614 414294 433651 434798 440784 441461 445101 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-07-11 16:57 UTC by Marc Bohets
Modified: 2021-12-07 23:42 UTC (History)
14 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
This is the file I tried to view (22.98 KB, application/x-musescore)
2019-07-11 17:01 UTC, Marc Bohets
Details
New backtrace (9.50 KB, text/plain)
2019-07-14 15:44 UTC, Davide Gianforte
Details
New crash information added by DrKonqi (7.47 KB, text/plain)
2021-03-22 11:23 UTC, Vaso
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Bohets 2019-07-11 16:57:01 UTC
Application: krusader (2.7.1 "Peace of Mind")

Qt Version: 5.12.3
Frameworks Version: 5.59.0
Operating System: Linux 4.15.0-54-generic x86_64
Distribution: KDE neon User Edition 5.16

-- Information about the crash:
What I was doing when the application crashed:
- Open Krusader
- Goto file location
- Select the file via the touchpad (single click)
- Click the F3 View button
----> CRASH

When looking at the file clicking the F4 Edit button, there is no crash, the file opens normally.
Using KDE neon
The system just got an update, so is completely up to date.
To make sure the crash was not caused by doing the manipulation during system upgrade, I rebooted the laptop and tried again 
--> same result
marc@marc-samsung:~$ uname -a
Linux marc-samsung 4.15.0-54-generic #58-Ubuntu SMP Mon Jun 24 10:55:24 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

The crash can be reproduced every time.

-- Backtrace:
Application: Krusader (krusader), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fd24bb110c0 (LWP 2158))]

Thread 4 (Thread 0x7fd223ded700 (LWP 2163)):
#0  QMutex::lock (this=this@entry=0x5629505ef880) at thread/qmutex.cpp:222
#1  0x00007fd245ed8ccc in QMutexLocker::QMutexLocker (m=0x5629505ef880, this=<synthetic pointer>) at ../../include/QtCore/../../src/corelib/thread/qmutex.h:206
#2  QThreadData::canWaitLocked (this=0x5629505ef850) at ../../include/QtCore/5.12.3/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:269
#3  postEventSourcePrepare (s=0x7fd214004ba0, timeout=0x7fd223decba4) at kernel/qeventdispatcher_glib.cpp:259
#4  0x00007fd23fdc9b28 in g_main_context_prepare () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fd23fdca4fb in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007fd23fdca6dc in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#7  0x00007fd245ed8dcb in QEventDispatcherGlib::processEvents (this=0x7fd214000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#8  0x00007fd245e7a03a in QEventLoop::exec (this=this@entry=0x7fd223decd70, flags=..., flags@entry=...) at kernel/qeventloop.cpp:225
#9  0x00007fd245ca14ca in QThread::exec (this=<optimized out>) at thread/qthread.cpp:531
#10 0x00007fd2478fa015 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#11 0x00007fd245ca2c72 in QThreadPrivate::start (arg=0x7fd247b71d80) at thread/qthread_unix.cpp:361
#12 0x00007fd243bea6db in start_thread (arg=0x7fd223ded700) at pthread_create.c:463
#13 0x00007fd24520488f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 3 (Thread 0x7fd2295b5700 (LWP 2162)):
#0  0x00007fd243bf09f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x56295042d8b8) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x56295042d868, cond=0x56295042d890) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=0x56295042d890, mutex=0x56295042d868) at pthread_cond_wait.c:655
#3  0x00007fd22f6c90aa in ?? () from /usr/lib/x86_64-linux-gnu/dri/r600_dri.so
#4  0x00007fd22f6c8dd7 in ?? () from /usr/lib/x86_64-linux-gnu/dri/r600_dri.so
#5  0x00007fd243bea6db in start_thread (arg=0x7fd2295b5700) at pthread_create.c:463
#6  0x00007fd24520488f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7fd22a3e6700 (LWP 2161)):
#0  0x00007fd243bf09f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5629504cc9e4) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x5629504cc990, cond=0x5629504cc9b8) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=0x5629504cc9b8, mutex=0x5629504cc990) at pthread_cond_wait.c:655
#3  0x00007fd22f6c90aa in ?? () from /usr/lib/x86_64-linux-gnu/dri/r600_dri.so
#4  0x00007fd22f6c8dd7 in ?? () from /usr/lib/x86_64-linux-gnu/dri/r600_dri.so
#5  0x00007fd243bea6db in start_thread (arg=0x7fd22a3e6700) at pthread_create.c:463
#6  0x00007fd24520488f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7fd24bb110c0 (LWP 2158)):
[KCrash Handler]
#6  0x0000000000000000 in ?? ()
#7  0x00007fd245eafc82 in QObjectPrivate::connectImpl (sender=sender@entry=0x562950ba6700, signal_index=3, receiver=receiver@entry=0x562950b87f80, slot=slot@entry=0x7ffe255c0b80, slotObj=slotObj@entry=0x562950b51d60, type=<optimized out>, types=<optimized out>, senderMetaObject=<optimized out>) at kernel/qobject.cpp:4903
#8  0x00007fd245eaff2a in QObject::connectImpl (sender=sender@entry=0x562950ba6700, signal=signal@entry=0x7ffe255c0b70, receiver=receiver@entry=0x562950b87f80, slot=slot@entry=0x7ffe255c0b80, slotObj=0x562950b51d60, type=Qt::AutoConnection, types=0x0, senderMetaObject=0x7fd219df0700 <Kerfuffle::ReadOnlyArchiveInterface::staticMetaObject>) at kernel/qobject.cpp:4835
#9  0x00007fd219b93e4d in QObject::connect<void (Kerfuffle::ReadOnlyArchiveInterface::*)(), void (Kerfuffle::Job::*)()> (type=Qt::AutoConnection, slot=&virtual table offset 144, receiver=0x562950b87f80, signal=(void (Kerfuffle::ReadOnlyArchiveInterface::*)(Kerfuffle::ReadOnlyArchiveInterface * const)) 0x7fd219bcded0 <Kerfuffle::ReadOnlyArchiveInterface::cancelled()>, sender=0x562950ba6700) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject.h:254
#10 Kerfuffle::Job::connectToArchiveInterfaceSignals (this=this@entry=0x562950b87f80) at ./kerfuffle/jobs.cpp:153
#11 0x00007fd219b94f82 in Kerfuffle::LoadJob::doWork (this=0x562950b87f80) at ./kerfuffle/jobs.cpp:267
#12 0x00007fd245eb8804 in QtPrivate::QSlotObjectBase::call (a=0x7ffe255c0c70, r=<optimized out>, this=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:394
#13 QSingleShotTimer::timerEvent (this=0x562950d0f540) at kernel/qtimer.cpp:318
#14 0x00007fd245eac39b in QObject::event (this=0x562950d0f540, e=<optimized out>) at kernel/qobject.cpp:1282
#15 0x00007fd246e9165c in QApplicationPrivate::notify_helper (this=this@entry=0x5629503c76a0, receiver=receiver@entry=0x562950d0f540, e=e@entry=0x7ffe255c0fb0) at kernel/qapplication.cpp:3736
#16 0x00007fd246e98b90 in QApplication::notify (this=0x7ffe255c1310, receiver=0x562950d0f540, e=0x7ffe255c0fb0) at kernel/qapplication.cpp:3483
#17 0x00007fd245e7bd18 in QCoreApplication::notifyInternal2 (receiver=0x562950d0f540, event=0x7ffe255c0fb0) at kernel/qcoreapplication.cpp:1060
#18 0x00007fd245ed8219 in QTimerInfoList::activateTimers (this=0x56295043e660) at kernel/qtimerinfo_unix.cpp:643
#19 0x00007fd245ed89e1 in timerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:182
#20 0x00007fd23fdca417 in g_main_context_dispatch () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#21 0x00007fd23fdca650 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#22 0x00007fd23fdca6dc in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007fd245ed8daf in QEventDispatcherGlib::processEvents (this=0x562950440560, flags=...) at kernel/qeventdispatcher_glib.cpp:422
#24 0x00007fd245e7a03a in QEventLoop::exec (this=this@entry=0x7ffe255c1200, flags=..., flags@entry=...) at kernel/qeventloop.cpp:225
#25 0x00007fd245e83170 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1363
#26 0x000056294df9c92b in main (argc=<optimized out>, argv=<optimized out>) at ./krusader/main.cpp:316

Reported using DrKonqi
Comment 1 Marc Bohets 2019-07-11 17:01:20 UTC
Created attachment 121473 [details]
This is the file I tried to view

The file contains information on how to display and play music via the musescore3 application.
Comment 2 Davide Gianforte 2019-07-11 17:54:41 UTC
This is the same bug of 405410, but the backtrace here shows more details
Comment 3 Davide Gianforte 2019-07-11 17:55:06 UTC
*** Bug 405410 has been marked as a duplicate of this bug. ***
Comment 4 Davide Gianforte 2019-07-14 15:44:16 UTC
Created attachment 121512 [details]
New backtrace

New backtrace trying to view (F3) a .zip file. I recompiled Ark in debug mode.
Comment 5 Elvis Angelaccio 2019-08-11 13:50:41 UTC
This happens because the Ark Part returns false in the openUrl() method (called by krusader's PanelViewer::openFile() function) even if it is actually opening the archive as requested. While this may be considered a partial abuse of the KParts api, it is done  for a reason (that is, ark loads the archives asynchronously).

The problem is that krusader relies on the return value of openUrl() to delete the part. One possible fix could be to make krusader use the part's completed() and canceled() signals instead.

Otherwise we need to change the logic from the ark side, but it's not going to be as easy.
Comment 6 Erik Quaeghebeur 2019-09-06 07:43:22 UTC
*** Bug 411614 has been marked as a duplicate of this bug. ***
Comment 7 Toni Asensi Esteve 2019-09-15 17:25:32 UTC
There's more information in the https://phabricator.kde.org/D23243 proposal.
Comment 8 Toni Asensi Esteve 2019-09-15 17:31:47 UTC
Git commit c264e2a3deedff575130be97ac31a8ec9c47e630 by Toni Asensi Esteve.
Committed on 15/09/2019 at 17:14.
Pushed by asensi into branch 'master'.

Avoid that Krusader crashes when trying to view any archive using the ark part

Note: About checking the return value of the `cpart->openUrl(curl);` sentence, Elvis Angelaccio wrote in <https://bugs.kde.org/show_bug.cgi?id=409722> that "the Ark Part returns false in the openUrl() method even if it is actually opening the archive as requested. While this may be considered a partial abuse of the KParts api, it is done for a reason (that is, ark loads the archives asynchronously). [...] Krusader [could] use the part's completed() and canceled() signals instead."

FIXED: [ 409722 ] Krusader crash when trying to view any archive using the ark part

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

M  +22   -4    krusader/KViewer/panelviewer.cpp

https://commits.kde.org/krusader/c264e2a3deedff575130be97ac31a8ec9c47e630
Comment 9 Davide Gianforte 2019-11-20 06:52:48 UTC
*** Bug 414294 has been marked as a duplicate of this bug. ***
Comment 10 Davide Gianforte 2021-03-01 06:50:53 UTC
*** Bug 433651 has been marked as a duplicate of this bug. ***
Comment 11 Vaso 2021-03-22 11:23:57 UTC
Created attachment 136940 [details]
New crash information added by DrKonqi

krusader (2.7.2 "Peace of Mind") using Qt 5.15.2

Is it already fixed in 20.04?

$ apt policy krusader
krusader:
  Installed: 2:2.7.2-1+20.04+focal+build3
  Candidate: 2:2.7.2-1+20.04+focal+build3
  Version table:
 *** 2:2.7.2-1+20.04+focal+build3 500
        500 http://archive.neon.kde.org/user focal/main amd64 Packages
        100 /var/lib/dpkg/status
     2:2.7.2-1+20.04+focal+build2 500
        500 http://archive.neon.kde.org/user focal/main amd64 Packages
     2:2.7.2-1build1 500
        500 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages

-- Backtrace (Reduced):
#5  0x00007f4434c7903a in QObject::setProperty (this=0x559225ddc390, name=0x7f44129c9586 "unpackedSize", value=...) at kernel/qobject.cpp:4031
#6  0x00007f44129829f5 in Kerfuffle::LoadJob::onFinished(bool) () from /lib/x86_64-linux-gnu/libkerfuffle.so.20
#7  0x00007f4434c71279 in QObject::event (this=0x559225c005a0, e=0x7f44080064c0) at kernel/qobject.cpp:1314
#8  0x00007f443573fdc3 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#9  0x00007f4435748bb8 in QApplication::notify(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
Comment 12 Davide Gianforte 2021-03-23 06:19:15 UTC
*** Bug 434798 has been marked as a duplicate of this bug. ***
Comment 13 Davide Gianforte 2021-08-09 15:05:08 UTC
*** Bug 440784 has been marked as a duplicate of this bug. ***
Comment 14 Davide Gianforte 2021-08-24 06:14:56 UTC
*** Bug 441461 has been marked as a duplicate of this bug. ***
Comment 15 Toni Asensi Esteve 2021-11-27 16:54:06 UTC
*** Bug 445101 has been marked as a duplicate of this bug. ***
Comment 16 Marc Bohets 2021-11-27 17:42:46 UTC
The problem is NOT fixed, Krusader still crashes when trying to view the mscz file using F3.
Version 2.7.2 "Peace of Mind"

KDE Plasma Version: 5.23.3
KDE Frameworks Version: 5.88.0
Qt Version: 5.15.2
Kernel Version: 5.14.18-1-
Comment 17 Toni Asensi Esteve 2021-11-27 18:18:16 UTC
Marc Bohets, can you follow the steps of
    https://commits.kde.org/krusader?path=INSTALL
in order to build the git version of Krusader and tell us if your problem is solved?
Comment 18 Marc Bohets 2021-11-27 21:52:17 UTC
Thanks for your comment, it is fixed in Version 2.8.0-dev "Bleeding Edge"

In the list of comments, I saw someone claiming it was fixed in 2019, so I imagined that this fix would have been pushed longtime and be available in most distro's now, and as I use a rolling distro like Manjaro, that includes new package version rather quick, I was surprised that the problem still existed in the latest version from the repositories.