MozillaZine


Session Manager 0.1 to 0.3.9+

Talk about add-ons and extension development.
dougeeebear

User avatar
 
Posts: 548
Joined: September 15th, 2005, 4:17 pm

Post Posted April 10th, 2006, 3:02 pm

zeniko,
In Session Manager options, the Session List dialog reads "Number of older (crashed) session backups to keep:".
In my mind, crashed sessions and older session backups are two different things.
I think "(crashed)" should be removed from that statement.

JDPower
 
Posts: 31
Joined: January 29th, 2006, 1:30 pm
Location: UK

Post Posted April 10th, 2006, 3:05 pm

As soon as I posted the above I discovered that the problem is caused when using the Restart Firefox extension. If I close and reopen FF Session Manager works as it should but if I use Restart FF then it doesn't reload my previous session. I didn't initially suspect Restart Firefox as it used to work really well with session Manager but something has obviously changed to cause this (and Restart Firefox hasn't been updated for several months so its not that).

EDIT: Have just uninstalled version 0.3.9 and installed version 0.3.8 from the Mozilla site and that version works fine with Restart Firefox so whatever has changed for 0.3.9 has stopped Session Manager working with Restart FF :(

dougeeebear

User avatar
 
Posts: 548
Joined: September 15th, 2005, 4:17 pm

Post Posted April 10th, 2006, 3:19 pm

@JDPower:
Do you have the latest beta version of Restart Firefox installed?
You'll find it here

JDPower
 
Posts: 31
Joined: January 29th, 2006, 1:30 pm
Location: UK

Post Posted April 10th, 2006, 3:29 pm

dougeeebear wrote:@JDPower:
Do you have the latest beta version of Restart Firefox installed?
You'll find it here

No, and having looked at the changes I don't think I want it. I want Restart Firefox just to restart FF. I don't really want a bloated version with additional features that are already covered by Session Manager. Thanks anyway for the suggestion.

dougeeebear

User avatar
 
Posts: 548
Joined: September 15th, 2005, 4:17 pm

Post Posted April 10th, 2006, 3:41 pm

zeniko,
Would it be possible to add a menu selection to TMP style menu for opening the Session Manager Options?

feline_dracoform
 
Posts: 4
Joined: March 8th, 2006, 5:26 pm

Post Posted April 10th, 2006, 3:43 pm

posts to a web based bug tracking tool are being duplicated when i reload firefox *doh*
firefox 1.5.0.1 running on winXP pro, with SM 0.3.8

this is happening with the FogBugz bug tracker. i have introduced at least 10 completely identical bugs (each has a different bug ID, which is assigned by the bug tracking software) before working out that it was caused by session manager. this problem seems to have occurred in the recent versions, certainly it happens with 0.3.8

i am fairly sure it did not occur with 0.2.13.1

i opened a new firefox window, loaded the bug tracking website, submitted a bug completely (it was accepted and a bug number was generated and returned), and then told SM to save the session. opening the session file in notepad the interesting bit seems to be:

[Window1.Tab1.Entry2]
uri=http://64.121.xx.xx:1667/wt/default.asp?command=new&pg=pgEditBug
title=FogBugz
ID=254
scroll=0,0

[Window1.Tab1.Entry3]
uri=http://64.121.xx.xx:1667/wt/default.asp?pre=preSubmitBug
title=FogBugz 1126: alt-g places the caret vertically off screen
ID=257
scroll=0,0
postdata= ***lots of text, including my complete bug description***


currently i have to make sure i do not leave the website on this page when closing firefox, or the bug will be duplicated. closing firefox manually (no crash) and reloading it will generate a duplicate bug.

in SM options i have found a section labelled "Don't touch these, unless you know what you're doing" which has a section for how much POSTDATA to store. this is set to -1, i presume this is the default.

will setting this to zero stop the duplicate bug problem? is this a feature that is back firing in this special case, or actually a bug in SM? if i do set POSTDATA to zero what side effects should i expect?
zen is the art of being at one with the twoness

old zeniko
 
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post Posted April 10th, 2006, 3:56 pm

JDPower wrote:I have the options set to ask whether to save the session when closing and to reload the previous browsing session at startup. But it no longer resumes the previous browsing session (I just get my homepage), in fact it doesn't even seem to save the previous session as if I click the session manager tab and select the previous session I just get my homepage. The only combination of startup/shutdown options that works is backup session at shutdown and prompt for a session at startup, ANY other combination and it won't work.

This might just as well be due to a bug in Restart Firefox (which makes a restart look rather like a forced shutdown). This should be fixed in the current beta (of Restart Firefox).

dougeeebear wrote:In my mind, crashed sessions and older session backups are two different things.

Why are they two different things? They're both the state of your browser before quitting.

JDPower wrote:EDIT: Have just uninstalled version 0.3.9 and installed version 0.3.8 from the Mozilla site and that version works fine with Restart Firefox so whatever has changed for 0.3.9 has stopped Session Manager working with Restart FF :(

Strange. I'll look into it... You might want downgrading, you might also consider upgrading to <a href="http://www.haslo.ch/zeniko/software/sessionmanager-dev.xpi">version 0.3.9.6+</a> which also contains some shutdown/restart related bug fix.

JDPower wrote:I want Restart Firefox just to restart FF. I don't really want a bloated version with additional features that are already covered by Session Manager.

With Session Manager installed, the new Restart Firefox will use Session Manager for reloading the tabs anyway - but you still might want to use it for the bug fix I mentioned.

dougeeebear wrote:Would it be possible to add a menu selection to TMP style menu for opening the Session Manager Options?

This would be possible, but IMO doesn't make sense, since the context menu lists just actions on the selected theme and opening the Options dialog isn't one of those.

feline_dracoform wrote:posts to a web based bug tracking tool are being duplicated when i reload firefox *doh*

Sorry for that. Version 0.3.9 should fix this for most cases. (And I'm pretty certain that versions 0.2.* already had the same buggy behavior.)

feline_dracoform wrote:in SM options i have found a section labelled "Don't touch these, unless you know what you're doing" which has a section for how much POSTDATA to store. this is set to -1, i presume this is the default.

Setting this to 0 doesn't harm except restoring some pages won't work as expected any longer (i.e. a lot of pages where you have to submit a form to reach them - such as the search in this forum or the post preview pages).

dougeeebear

User avatar
 
Posts: 548
Joined: September 15th, 2005, 4:17 pm

Post Posted April 10th, 2006, 4:57 pm

zeniko wrote:
dougeeebear wrote:Would it be possible to add a menu selection to TMP style menu for opening the Session Manager Options?

This would be possible, but IMO doesn't make sense, since the context menu lists just actions on the selected theme and opening the Options dialog isn't one of those.

No biggie, I figured it out.

********
 
Posts: 947
Joined: August 24th, 2005, 12:23 pm

Post Posted April 10th, 2006, 5:41 pm

about "* Removed the "Resume Current Session At Restart" option (use the "At startup ..." option instead) ":

i have "At startup..."" set to none [load the homepage] and it still restores my previous session.
is it supposed to do this?

old zeniko
 
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post Posted April 10th, 2006, 5:56 pm

desertfox wrote:i have "At startup..."" set to none [load the homepage] and it still restores my previous session.

Setting the "At startup..." option to something else, confirming the Options dialog and setting it back should take care of this issue. I actually just removed the UI for a pref which is still active (but gets reset when you change "At startup..."). Might want to think about a migration plan... oh, well.

********
 
Posts: 947
Joined: August 24th, 2005, 12:23 pm

Post Posted April 10th, 2006, 6:08 pm

that's what i thought was going on, but i didn't want to take any action until i was sure.
thanks. it's working perfectly, as usual.

dougeeebear

User avatar
 
Posts: 548
Joined: September 15th, 2005, 4:17 pm

Post Posted April 10th, 2006, 6:40 pm

In case anyone wants to add "Session Manager Options" to the TMP style context menu:
(I removed it from the sessions list menu)

Code: Select all
gSessionManager.__options = function()

   {
      openDialog("chrome://sessionmanager/content/options.xul", "_blank", "chrome,dialog,modal,titlebar");
   };


For the menu entry:

Code: Select all
   popup.appendChild(createItem("Session Manager Options", "O", "options"));

Last edited by dougeeebear on April 11th, 2006, 3:47 am, edited 1 time in total.

Dan Harkless

User avatar
 
Posts: 13
Joined: December 20th, 2005, 11:26 pm
Location: Orange County, California

Post Posted April 10th, 2006, 8:15 pm

Sorry for the slow response, Zeniko. As I mentioned, this bug was driving me crazy, so I uninstalled Session Manager and didn't have time to reinstall it to try your diagnostic tests. However, I had SessionSaver lose another huge session on me, so I'm back to Session Manager again.

I have verified that having "Begin finding when you begin typing" unchecked does prevent this from happening, so I am using that as a workaround for now, but I really don't like it as my muscle memory compels me to begin typing search text without a '/' character.

In any case, I got a chance today to try out your tests.

zeniko wrote:
Dan Harkless wrote:Intermittently, trying to type text in form fields would cause Firefox's find-as-you-type to get activated instead, and typing the form fields would be impossible (making the browser almost unusable). The first couple of times this happened, I was able to restore the page to proper functionality by reloading it, but on subsequent days I was unable to ever get a page to behave, once it started acting this way.

WFM.

"Works For Me"? Do you run with "Begin finding when you begin typing" turned on all the time? As I mentioned, this is an intermittent bug, so you may not see it if you don't usually run Firefox with that turned on.

Does this also happen on a clean profile?

Yes. I created a new profile today, installed Session Manager, and turned on the "Begin finding when you begin typing" option and the two javascript.options.* options in about:config.

In some quick browsing the error did not occur, so I made most of the rest of my usual settings, thinking I might need to browse for some time before I could get the intermittent error to occur (hid Bookmarks Toolbar, customized the main toolbar to remove most of the buttons, changed Home Page, turned off Form and Password saving, set Remove files from the Download Manager: Upon successful download, set Allow sites to set cookies: for the originating site only, set Open links from other applications in: a new window, set Select new tabs opened from links, unset Warn when closing multiple tabs, set Ask me where to save every file, set Close the Download Manager when all downloads are complete, unset Resize large images to fit in the browser window, set When updates to Firefox are found: Ask me what to do, and set Use OSCP to validate only certificates that specify an OCSP service URL).

After these settings changes, it still wasn't doing it. So I started browsing for awhile, and within several minutes the intermittent error did occur. I got it to happen on http://www.google.com/advanced_search?l ... en&num=100 (reliably, once it started occurring, though interestingly, just now I went back to that same window and it has since stopped doing it again).

Does disabling other extensions help (if so, which extensions did you have to disable)?

Other than Session Manager, I don't have any extensions installed other than the default DOM Inspector and Talkback. However, I tried disabling them, and this does not prevent the bug from occurring.

Do you get any errors in the JS console (having all javascript.options.* set to true)?

No. When I was having it occur on that Google Advanced Search page, the only errors that would show up in the console are the three that always show up on that page:

Code: Select all
Error: Selector expected.  Ruleset ignored due to bad selector.
Source File: http://www.google.com/advanced_search?lr=lang_en&num=100
Line: 3

Error: Unexpected end of file while searching for closing } of invalid rule set.
Source File: http://www.google.com/advanced_search?lr=lang_en&num=100
Line: 3

Error: Error in parsing value for property 'cursor'.  Declaration dropped.
Source File: http://www.google.com/advanced_search?lr=lang_en&num=100
Line: 25

No additional errors would appear when trying to type in form fields and having it suddenly jump into find-as-you-type mode (and those three errors would show up in the console even when visiting that page and not having the bug occur).

By the way, this bug occurs both on my Windows XP machine at work and my Windows 2000 machine at home, so this is a replicable bug, not something specific to one machine / profile / user login / OS.

lolo92
 
Posts: 4
Joined: April 4th, 2006, 3:25 am

Post Posted April 11th, 2006, 2:25 am

lolo92 wrote:SM reload all windows and the "reload all restored..." is not checked.
Open any php website and it would be reloaded, and I'd like it to be just reopened the way it was before the crash (ie a html version...)

The problem you observe is that Firefox has the tendency to discard parts or even the whole of its cache after a crash. Session Manager tries to prevent this, but might not always succeed. Now, either it keeps a second cache (which would mean quite some overhead - and ignore the fact that I've got no idea how to implement such a feature) or it simply gets along with what it's got. For obvious reasons I chose the latter. I'm afraid that there's not much I can currently do to remedy this...


Thanks for the response... I haven't really look the way you save sessions, but if you save a html cached version you could print it without reloading the php, no ? (it's a question, I know this is not easy :))
Even without crashing, just close and reopen, SM always reload any php page. Big problem for me with pages with some sessions in it, because these sessions have been ended...

dougeeebear

User avatar
 
Posts: 548
Joined: September 15th, 2005, 4:17 pm

Post Posted April 11th, 2006, 6:31 am

To add an "Open Session Folder" item to the TMP style menu:
Code: Select all
gSessionManager.__openSessionFolder = function()
    {
      try
      {
         this.getSessionDir().launch();
      }
      catch (ex)
      {
         this.ioError(ex);
       }
   };

And for the menu entry:
Code: Select all
popup.appendChild(createItem("Open Session Folder", "F", "openSessionFolder"));

Return to Extension Development


Who is online

Users browsing this forum: No registered users and 1 guest