Bugs :  K-Meleon Forum
You can talk about issues with k-meleon here.  
K-m 1.6 prebeta does not save session completely
Posted by: Kozak
Date: November 10, 2010 04:12PM

Awesome browser! I use it to keep open more than 500 tabs(!) at any point in time. I don't know of any other browser that can do it. Even K-M struggles quite a bit. But that means I rely a lot on saving session functionality because if computer crashes all my work is lost.

I just found out about K-M 1.6. To my relief, it works on sites that don't work properly in the main K-M version 1.5.4. But 1.6 as downloaded from here:
http://kmeleon.110mb.com/km/K-Meleon1.6_preBeta.zip

can't save a session correctly through Sessions / Save session in prefs.js. Neither does it save Last Session correctly, so it is not able to restore a session fully after crash.
Examples from prefs.js
user_pref("kmeleon.plugins.sessions2.Last Session.count", 4);
For example, I had 45 tabs in a window:
user_pref("kmeleon.plugins.sessions2.Last Session.window1.count", 45);
but I can see only 10 tabs: tab0, 10, 11, 19, 21, 25, 27, 35, 7, 9.
In another window I had 39 tabs but only tab0 was saved. And so on.

Thanks!

Edit #1
Some more info:
1. K-M 1.5.4 saves sessions correctly for me. Long urls and lots of windows/tabs. No problems there.
2. I have disk or memory cache disabled (both 1.5.4 and 1.6). Based on reply below, it might not be saving urls of pages not fully loaded?
3. I checked and the length of the longest url saved by K-M 1.6 in prefs.js was 5172. So while long urls could be related to the problem but it seems K-M 1.6 can save long urls and for sure 1.5.4 can do it correctly.

I believe this functionality is very essential to K-M so hopefully it will be fixed. Right now my solution is to use K-M 1.6 only on sites that don't work well with 1.5.4 and pray that computer doesn't crash. Of course I can't shut down or reboot either.



Edited 5 time(s). Last edit at 11/11/2010 03:33AM by Kozak.

Options: ReplyQuote
Re: K-m 1.6 prebeta does not save session completely
Posted by: siria
Date: November 10, 2010 04:59PM

Have noticed that too, but am on win98, so never sure how much is system related ;-) Have a vague impression that 'forgetting session pages' has something to do whether a page was/can be fully loaded or not... especially from cache... If I try to set KM1.6 offline while restoring a bunch of tabs, that's deadly, it tends to end up with lots of "empty pages" without any URL remembered.
(Update: Do not stop loading them, but after setting offline, while those tabs are still busy loading, click 'Reload All Tabs', that will keep the URLs).

So now if I don't want to really fully load all pages with full content all over again from the web (because my machine has too little RAM but I want to keep the URLs), I must physically kill the connection before starting the session restore, that is leave the browser itself set to 'online', then cancelling all new popping up connection attempts. But haven't really examined under which circumstances happens what exactly.



Edited 2 time(s). Last edit at 11/23/2010 09:22PM by siria.

Options: ReplyQuote
Re: K-m 1.6 prebeta does not save session completely
Posted by: desga2
Date: November 11, 2010 02:40AM

I think this is an inherent problem of the sessions kplugin.
Sessions are saved in prefs, but prefs have a limit of 254 characters, this is the why of the sessions problems with long/big sessions with a lot of tabs or URLs very longs. (I remember posting about it some time ago in other forum thread)

Currently Sessions is not ready/building for this type of big Sessions (are not supported).

Now you can try to use Groups2 macro (search in MacroLibrary).
This also use prefs but not save its history, it's possible this save some URLs more longs or some more session tabs.

The future solution for this is create a new Sessions kplugin based in some data base file (like sqlite) instead to use prefs.

As idea, if someone want to implement it, you can create some macro/extension like a LOG. This macro can save all tabs/URLs opened (using OnLoad event) in an ini file and you can load it after from the ini file. This avoid the prefs limits but write/read in/from an ini file is a little more slow.

