Bug 341187 - Crash closing embedded ark [in Ark::Part::~Part]
Summary: Crash closing embedded ark [in Ark::Part::~Part]
Status: RESOLVED FIXED
Alias: None
Product: ark
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian unstable Linux
: NOR crash
Target Milestone: ---
Assignee: Raphael Kubo da Costa
URL:
Keywords: drkonqi
: 341273 341287 341606 341743 342018 342019 343309 343311 343647 345237 346288 346667 349149 349291 349487 349777 350245 350981 356912 356958 358810 361028 370386 375603 377021 386273 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-11-22 23:12 UTC by Raúl
Modified: 2017-11-29 19:28 UTC (History)
32 users (show)

See Also:
Latest Commit:
Version Fixed In: 14.12


Attachments
backport crashfix for 4.14 branch (1.00 KB, patch)
2014-11-24 14:57 UTC, Rex Dieter
Details
New crash information added by DrKonqi (9.28 KB, text/plain)
2015-08-22 23:03 UTC, Кирилл
Details
New crash information added by DrKonqi (6.15 KB, text/plain)
2015-10-30 00:11 UTC, lucrecius
Details
New crash information added by DrKonqi (4.25 KB, text/plain)
2017-08-18 00:17 UTC, christian chevalier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Raúl 2014-11-22 23:12:16 UTC
Application: konqueror (4.14.2)
KDE Platform Version: 4.14.2
Qt Version: 4.8.6
Operating System: Linux 3.16.0-4-amd64 x86_64
Distribution: Debian GNU/Linux unstable (sid)

-- Information about the crash:
- What I was doing when the application crashed:

I was browsing a web which had an link pointing to a compressed file. I click on the link, and took a look at the files in that archive. I pressed the back button in konqueror to go back to the web and konqueror crashed with the attached backtrace.

Regards,

-- Backtrace:
Application: Konqueror (konqueror), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fcfb59f0780 (LWP 2037))]

