Bug 175637 - ark loaded at startup from previous session crashes if closed
Summary: ark loaded at startup from previous session crashes if closed
Status: RESOLVED FIXED
Alias: None
Product: ark
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Harald Hvaal
URL:
Keywords:
: 179926 182357 182380 182696 182733 183128 183405 183679 183750 183997 184051 184664 184723 184830 184935 185294 185613 186196 188155 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-11-20 09:57 UTC by Bernhard Frauendienst
Modified: 2009-04-12 06:51 UTC (History)
37 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Create KPart on session restore (636 bytes, patch)
2009-02-03 10:05 UTC, Volker Lanz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Frauendienst 2008-11-20 09:57:44 UTC
Version:           2.11.999 (using Devel)
Compiler:          gcc version 4.3.2 (Gentoo 4.3.2 p1.0) 
OS:                Linux
Installed from:    Compiled sources

When I logout with ark open, it gets restored at the next login.

However, the window is completely blank (the usual controls are not shown), and when I close it, ark crashes from a segfault:


Application: Ark (ark), signal SIGSEGV
0x000000341349f7f0 in nanosleep () from /lib/libc.so.6

Thread 1 (Thread 0x7fd8fd896750 (LWP 16458)):
[KCrash Handler]
#5  0x000000000040c9ac in MainWindow::~MainWindow ()
#6  0x00007fd901fcfd0d in QObject::event () from /usr/lib64/qt4/libQtCore.so.4
#7  0x00007fd9026a2626 in QWidget::event () from /usr/lib64/qt4/libQtGui.so.4
#8  0x00007fd9029b557b in QMainWindow::event () from /usr/lib64/qt4/libQtGui.so.4
#9  0x00007fd904141a08 in KXmlGuiWindow::event () from /usr/kde/svn/lib64/libkdeui.so.5
#10 0x00007fd90265092d in QApplicationPrivate::notify_helper () from /usr/lib64/qt4/libQtGui.so.4
#11 0x00007fd9026586ca in QApplication::notify () from /usr/lib64/qt4/libQtGui.so.4
#12 0x00007fd90404052b in KApplication::notify () from /usr/kde/svn/lib64/libkdeui.so.5
#13 0x00007fd901fc0d90 in QCoreApplication::notifyInternal () from /usr/lib64/qt4/libQtCore.so.4
#14 0x00007fd901fc1a31 in QCoreApplicationPrivate::sendPostedEvents () from /usr/lib64/qt4/libQtCore.so.4
#15 0x00007fd901fe9333 in postEventSourceDispatch () from /usr/lib64/qt4/libQtCore.so.4
#16 0x00007fd8fe4af791 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#17 0x00007fd8fe4b2f0d in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#18 0x00007fd8fe4b30cb in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#19 0x00007fd901fe8fbf in QEventDispatcherGlib::processEvents () from /usr/lib64/qt4/libQtCore.so.4
#20 0x00007fd9026df32f in QGuiEventDispatcherGlib::processEvents () from /usr/lib64/qt4/libQtGui.so.4
#21 0x00007fd901fbf6a2 in QEventLoop::processEvents () from /usr/lib64/qt4/libQtCore.so.4
#22 0x00007fd901fbf82d in QEventLoop::exec () from /usr/lib64/qt4/libQtCore.so.4
#23 0x00007fd901fc1ced in QCoreApplication::exec () from /usr/lib64/qt4/libQtCore.so.4
#24 0x000000000040bdfe in main ()



Since this only happens at startup with ark sessions persisted from a previous KDE session, this is not really annoying or severe in any way. I haven't encountered this behaviour in any other situation.