K-Meleon in Spanish

Options: ReplyQuote
Re: K-m 1.6 prebeta does not save session completely
Posted by: siria
Date: November 11, 2010 03:45AM

Quote
desga2
I think this is an inherent problem of the sessions kplugin.
Sessions are saved in prefs, but prefs have a limit of 254 characters, this is the why of the sessions problems with long/big sessions with a lot of tabs or URLs very longs.

That limit can't be the problem, since KM15x never forgets a single page, only KM1.6. Unless that limit is brandnew? Have no idea really.
Anyway, KM1.6 starts loading tabs, and if for some reason can't finish loading a page correctly, it just forgets the URL too (Update: Only if you manually clicked "Stop"!), and next time you store a session with such 'empty' tabs, they vanish completely. Just a vague impression about possible circumstances, haven't examined it in detail yet, but this never seemed to happen with KM15x.

Also the sessions plugin was updated awhile back to "sessions2", I still see that in about:config: Some really old sessions of mine are still stored in my prefs, and those really stored a whole session in one single line, all windows together! Just copied a *value* and had it counted by my editor, it has over 1100 characters!

But further down appear the "session2" entries, and those have now every single tab URL stored in an own line in the prefs. Pref names go like this:
kmeleon.plugins.sessions2.temp11--km-faves.window1.tab3
kmeleon.plugins.sessions2.temp11--km-faves.window1.tab4
etc.

There must be something really different between gecko1.8 and 1.9, which is causing this...

But I strongly support the suggestion to have the sessions listed in a a separate file (any simple text/ini/js format), not together with all the settings in the prefs.js smiling smiley



Edited 6 time(s). Last edit at 11/23/2010 09:27PM by siria.

Options: ReplyQuote
Re: K-m 1.6 prebeta does not save session completely
Posted by: ndebord
Date: November 12, 2010 10:37PM

kozak,

Try it with Groups instead of Sessions... You can backup different groups and then load them up again if it goes bad.

N

Options: ReplyQuote
Re: K-m 1.6 prebeta does not save session completely
Posted by: desga2
Date: November 13, 2010 02:36AM

Quote
siria
That limit can't be the problem, since KM15x never forgets a single page, only KM1.6. Unless that limit is brandnew? Have no idea really.
Anyway, KM1.6 starts loading tabs, and if for some reason can't finish loading a page correctly, it just forgets the URL too, and next time you store a session with such 'empty' tabs, they vanish completely. Just a vague impression about possible circumstances, haven't examined it in detail yet, but this never seemed to happen with KM15x.

This is a normal behavior, Sessions only save tabs already loaded, not loading tabs.
You must check that all tabs are stoped, not loading, before to save a session.
When you lost (not load) this tabs in Sessions, are you checked if its URLs are saved in prefs?

K-Meleon in Spanish

Options: ReplyQuote
Re: K-m 1.6 prebeta does not save session completely
Posted by: siria
Date: November 13, 2010 04:04AM

It's a bit difficult to describe, because I haven't examined the exact circumstances yet. Too fuzzy yet... But often when restoring a session and clicking "stop" on a page that cannot load at all (no connection or server prob), KM1.6 tends to forget the URL instantly and there's only an empty "about:blank" page left. Although there was an URL in the address bar while it was still trying to load. The only chance is then to wait until it stops loading because of its timeout setting. This will keep the URL in the bar and display a "broken" page. IIRC also if a page was already partly loaded, guess then the Stop-button keeps it in that half-loaded state as it should be.

In KM15x that never happens, vanishing URLs, if there was an URL in the bar while loading, it will still be there after stopping. Even if the page cannot be loaded at all.
The point is, KM15 and KM16 behave very different there.

But am afraid this could be rather complicated to fix, seeing that the URL bar does more weird forgetting-stuff in general on my machine with gecko1.9... And for the moment I don't wanna push for it, there are quite some more important points on the priority list at the moment (like publishing beta-1 cool smiley grinning smiley)
(Ah that reminds me, getting a "refresh" command into the favorites.dll would be very nice too in a beta-2 or 3 or... grinning smiley)