Thread 2 (Thread 0x7fcf914ff700 (LWP 2391)):
#0  __libc_enable_asynccancel () at ../nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S:61
#1  0x00007fcfb5266182 in poll () at ../sysdeps/unix/syscall-template.S:81
#2  0x00007fcfae03fee4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fcfae03fffc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fcfb1db5507 in QEventDispatcherGlib::processEvents (this=0x7fcf7c0013e0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#5  0x00007fcfb1d84ae1 in QEventLoop::processEvents (this=this@entry=0x7fcf914fee10, flags=...) at kernel/qeventloop.cpp:149
#6  0x00007fcfb1d84e45 in QEventLoop::exec (this=this@entry=0x7fcf914fee10, flags=...) at kernel/qeventloop.cpp:204
#7  0x00007fcfb1c79b89 in QThread::exec (this=this@entry=0x10e42230) at thread/qthread.cpp:538
#8  0x00007fcfb3d6806e in KIO::NameLookUpThread::run (this=0x10e42230) at ../../kio/kio/hostinfo.cpp:226
#9  0x00007fcfb1c7c3ef in QThreadPrivate::start (arg=0x10e42230) at thread/qthread_unix.cpp:349
#10 0x00007fcfae5270a4 in start_thread (arg=0x7fcf914ff700) at pthread_create.c:309
#11 0x00007fcfb526eccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 1 (Thread 0x7fcfb59f0780 (LWP 2037)):
[KCrash Handler]
#6  KXMLGUIFactory::removeClient (this=0x0, client=client@entry=0x1167f078) at ../../kdeui/xmlgui/kxmlguifactory.cpp:419
#7  0x00007fcf75e29914 in Ark::Part::~Part (this=0x1167efe0, __in_chrg=<optimized out>, __vtt_parm=<optimized out>) at ../../part/part.cpp:141
#8  0x00007fcf75e29999 in Ark::Part::~Part (this=0x1167efe0, __in_chrg=<optimized out>, __vtt_parm=<optimized out>) at ../../part/part.cpp:146
#9  0x00007fcfb55768dc in KonqView::switchView (this=0x19bad430, viewFactory=...) at ../../../konqueror/src/konqview.cpp:253
#10 0x00007fcfb55778d0 in KonqView::changePart (this=0x19bad430, mimeType=..., serviceName=..., forceAutoEmbed=false) at ../../../konqueror/src/konqview.cpp:366
#11 0x00007fcfb557a00c in KonqView::restoreHistory (this=0x19bad430) at ../../../konqueror/src/konqview.cpp:835
#12 0x00007fcfb557a439 in KonqView::go (this=<optimized out>, steps=<optimized out>) at ../../../konqueror/src/konqview.cpp:820
#13 0x00007fcfb55bfd6a in KonqMainWindow::slotGoHistoryDelayed (this=0x1419d40) at ../../../konqueror/src/konqmainwindow.cpp:2886
#14 0x00007fcfb55cbfa6 in KonqMainWindow::qt_static_metacall (_o=0x1419d40, _id=292024440, _a=0x7fcf7604ccd8 <vtable for Ark::Part+536>, _c=<optimized out>) at ./konqmainwindow.moc:414
#15 0x00007fcfb1d9f641 in QObject::event (this=0x1419d40, e=<optimized out>) at kernel/qobject.cpp:1222
#16 0x00007fcfb27f89f3 in QWidget::event (this=0x1419d40, event=0x18ccc0c0) at kernel/qwidget.cpp:8859
#17 0x00007fcfb2bd3363 in QMainWindow::event (this=this@entry=0x1419d40, event=event@entry=0x18ccc0c0) at widgets/qmainwindow.cpp:1478
#18 0x00007fcfb35df861 in KMainWindow::event (this=this@entry=0x1419d40, ev=ev@entry=0x18ccc0c0) at ../../kdeui/widgets/kmainwindow.cpp:1084
#19 0x00007fcfb361b499 in KXmlGuiWindow::event (this=this@entry=0x1419d40, ev=ev@entry=0x18ccc0c0) at ../../kdeui/xmlgui/kxmlguiwindow.cpp:126
#20 0x00007fcfb55cb264 in KonqMainWindow::event (this=0x1419d40, e=0x18ccc0c0) at ../../../konqueror/src/konqmainwindow.cpp:5763
#21 0x00007fcfb27a529c in QApplicationPrivate::notify_helper (this=this@entry=0x12c6fb0, receiver=receiver@entry=0x1419d40, e=e@entry=0x18ccc0c0) at kernel/qapplication.cpp:4570
#22 0x00007fcfb27abda8 in QApplication::notify (this=this@entry=0x7fff39ae0160, receiver=receiver@entry=0x1419d40, e=e@entry=0x18ccc0c0) at kernel/qapplication.cpp:4356
#23 0x00007fcfb351a09a in KApplication::notify (this=0x7fff39ae0160, receiver=0x1419d40, event=0x18ccc0c0) at ../../kdeui/kernel/kapplication.cpp:311
#24 0x00007fcfb1d85f8d in QCoreApplication::notifyInternal (this=0x7fff39ae0160, receiver=receiver@entry=0x1419d40, event=event@entry=0x18ccc0c0) at kernel/qcoreapplication.cpp:955
#25 0x00007fcfb1d89821 in sendEvent (event=0x18ccc0c0, receiver=0x1419d40) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#26 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x1273670) at kernel/qcoreapplication.cpp:1579
#27 0x00007fcfb1d89cb3 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1472
#28 0x00007fcfb1db53a3 in sendPostedEvents () at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:236
#29 postEventSourceDispatch (s=0x12b6020) at kernel/qeventdispatcher_glib.cpp:280
#30 0x00007fcfae03fc5d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#31 0x00007fcfae03ff48 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#32 0x00007fcfae03fffc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#33 0x00007fcfb1db54ed in QEventDispatcherGlib::processEvents (this=0x1274b50, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#34 0x00007fcfb2849b96 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#35 0x00007fcfb1d84ae1 in QEventLoop::processEvents (this=this@entry=0x7fff39adff90, flags=...) at kernel/qeventloop.cpp:149
#36 0x00007fcfb1d84e45 in QEventLoop::exec (this=this@entry=0x7fff39adff90, flags=...) at kernel/qeventloop.cpp:204
#37 0x00007fcfb1d8a8b9 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1227
#38 0x00007fcfb27a373c in QApplication::exec () at kernel/qapplication.cpp:3828
#39 0x00007fcfb55ec776 in kdemain (argc=<optimized out>, argv=<optimized out>) at ../../../konqueror/src/konqmain.cpp:227
#40 0x00007fcfb51aab45 in __libc_start_main (main=0x4006e0 <main(int, char**)>, argc=2, argv=0x7fff39ae0308, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff39ae02f8) at libc-start.c:287
#41 0x000000000040070e in _start ()