Please let me know if you need any further information.
Comment 1 Jonathan Thomas 2008-11-20 15:18:32 UTC
Happens in 4.1.3 too.
Comment 2 Bernhard Frauendienst 2008-11-20 15:27:54 UTC
(In reply to comment #1)
> Happens in 4.1.3 too.
> 

If I remember correctly, this happened in every KDE4-Version I've tried so far (which would be all since 4.1, I think), so this probably isn't a regression bug.
Comment 3 Harald Hvaal 2008-11-23 18:41:19 UTC
Does it actually open any file when it resumes the ark instance? Or does it 
just open an empty ark?
Comment 4 Bernhard Frauendienst 2008-11-24 23:37:44 UTC
I can't say, because -- like I said -- the form is completely empty. It contains none of the usual controls.
I'll keep an eye out though and try to find out more details.
Comment 5 Bernhard Frauendienst 2008-11-25 17:04:23 UTC
(In reply to comment #4)
> I'll keep an eye out though and try to find out more details.
> 

Ok, so I shutdown session with a file open in ark, and without one, and both times the ark window in the new session was completely empty (no controls whatsoever, except the window decoration of course) and crashed on closing.
Comment 6 Dario Andres 2009-01-07 18:07:51 UTC
*** Bug 179926 has been marked as a duplicate of this bug. ***
Comment 7 Dario Andres 2009-01-07 18:08:13 UTC
Bug 179926 seems to happen in current trunk
Comment 8 stefnn 2009-01-15 23:37:54 UTC
happens also to me on kde 4.2 RC1.
Comment 9 Rafael 2009-01-19 16:08:11 UTC
Ark crashed for me also in the same conditions in KDE 4.2 RC1, I obtained this backtrace:

Aplicación: Ark (ark), señal SIGSEGV
0x00007f7e6ea215f0 in nanosleep () from /lib/libc.so.6

Thread 1 (Thread 0x7f7e726636f0 (LWP 6398)):
[KCrash Handler]
#5  0x000000000040d2a0 in _start ()
Comment 10 Jeff Burns 2009-01-19 23:54:07 UTC
I just experienced this symptom with ARK with Intrepid with KDE 4.2 RC1.    The backtrace  looks like a match Rafael's above.

Application: Ark (ark), signal SIGSEGV
0x00007fb8c602c5f0 in nanosleep () from /lib/libc.so.6

Thread 1 (Thread 0x7fb8c9c6c6f0 (LWP 6702)):
[KCrash Handler]
#5  0x000000000040d2a0 in _start ()

Comment 11 Bruce Wolfe 2009-01-20 19:33:11 UTC
I also am running KDE 4.2.RC1 (4.1.96) and without having opened Ark in a prior session after recent updates over past two days, 1/19 & 1/20.

Here is the backtrace for me:

Application: Ark (ark), signal SIGSEGV

Thread 1 (Thread 0xb610c8d0 (LWP 5884)):
[KCrash Handler]
#6  0x080532b3 in _start ()

Comment 12 Rafael 2009-01-21 04:36:55 UTC
This bug also happens for me without having Ark open in last session.
Comment 13 Emanuele Cisotti 2009-01-22 10:06:38 UTC
Here, that's the same for me with KDE4.2RC1 and also happens without having Ark open in last session.
Comment 14 Diego 2009-01-24 13:51:10 UTC
Same here as previous comments.
KDE 4.2RC1 for Fedora 10, Ark 2.12.
Open Ark in a session, then close it, exit the session, enter a new session. You get a blank Ark screen and when you close you get the backtrace at comment #9 and #10.
Please mark this bug as confirmed.
Comment 15 Dario Andres 2009-01-24 13:55:01 UTC
I have experienced this too.. I'm trying to discover what causes this: Bug 181678 may be related as the Ark process isn't terminated after a succesful extraction. So... it may be saved on session when closing the KDE session, and started on Login...
Comment 16 Dario Andres 2009-01-30 00:26:39 UTC
*** Bug 182357 has been marked as a duplicate of this bug. ***
Comment 17 Harald Hvaal 2009-01-30 01:08:20 UTC
How do I actually reproduce this? I tried setting the session manager to open last session, then opening ark with a file, then logging out and in again, but nothing happened, ark didn't open.
Comment 18 Dario Andres 2009-01-30 01:10:14 UTC
@Harald: have you read my comment about bug 181678 ? 
Anyways, the last time I tried I couldn't reproduce it (using 4.3trunk)
Comment 19 Harald Hvaal 2009-01-30 01:32:29 UTC
Ah, I see. Yes, I just forgot about that. I will see if I can trigger it first, then check afterwards if it goes away fixing the first bug.
Comment 20 Riccardo Pasquini 2009-01-31 11:38:31 UTC
from OpenSUSE 11.1, kde 4.2.00 (KDE 4.2.0) "release 83.1" installed from one click install provided by factory (but given as stable) repositories as default package (not the base one)

ark used in a previous session but closed on restart, it's shown after the restart as empty window, on close:

Applicazione: Ark (ark), segnale SIGSEGV
0x00007fa118009cb0 in nanosleep () from /lib64/libc.so.6
[Current thread is 1 (Thread 0x7fa11bd3c750 (LWP 4486))]

Thread 1 (Thread 0x7fa11bd3c750 (LWP 4486)):
[KCrash Handler]
#5  0x000000000040c8bc in _start ()

Comment 21 Aglieglie Brazor 2009-02-01 10:29:32 UTC
Hi,

same problem on KDE 4.2 (kubuntu 8.10): Ark blank window loaded at startup and it crashes when you close it.

Application: Ark (ark), signal SIGSEGV

Thread 1 (Thread 0xb60c88d0 (LWP 5590)):
[KCrash Handler]
#6  0x080532b3 in _start ()


Comment 22 Dario Andres 2009-02-01 20:15:26 UTC
*** Bug 182696 has been marked as a duplicate of this bug. ***
Comment 23 Rafael 2009-02-01 21:49:21 UTC
*** Bug 182733 has been marked as a duplicate of this bug. ***
Comment 24 Volker Lanz 2009-02-03 10:02:00 UTC
As far as I can see this happens because the KPart is not created on session restore. I'm attaching a (not much tested) patch to fix this.
Comment 25 Volker Lanz 2009-02-03 10:05:48 UTC
Created attachment 30894 [details]
Create KPart on session restore
Comment 26 kirst 2009-02-03 13:06:30 UTC
Workflow for to reproduce for me (KDE 4.2, x86_64):

From Dolphin, right click on an archive, choose "Extract here..."
Progress bar is displayed in notification box.
After extracting is completed, notification box dissappears, but
ark process is still visible in process list.

Next time KDE is started, all those hanging ark-s are restored from session
and crash when closed.

I used to extract RAR archives. I'll check later if the behaviour depends on archive type.
Comment 27 Mikko C. 2009-02-03 13:58:27 UTC
afaics, after successfully extracting some archives there are still some ark processes in the background:

$ ps aux|grep ark
mikko     5870  0.2  0.7 191588 15140 ?        Sl   13:56   0:00 /usr/kde/live/bin/ark --batch --autodestination /mnt/dati/House.S05E14.HDTV.XviD-2HD/house.s05e14.hdtv.xvid-2hd.r00

So kde restores them at startup.
The problem is why those processes aren't killed when the extraction is over.
Comment 28 Dario Andres 2009-02-03 14:00:05 UTC
@Mikko: bug 181678 may be the cause (recently fixed)
Comment 29 Volker Lanz 2009-02-03 14:05:49 UTC
kirst@byte.ee and Mikko: Please do not use this bug report to report other bugs. This one is about the session restore problem.
Comment 30 S. Burmeister 2009-02-03 17:55:08 UTC
(In reply to comment #26)
> Next time KDE is started, all those hanging ark-s are restored from session
> and crash when closed.

If you file a bug on this, please cc me!
Comment 31 usrrgt 2009-02-04 09:21:51 UTC
*** Bug 182380 has been marked as a duplicate of this bug. ***
Comment 32 Atomic 2009-02-04 22:10:02 UTC
Same here. Blank Ark window starts up with every session of kde 4.2, and when i close it, it crashes immediatly.
Comment 33 Jithin Emmanuel 2009-02-05 08:27:53 UTC
*** Bug 183128 has been marked as a duplicate of this bug. ***
Comment 34 Dario Andres 2009-02-06 13:01:40 UTC
*** Bug 183405 has been marked as a duplicate of this bug. ***
Comment 35 Kristjan Ugrin 2009-02-08 12:09:16 UTC
(In reply to comment #29)
> kirst@byte.ee and Mikko: Please do not use this bug report to report other
> bugs. This one is about the session restore problem.
> 

But this is the actual problem why it persists across sessions in first place.
If you use menu shortcuts to extract archives, ark will do the job but *n instances will remain open after successful extraction.
And when you logout, kde will remember that, so it will spawn *n ark instances, which will be completely blank and crash when you close them.

https://bugs.kde.org/show_bug.cgi?id=175637#c26 is one of possible ways to reproduce this.

Very annoying.

*n - times you extracted an archive.
Comment 36 Volker Lanz 2009-02-09 00:52:22 UTC
Please see bug #180321 about the hanging processes when extracting rar archives. The two problems are completely unrelated.
Comment 37 Dario Andres 2009-02-10 13:59:46 UTC
*** Bug 183679 has been marked as a duplicate of this bug. ***
Comment 38 Kristjan Ugrin 2009-02-10 14:16:53 UTC
(In reply to comment #36)
> Please see bug #180321 about the hanging processes when extracting rar
> archives. The two problems are completely unrelated.
> 

I'm not getting that on rar files, but on every archive I've tried (tar, tar.gz, zip). And it does that 100% of time.
Should I open a new bug about hanging process when extracting via pop-up menu? This is also the reason why blank ark instances are opened after kde restores new session (processes are there on exit),
Comment 39 Dario Andres 2009-02-12 00:20:06 UTC
*** Bug 183997 has been marked as a duplicate of this bug. ***
Comment 40 Joshua Cov. 2009-02-14 00:03:52 UTC
I got exactly the same error. There are lots of duplicates bugs of these. Even one with kde 3.5.4 see here:https://bugs.kde.org/show_bug.cgi?id=132641
Comment 41 Dario Andres 2009-02-16 11:03:50 UTC
*** Bug 184051 has been marked as a duplicate of this bug. ***
Comment 42 Jack Black 2009-02-17 09:44:47 UTC
Same here on KDE 4.2 and ark version 2.12.
When I extracted archives with or without the context menu in a previous session ark reappears as a totally blank screen just with the title in the windows but without any buttons in the next session. And then every time I try to close the blank ark screen it crashes.
Comment 43 Dario Andres 2009-02-17 23:38:51 UTC
*** Bug 184723 has been marked as a duplicate of this bug. ***
Comment 44 Dario Andres 2009-02-17 23:39:03 UTC
*** Bug 184664 has been marked as a duplicate of this bug. ***
Comment 45 Harald Hvaal 2009-02-18 04:26:56 UTC
SVN commit 927671 by metellius:

BUG: 175637
Applied patch from Volker Lanz to fix the session restoring in ark.

 M  +16 -4     main.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=927671
Comment 46 Harald Hvaal 2009-02-18 12:15:36 UTC
SVN commit 927740 by metellius:

Backporting revision 927671
BUG: 175637 Applied patch from Volker Lanz to fix the session restoring in ark.

 M  +16 -4     main.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=927740
Comment 47 Dario Andres 2009-02-18 21:57:07 UTC
*** Bug 183750 has been marked as a duplicate of this bug. ***
Comment 48 Sriram 2009-02-19 05:22:45 UTC
Can you please let me know how to apply the patch
Comment 49 Alessio Boccialoni 2009-02-19 12:24:29 UTC
Excuse me, I have the same bug.
I read that someone has fixed it. How can I fix it?

Thanks to all
Comment 50 Dario Andres 2009-02-19 12:26:20 UTC
@Alessio: the crash is fixed in KDE4.2.1 and 4.3, you will have to wait for that versions to be released and included in your distribution
Comment 51 Pino Toscano 2009-02-23 10:37:13 UTC
*** Bug 185294 has been marked as a duplicate of this bug. ***
Comment 52 Bernhard Frauendienst 2009-02-25 10:44:46 UTC
(In reply to comment #45)
> SVN commit 927671 by metellius:
> 
> BUG: 175637
> Applied patch from Volker Lanz to fix the session restoring in ark.
> 
>  M  +16 -4     main.cpp  
> 
> 
> WebSVN link: http://websvn.kde.org/?view=rev&revision=927671

I just wanted to confirm that the bug no longer occurs for me (using r930273). Thanks and keep up the good work ;)
Comment 53 Dario Andres 2009-02-27 11:58:53 UTC
*** Bug 185613 has been marked as a duplicate of this bug. ***
Comment 54 Pino Toscano 2009-03-05 11:10:51 UTC
*** Bug 186196 has been marked as a duplicate of this bug. ***
Comment 55 Raphael Kubo da Costa 2009-04-11 05:36:29 UTC
*** Bug 188155 has been marked as a duplicate of this bug. ***
Comment 56 Harald Hvaal 2009-04-11 05:42:30 UTC
*** Bug 184830 has been marked as a duplicate of this bug. ***
Comment 57 Raphael Kubo da Costa 2009-04-12 06:51:25 UTC
*** Bug 184935 has been marked as a duplicate of this bug. ***