Bug 166294

Summary: crash recovery: page being loaded is not restored
Product: [Applications] konqueror Reporter: Maciej Pilichowski <bluedzins>
Component: generalAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED INTENTIONAL    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Maciej Pilichowski 2008-07-11 12:44:12 UTC
Version:            (using Devel)

crash recovery: page being loaded is not restored

Steps:
1. run konq.
2. visit page X1
3. wait till it is loaded
4. visit page X2
5) while it IS loading crash konq.
6. run konq.
7. restore? --> yes
8. X1 is restored
Comment 1 Eduardo Robles Elvira 2008-07-11 18:01:16 UTC
What happens here is that konqueror autosaves current session every 10 seconds by default. So as you opened a new page and quickly killed konqueror, the last page opened was not saved. You can change the autosave time editing ~/.kde4/share/config/konquerorrc and adding this:

[SessionManagerSettings]
AutoSaveInterval=2

That would make konqueror autosave every 2 seconds instead of every 10 seconds which is the default value. Anyway, that the crashy page is not saved is what we intended: "this is not a bug it's a feature". Otherwise, when you restore session, it would crash konqueror.
Comment 2 Maciej Pilichowski 2008-07-11 18:11:00 UTC
Time does not matter -- this is buggy by design (reopening). Autosave should happen on address change not on time, because no matter what interval is set you can always find yourself between autosaves.

> Anyway, that the crashy page is not saved is what we intended: "this is not
> a bug it's a feature". Otherwise, when you restore session, it would crash
> konqueror. 

Wait. Crashy page != loading page. The crashy page could be somewhere else, some faulty interaction with user. Again, buggy by design.

I can crash konq. using perfectly good, well tested page.

=============================================================

Btw. I just imagined this: restore pages -> now, konq. opens tabs with pages adresses and with big ">" button in the middle of the page. Now user could one by one "replay" pages. 
Comment 3 Eduardo Robles Elvira 2008-07-11 18:23:26 UTC
Sorry Maciej, but no. This is not a buggy design, it's a just our choice when designing konqueror. Firefox does it the same way. KMail does it the same way. And there are various reasons to do it, to save "every X time". I've explained already a very important one: if we do what you say, saving konqueror session wouldn't do anything because when restoring it, konqueror would crash again. Also each time you move around the page or type a single character in a form, the session when saved would be different, so others would argue that we should also save each of those times, and that would be very hard to do. In order to keep the implementation simple, we choose to save "every X seconds". You the user say what X is equal to.

If you want to do to save each time a new url is opened, then use the crashes plugin, but the session manager will stay like this so please *don't* reopen this bug.

For your last suggestion I recommend you create a new wishlist report. I too think we should find a way to make the session manager tolerant to faulty pages when restoring a saved session.
Comment 4 Maciej Pilichowski 2008-07-11 18:31:06 UTC
I thought this report is about crash plugin.

About time vs. address autosave. No, it does not prevent anything -- I witnessed crashes after page was fully loaded. If you like to keep it closed, ok, but you can fix this design by keeping report closed. The problem is still there (inside Konq.).
Comment 5 Maciej Pilichowski 2008-07-11 18:34:26 UTC
PS. Saving data input is another story, and autosave seems here as best option. But for page log there is better solution -- on change autosave.
Comment 6 Maciej Pilichowski 2008-07-11 21:12:40 UTC
Eduardo, replay feature wish:
https://bugs.kde.org/show_bug.cgi?id=166325

Please reconsider _this_ report -- I really think the design (and behaviour as well) will improve with save on address change. With replay feature it could be really a killer.

Thank you in advance.

Btw. I don't really "feel" the difference between crash recovery session and crash plugin, it is (for me) more natural to think about just crash recovery mechanism, not several mechanisms.
Comment 7 Eduardo Robles Elvira 2008-07-12 14:36:16 UTC
*** Bug 166293 has been marked as a duplicate of this bug. ***