Reported using DrKonqi
Comment 1 Dawit Alemayehu 2014-11-23 06:14:43 UTC
This is an issue in ark's KPart.
Comment 2 Andrea Iacovitti 2014-11-23 09:11:22 UTC
Regressed by http://quickgit.kde.org/?p=ark.git&a=commit&h=3b981ca
Comment 3 Raphael Kubo da Costa 2014-11-23 22:28:54 UTC
+Elvis

Contrary to the Fedora crash we'd been tracking in bug 340991, this one looks like a true regression and I'm able to reproduce it on Debian and FreeBSD.

There's something fishy when Ark is being used as an embedded KPart (for example, when previewing an archive in Konqueror or when previewing an embedded archive in a Debian package).
Comment 4 Raphael Kubo da Costa 2014-11-23 22:53:07 UTC
What Valgrind and the backtrace above tell us is that we're accessing an invalid factory() in the cases I mentioned above, and an if (factory()) before the removeClient() call does fix the issue. I'd just like to know what the interactions here are before committing this fix.
Comment 5 Raphael Kubo da Costa 2014-11-23 23:46:28 UTC
Git commit 9c30f30b38c36a31e6fcb3aa047a0247ac5a22fb by Raphael Kubo da Costa.
Committed on 23/11/2014 at 23:37.
Pushed by rkcosta into branch 'Applications/14.12'.

Stop crashing on exit when being used solely as a KPart.