Edited 1 time(s). Last edit at 11/13/2010 04:06AM by siria.

Options: ReplyQuote
Re: K-m 1.6 prebeta does not save session completely
Posted by: siria
Date: November 21, 2010 06:26AM

Now something reproducable smiling smiley
Directly after starting the browser, set it offline, and open the "Previous" session (which was closed normally).
The only tabs that appear, are those which are stored in cache. The other should get "Page Load error" as in KM1.5, but instead there are simply NO tabs at all. If the cache is completely empty, then each window shows only a single empty tab.
Now set it "online" again, and open again the "Previous" session. Miraculously, lots of tabs are appearing out of nowhere now.

If you only want the URLs remembered, and not reload 50 tabs fresh from the web, you must kill the connection outside of KM, while keeping the browser thinking it were "online". This will produce lots of PageLoadErrors after some timeout, but the URLs are all still there.

Sometimes the timeout doesn't seem to work, no idea when. But once ALL tabs are opened and even still loading, one can also click File/Offline and then "Reload all tabs". Now those in cache are displayed, and only the others get PageLoadError.

But guess it would be useful to also check the different cache settings. Mine is set to "Load Always", so no wonder it doesn't load selectively huh cool smiley

Options: ReplyQuote
Re: K-m 1.6 prebeta does not save session completely
Posted by: desga2
Date: November 22, 2010 02:06AM

I think the problem of Session is not that this wasn't saved, because all tabs are stored in prefs, the problem is that if when you load a session some of the tab saved have a timeout or error loading, Sessions kplugin not load more tabs of the session.

Can you check if this is right?

K-Meleon in Spanish



Edited 1 time(s). Last edit at 11/22/2010 02:06AM by desga2.

Options: ReplyQuote
Re: K-m 1.6 prebeta does not save session completely
Posted by: siria
Date: November 23, 2010 10:45PM

Yes it looks very much like the *storing* is okay, only the re-opening has some problem.
Still no idea if it's only my old system??

Not 100% sure, but it seems to happen mainly if trying to restore from cache, in that case only the still stored pages get a tab, the others are ignored completely. It's like gecko19 would only open a tab after checking if the page exists at all.... But only if loading from cache, not from the web... unless you're on KM1.5x

To get all tabs (not the content, just tab with URL), it's also possible to stay online until all tabs have opened, and while they are now waiting to finish loading, the browser can be set "offline" and clicked "reload all tabs". Problem is, the cache is deleted this way too, but at least the URL is still remembered and not tons of pages downloaded again.

Two things I noticed: Local pages like the default homepage "readme.html" always opens okay, cache or not.
And if cache is completely empty, those single remaining tabs in each restored window seem to be the last tabs in the list. Nothing special about them, just the last in list.

Just to be clear, that's not just about crash restoring or faulty pages, the bug is the same also when opening any other stored session:
- If you don't have any sessions stored yet, just create a new one of the current tabs
- set browser to "File/Work Offline", delete cache, and try to open any stored session --> gives me only 1 tab per window
- set browser "online" again and open that same session - it works





Something general, NOT KM1.6 or bug related:

I always have that problem, with old KM versions too, that "crash sessions" don't allow to change any settings first. E.g. if for the last used tab I had allowed javascript, it will now be allowed for ALL tabs while restoring. But if I first decline the automatic crash session restore, in order to check and adapt some 'shields' first, or to set the browser "offline" in order to load from cache, the last session is already forgotten. Only the "previous session" can be restored now, but looks like that's the version from the last "clean" shutdown, not the crashed one.
It seems only possible to change any settings before the browser is opened, by manually editing the prefs.js in the profile folder.

Have now tried to find some workaround to "remember" crash sessions with macros or such, but after examining closer how those sessions are saved, that seems way to difficult for me:

As soon as the browser is started, a brand new "Last Session" gets stored in the prefs, which actually is the 'current session', and so is empty at first. That is, this happens if the browser was shut down orderly the last time. If it was crashed however, if offers to restore the crash session ("Last Session") at startup, but if you decline, that previous "Last Session" is instantly deleted and reset again to zero, to be used for storing the current session again. Which is empty, if you declined restoring the old session.

Now I'm using a rather complicated workaround to manually rename the last crash session into an ordinary stored one. Just in case anyone could use that too:
While browser is still closed, open profile folder, make a backup copy of prefs.js, then edit the original in a notepad. Click Edit>Replace and automatically replace all ".Last Session." with e.g. ".0Last Session.".
If it's the first time you try that trick, also update the menu list by replacing "Previous Session," with "Previous Session,0Last Session,"
Save and start browser.
Now it's possible to decline crash restore, adapt settings or do some other surfing first if you like, doesn't matter anymore, since "0Last Session" is an ordinary stored session like all others, and can be opened whenever you like.

The new name of that session doesn't really matter, can also be "Crash Session" or whatever, it just must come alphabetically before "Last", or it won't work a second time.
That's because the prefs.js automatically gets sorted alphabetically after browser start, and identic entries further down will overwrite the same ones higher up and delete them. That also means there may be remnants in prefs.js of previous "0Last Sessions" if those had more pages stored, but if I get this right it doesn't matter, they are ignored, since the browser will only open the number of pages that gets updated in the counter each time...



Edited 1 time(s). Last edit at 11/23/2010 10:52PM by siria.

Options: ReplyQuote
Re: K-m 1.6 prebeta does not save session completely
Posted by: desga2
Date: November 24, 2010 02:08AM

Yes it's, this is the Session crash restore secuence at start KM:

0) KM crash. When this happend your currently session is stored in prefs:
kmeleon.plugins.sessions2.Last Session.*

1) KM start up and detect a crash in last runing. Ask you if you like restore Last Session browsing before the crash.

a) Your answer is Yes, K-Meleon load "kmeleon.plugins.sessions2.Last Session.*".

b) Your answer is No, K-Meleon clear "kmeleon.plugins.sessions2.Last Session.*".

If you want preserve Last Session when you answer No, you must copy "kmeleon.plugins.sessions2.Last Session.*". in other pref (Previous Session, for example) or rename it.
"kmeleon.plugins.sessions2.Previous Session.*"

But I think the current behaviour is correct, you can choose if you like it or not. This is the normal and usual and if you want other more complex behaviour you can build a macro for it, in this case you are the rare exception.

K-Meleon in Spanish

Options: ReplyQuote
Re: K-m 1.6 prebeta does not save session completely
Posted by: siria
Date: November 25, 2010 05:33AM

Sure I like it, or I wouldn't spend so much time on it smiling smiley
Just would be nice to extend it a little, but I'm not meaning to insist in it, now that it's possible to work around with some manual editing.
But no chance that I could build a macro around that, to rename or copy Last-Session-Prefs before the browser overwrites them at startup is definitely beyond my little skills! And spending an awful lot of time re-inventing a complicated groups3 macro would be nonsense too, since it exists already.

But back to that 1-tab-bug if loading "offline" (File/Work Offline):
I know this sounds silly, but my disk 'sounds' exactly the same when opening the same session, whether only 1 tab is opened (=offline) or all, the whole bunch of a session (=online). Goes something like krk-krk-krk-krk... tongue sticking out smiley A "krk" for each page, depending from number of *stored* tabs, not from number of actually restored tabs. When opening a session offline, seeing that those lonely tabs are the last ones in the last-session-list, that gives me the impression as if the browser is actually loading all pages, just not in different tabs but all pages in the same tab, as if it's missing some 'create new tab' command...



Edited 1 time(s). Last edit at 11/25/2010 05:35AM by siria.

Options: ReplyQuote
Re: K-m 1.6 prebeta does not save session completely
Posted by: desga2
Date: November 26, 2010 03:07AM
Options: ReplyQuote
Re: K-m 1.6 prebeta does not save session completely
Posted by: siria
Date: December 31, 2010 05:24AM