This change fixes a crash introduced by commit 3b981ca ("Remove Part
from KXMLGUIFactory on exit").

Part::~Part() is the wrong place to call KXMLGUIFactory::removeClient(),
as it assumes addClient() had been called in the first place.

This is only true if Ark is called as a standalone program, since that
is done in MainWindow::loadPart()'s call to KXMLGuiWindow::createGUI().

Conversely, if the Ark KPart is being used as an embedded viewer in,
say, Konqueror or to preview an archive inside an archive (ie. Ark
inside Ark) that does not hold true and we try to access a
KXMLGUIFactory that does not exist.

Instead, call KXMLGuiWindow::removeClient() in MainWindow's destructor,
since in this case we are certain that addClient() was been called
before.
FIXED-IN: 14.12

M  +3    -0    app/mainwindow.cpp
M  +0    -2    part/part.cpp

http://commits.kde.org/ark/9c30f30b38c36a31e6fcb3aa047a0247ac5a22fb
Comment 6 Rex Dieter 2014-11-24 14:57:16 UTC
Created attachment 89715 [details]
backport crashfix for 4.14 branch

Here's a quick-n-dirty patch that applies to 4.14 branch if anyone's interested.  (Any objection to committing this to 4.14 branch for posterity?)
Comment 7 Raphael Kubo da Costa 2014-11-24 15:18:19 UTC
Well the original patch should apply to KDE/4.14 without any changes, since there had been no commits to Applications/14.12 before this one and therefore both branches were at the same commit.

I don't see much point in committing it to 4.14 simply because that branch is dead -- there will be no more 4.14 releases so I don't see how this change is different from any other that did not make it into other dead branches.
Comment 8 Rex Dieter 2014-11-24 15:19:57 UTC
the patch didn't apply as-is,  the Part::~Part() code was a little different

I was only going to commit it for the convenience of distros still shipping 4.14
Comment 9 Raphael Kubo da Costa 2014-11-24 15:25:36 UTC
Sorry, I forgot Applications/14.12 was branched from master, not KDE/4.14. I'm not terribly opposed to committing to dead branches; I'll commit a version solving the conflict(s).
Comment 10 Raphael Kubo da Costa 2014-11-24 15:33:51 UTC
Git commit cd8ad2761d41d1ec0a18cff7f4d166b53c899fc2 by Raphael Kubo da Costa.
Committed on 23/11/2014 at 23:37.
Pushed by rkcosta into branch 'KDE/4.14'.

Stop crashing on exit when being used solely as a KPart.

This change fixes a crash introduced by commit 3b981ca ("Remove Part
from KXMLGUIFactory on exit").

Part::~Part() is the wrong place to call KXMLGUIFactory::removeClient(),
as it assumes addClient() had been called in the first place.

This is only true if Ark is called as a standalone program, since that
is done in MainWindow::loadPart()'s call to KXMLGuiWindow::createGUI().

Conversely, if the Ark KPart is being used as an embedded viewer in,
say, Konqueror or to preview an archive inside an archive (ie. Ark
inside Ark) that does not hold true and we try to access a
KXMLGUIFactory that does not exist.

Instead, call KXMLGuiWindow::removeClient() in MainWindow's destructor,
since in this case we are certain that addClient() was been called
before.

(cherry picked from commit 9c30f30b38c36a31e6fcb3aa047a0247ac5a22fb)
This was committed for completeness, as there will be no additional
releases from the KDE/4.14 branch.

Conflicts:
	part/part.cpp

M  +3    -0    app/mainwindow.cpp
M  +0    -3    part/part.cpp

http://commits.kde.org/ark/cd8ad2761d41d1ec0a18cff7f4d166b53c899fc2
Comment 11 Rex Dieter 2014-11-24 15:37:06 UTC
Thanks!
Comment 12 Andrea Iacovitti 2014-11-26 09:16:33 UTC
*** Bug 341273 has been marked as a duplicate of this bug. ***
Comment 13 Andrea Iacovitti 2014-11-26 13:11:55 UTC
*** Bug 341287 has been marked as a duplicate of this bug. ***
Comment 14 Andrea Iacovitti 2014-12-06 23:35:34 UTC
*** Bug 341606 has been marked as a duplicate of this bug. ***
Comment 15 Raphael Kubo da Costa 2014-12-11 23:14:43 UTC
*** Bug 341743 has been marked as a duplicate of this bug. ***
Comment 16 Christoph Feck 2014-12-19 02:19:21 UTC
*** Bug 342018 has been marked as a duplicate of this bug. ***
Comment 17 Christoph Feck 2014-12-19 02:19:48 UTC
*** Bug 342019 has been marked as a duplicate of this bug. ***
Comment 18 Christoph Feck 2015-01-26 12:41:37 UTC
*** Bug 343309 has been marked as a duplicate of this bug. ***
Comment 19 Christoph Feck 2015-01-26 12:43:07 UTC
*** Bug 343311 has been marked as a duplicate of this bug. ***
Comment 20 Christoph Feck 2015-02-01 12:20:46 UTC
*** Bug 343647 has been marked as a duplicate of this bug. ***
Comment 21 Christoph Feck 2015-05-16 22:19:02 UTC
*** Bug 346288 has been marked as a duplicate of this bug. ***
Comment 22 Andrea Iacovitti 2015-06-23 19:39:16 UTC
*** Bug 349487 has been marked as a duplicate of this bug. ***
Comment 23 Andrea Iacovitti 2015-07-01 10:26:40 UTC
*** Bug 349777 has been marked as a duplicate of this bug. ***
Comment 24 Andrea Iacovitti 2015-07-16 12:47:24 UTC
*** Bug 350245 has been marked as a duplicate of this bug. ***
Comment 25 Elvis Angelaccio 2015-08-05 10:50:31 UTC
*** Bug 350981 has been marked as a duplicate of this bug. ***
Comment 26 Кирилл 2015-08-22 23:03:47 UTC
Created attachment 94180 [details]
New crash information added by DrKonqi

konqueror (4.14.1) on KDE Platform 4.14.2 using Qt 4.8.6

- What I was doing when the application crashed:

I was browsing a web which had an link pointing to a compressed file. I click on the link, and took a look at the files in that archive. I pressed the back button in konqueror to go back to the web and konqueror crashed with the attached backtrace.

Regards,

-- Backtrace (Reduced):
#6  KXMLGUIFactory::removeClient (this=0x0, client=0x8cda1ec) at ../../kdeui/xmlgui/kxmlguifactory.cpp:419
#7  0xad83ddfc in Ark::Part::~Part (this=0x8cda1a0, __in_chrg=<optimized out>, __vtt_parm=<optimized out>) at ../../part/part.cpp:141
#8  0xad83deaa in Ark::Part::~Part (this=0x8cda1a0, __in_chrg=<optimized out>, __vtt_parm=<optimized out>) at ../../part/part.cpp:146
#9  0xb75fe176 in KonqView::~KonqView (this=0x8cd9f10, __in_chrg=<optimized out>) at ../../../konqueror/src/konqview.cpp:130
#10 0xb75fe48a in KonqView::~KonqView (this=0x8cd9f10, __in_chrg=<optimized out>) at ../../../konqueror/src/konqview.cpp:138
Comment 27 Elvis Angelaccio 2015-10-27 12:44:00 UTC
*** Bug 349149 has been marked as a duplicate of this bug. ***
Comment 28 lucrecius 2015-10-30 00:11:25 UTC
Created attachment 95216 [details]
New crash information added by DrKonqi

konqueror (4.14.3) on KDE Platform 4.14.5 using Qt 4.8.6

- Unusual behavior I noticed:
Systematic crash when i close Konqueror main window, wherin are 2 windows, one with a compress file opened.

-- Backtrace (Reduced):
#6  0xffffffff in KXMLGUIFactory::removeClient(KXMLGUIClient*) () at /lib/libkdeui.so.5
#7  0xffffffff in Ark::Part::~Part() () at /usr/lib/kde4/arkpart.so
#8  0xffffffff in Ark::Part::~Part() () at /usr/lib/kde4/arkpart.so
#9  0xffffffff in KonqView::~KonqView() () at /usr/lib/libkdeinit4_konqueror.so
#10 0xffffffff in KonqView::~KonqView() () at /usr/lib/libkdeinit4_konqueror.so
Comment 29 Elvis Angelaccio 2015-12-20 10:19:39 UTC
*** Bug 356912 has been marked as a duplicate of this bug. ***
Comment 30 Elvis Angelaccio 2015-12-20 23:27:04 UTC
*** Bug 356958 has been marked as a duplicate of this bug. ***
Comment 31 Elvis Angelaccio 2016-01-20 18:42:30 UTC
*** Bug 346667 has been marked as a duplicate of this bug. ***
Comment 32 Elvis Angelaccio 2016-01-31 10:35:06 UTC
*** Bug 358810 has been marked as a duplicate of this bug. ***
Comment 33 Elvis Angelaccio 2016-03-27 16:02:12 UTC
*** Bug 361028 has been marked as a duplicate of this bug. ***
Comment 34 Elvis Angelaccio 2016-10-10 17:39:29 UTC
*** Bug 370386 has been marked as a duplicate of this bug. ***
Comment 35 Christoph Feck 2017-01-30 20:28:49 UTC
*** Bug 375603 has been marked as a duplicate of this bug. ***
Comment 36 Christoph Feck 2017-03-01 04:01:01 UTC
*** Bug 349291 has been marked as a duplicate of this bug. ***
Comment 37 Christoph Feck 2017-03-01 04:01:21 UTC
*** Bug 345237 has been marked as a duplicate of this bug. ***
Comment 38 Christoph Feck 2017-03-01 04:01:49 UTC
*** Bug 377021 has been marked as a duplicate of this bug. ***
Comment 39 christian chevalier 2017-08-18 00:17:42 UTC
Created attachment 107342 [details]
New crash information added by DrKonqi

ark (2.19) on KDE Platform 4.14.30 using Qt 4.8.6

- What I was doing when the application crashed:

opening a rpm file in ftp://ftp.free.fr/mirrors/mageia.org/distrib/5/SRPMS/core/release displayed in konqueror --profile webbrowsing with ark
opening a tar.bz2 file
clising the tar.bz2 file
closing the ark window

-- Backtrace (Reduced):
#5  0x00007fe6dc1ef070 in KXMLGUIFactory::removeClient(KXMLGUIClient*) () at /lib64/libkdeui.so.5
#6  0x00007fe6ca7e1914 in Ark::Part::~Part() () at /usr/lib64/kde4/arkpart.so
#7  0x00007fe6ca7e1999 in Ark::Part::~Part() () at /usr/lib64/kde4/arkpart.so
#8  0x00007fe6dca1c781 in KParts::Part::slotWidgetDestroyed() () at /lib64/libkparts.so.4
[...]
#10 0x00007fe6da9cc29f in QObject::destroyed(QObject*) () at /lib64/libQtCore.so.4
Comment 40 Christoph Feck 2017-11-29 19:28:27 UTC
*** Bug 386273 has been marked as a duplicate of this bug. ***