.



Edited 1 time(s). Last edit at 12/31/2010 06:52PM by siria.

Options: ReplyQuote
Re: K-m 1.6 prebeta does not save session completely
Posted by: siria
Date: December 31, 2010 06:55PM

*grmpf* No, for some weird reason the new kernelex yesterday seemed to fix that "1-tab-session-if-offline" bug, but today it doesn't work anymore sad smiley Hmm, or is that a KM bug? can't remember at the moment if anyone has ever tested it on another system, since hardly anyone seems to be using sessions...

Options: ReplyQuote
Re: K-m 1.6 prebeta does not save session completely
Posted by: guenter
Date: December 31, 2010 10:26PM

Quote
siria
1.) *grmpf* No, for some weird reason the new kernelex yesterday seemed to fix that "1-tab-session-if-offline" bug, but today it doesn't work anymore sad smiley Hmm,

3.)or is that a KM bug?

2.) can't remember at the moment if anyone has ever tested it on another system, since hardly anyone seems to be using sessions...

1.) Things like this happen quite often if You search a solution - e.g. with chrome fixes sad smiley

Trust Yourself, it was like You observed - try to find out why.

2.) I always start with a session.

3.) Vrite very slowly, step by step, in German for dummies like me:

How did You reproduce under XP/Vista/Windows7?

I will try.



Edited 1 time(s). Last edit at 12/31/2010 10:40PM by guenter.

Options: ReplyQuote
Re: K-m 1.6 prebeta does not save session completely
Posted by: siria
Date: December 31, 2010 10:33PM

I reproduce on MY system by
- opening the browser,
- setting it OFFLINE,
- DELETING CACHE, and
- opening a session
... and then in 9x it tries to open all the pages in the same tab, one after the other, instead of opening a new tab for each page. That lonely tab is flickering in split seconds and then loads the last page :-/


Edit: Had forgotten the tiny little detail in red, oops!!
Now I know why it "seemed" to work yesterday: had forgotten to clear cache! Sigh. Had know that before, just forgotten again. So let me rephrase that:
... and then in 9x it tries to open all non-cached pages in the previous tab, one after the other, instead of opening a new tab for each page. If one of the pages is found in cache, a new tab is opened for it. But if next page is uncached again, it overwrites again that cached page in the previous tab. Example: If 4 out of 20 pages were cached, not in a row but random, the result are 4-5 tabs when re-opening that session. But they are not displaying the cached pages, if the next in session list were un-cached.
If cache was completely empty, one lonely tab is flickering in split seconds and then loads the last page :-/



Edited 2 time(s). Last edit at 01/01/2011 05:57AM by siria.

Options: ReplyQuote
Re: K-m 1.6 prebeta does not save session completely
Posted by: guenter
Date: December 31, 2010 10:41PM

Ok. How many tabs - about?

Options: ReplyQuote
Re: K-m 1.6 prebeta does not save session completely
Posted by: siria
Date: December 31, 2010 10:46PM

More than 1 grinning smiley

Options: ReplyQuote
Re: K-m 1.6 prebeta does not save session completely
Posted by: guenter
Date: December 31, 2010 11:10PM

Quote
siria
More than 1 grinning smiley

Ok, I tried with 9 tabs. XP SP3.
Started with offline & online mode. 2 or 3 times each.

No luck - i am a hopeless tester that cannot replicate Your bug.

What can I have done wrong - besides using XP confused smiley

p.s. Mach mal den Privacy-Bar als Unterste Reihe und daneben die Tab-Bar zur Rechten davon.

Öffne zwei Tabs, greife das Grippy an der Tab-Bar, schiebe sie ganz gegen die Privacy-Bar und laß sie los.

Keine Angst ... Du kriegst die 2 Tabs wieder wenn du einen Link als Tab öffnest.

Reproduzierbar? Bei mir immer. grinning smiley



Edited 1 time(s). Last edit at 12/31/2010 11:21PM by guenter.

Attachments: fehler2.gif (15.9 KB)  
Options: ReplyQuote
Re: K-m 1.6 prebeta does not save session completely
Posted by: siria
Date: December 31, 2010 11:13PM

(oops)



Edited 2 time(s). Last edit at 01/01/2011 06:04AM by siria.

Options: ReplyQuote
Re: K-m 1.6 prebeta does not save session completely
Posted by: guenter
Date: December 31, 2010 11:26PM

Ich bin absolut sicher, dass du keine Halos hattest - und dass du richtig beobachtet hast.

Sowas ist garnicht so selten. Fehler oder funzende Sachen, die nicht immer sind.
Die machen die ganze Bugfinderei so "bescheiden". Deshalb will Dorian ein Rezept, das auf mindestens 2 Rechnern immer funzt.

Testversionen sind immer bis fast zum Letzten geprüft. Und dann gehen sie auf nem anderen Rechner plötzlich nicht.

p.s. Ach ja - ging der Bug, den ich dir beschrieben hatte?



Edited 1 time(s). Last edit at 12/31/2010 11:31PM by guenter.

Options: ReplyQuote
Re: K-m 1.6 prebeta does not save session completely
Posted by: siria
Date: January 01, 2011 03:04AM

Ähm, wie ging der nochmal...?

Options: ReplyQuote
Re: K-m 1.6 prebeta does not save session completely
Posted by: guenter
Date: January 01, 2011 05:32AM

Quote
guenter
Mach mal den Privacy-Bar als Unterste Reihe und daneben die Tab-Bar zur Rechten davon.

Öffne zwei Tabs, greife das Grippy an der Tab-Bar, schiebe sie ganz gegen die Privacy-Bar und laß sie los.

Keine Angst ... Du kriegst die 2 Tabs wieder wenn du einen Link als Tab öffnest.

Reproduzierbar? Bei mir immer. grinning smiley



Zieh jetzt den Tab-Bar nach links auf/an den Privacy-Bar und laß danach los.
Da verschwindet der Tab-Bar. surprised smiley

So.



Man muss nur verrückte Sachen machen - dann findet man was, ganz ohne kernelX. grinning smiley
& guten Rutsch in ca 6 Minuten, liebe siria.



Edited 2 time(s). Last edit at 01/01/2011 05:54AM by guenter.

Attachments: fehler.gif (15.9 KB)  
Options: ReplyQuote
Re: K-m 1.6 prebeta does not save session completely
Posted by: siria
Date: January 01, 2011 06:30AM

Nö, sorry, keine Chance cool smiley Die Tab bar blockiert wenn sie an dieses 'Hindernis' stößt. Hab extra nochmal default-profil probiert. Dann extra die lesbare Phoenity-Privbar mit den aussagekräftigen Symbolen wieder mit der unlesbaren mit den überall gleichen Kästchen ersetzt. Jedesmal gleiches Resultat. Stabil wie festbetoniert. Muss ein XP-bug sein... LOL!! grinning smiley

Aber nochmal wegen den Sessions, hatte oben noch eine "winzige" Kleinigkeit vergessen!! Das passiert nur bei Seiten, die nicht im Cache sind. Deswegen hat es bei dir funktioniert, und bei mir gestern auch. Dabei war mir das schon lange klar, nur halt momentan nicht drangedacht, blöde. Habs oben noch reingeflickt, ein paar Postings weiter oben in fett rot...

Also ich hab den Rutsch überlebt, du hoffentlich auch gut durchgekommen grinning smiley Auf dass 2011 mal ein positives Jahr werde.



Edited 1 time(s). Last edit at 01/01/2011 06:32AM by siria.

Options: ReplyQuote
Re: K-m 1.6 prebeta does not save session completely
Posted by: guenter
Date: January 01, 2011 08:26AM

Kleine verbesserung: endlich mal...

Ich pobiers morgen nüchtern tongue sticking out smiley



Edited 1 time(s). Last edit at 01/01/2011 08:27AM by guenter.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.