Closed Bug 410060 Opened 17 years ago Closed 16 years ago

0x80004005 (NS_ERROR_FAILURE) in nsSessionStore.js (line 1749)

Categories

(Firefox :: Session Restore, defect, P1)

defect

Tracking

()

RESOLVED WORKSFORME
Firefox 3

People

(Reporter: kai, Unassigned)

References

Details

(Whiteboard: [firebug-p3])

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11

sometimes (especially when using a slow and flaky Internet connection) I get a few of the following errors in Firebug: 

[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIWebNavigation.document]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: file:///C:/Program%20Files/Mozilla%20Firefox/components/nsSessionStore.js :: sss_saveState :: line 1749"  data: no]
file:///C:/Program%20Files/Mozilla%20Firefox/components/nsSessionStore.js
Line 1749

Reproducible: Sometimes

Steps to Reproduce:
seems to happen during slow, intermittent Internet connectivity



might be related to (or a duplicate of)  https://bugzilla.mozilla.org/show_bug.cgi?id=383700
Whiteboard: [firebug-p3]
Blocks: 422767
100% reproducible.

1. Install firebug

2. Visit http://www.livevalidation.com/examples

3. Enable firebug for this website

4. Refresh the page.

5. click in any field, then tab out.

You will get the reported error in firebug's console, and then very soon firefox will max out the cpu and hang (apparently forever).

Note, this is NOT a livevalidation-specific bug!  For reasons I haven't been able to determine yet, all form validation libraries seem to do it.  Try one of the following, enabling firebug for that website:

See also: "really easy field validation" demo:
http://www.tetlaw.id.au/upload/dev/validation/

See also JSValidate!
http://www.jsvalidate.com/ (seems to happen on the front page, even)
Depends on: 429414
I could not reproduce Comment #1 with 
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9pre) Gecko/2008041506 Minefield/3.0pre
and Firebug 1.2a20X

I did see the session restore message from the original post, but not lately.
I don't know why everyone keeps referencing Firebug for this. I've never used the addon or installed it and I get the error but at a different line.

I open about 5 tabs in my 1st window, and have 2 or less tabs in the following windows I opened. Then I shutdown with File > Exit, which allows my windows to be restored at next startup.

Trunk build: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9pre) Gecko/2008041809 Minefield/3.0pre

I also have AMO opened in one of the windows, it might be part of this.

My error:
Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMLocation.host]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: file:///C:/Documents%20and%20Settings/Blackie/Desktop/Fx/components/nsSessionStore.js :: sss_saveState :: line 1896"  data: no]
Source File: file:///C:/Documents%20and%20Settings/Blackie/Desktop/Fx/components/nsSessionStore.js
Line: 1896
(In reply to comment #3)
> I don't know why everyone keeps referencing Firebug for this. 

Because Cory thought the problem could be reproduced using Firebug.  Until we find a way to reproduce this, nothing will be fixed.
Confirming, upping priority. I'm seeing this on Mac nightly.

Regardless of the cause, the effect is that the exception is *not* caught, causing sessionstore.js to not be written! In the profile in which I'm seeing this bug, the sessionstore.js hasn't been written to in over 24 hours.

Unfortunately, I have many windows, and probably 100+ tabs open, so no solid STR yet :(

Targeting this to the first branch maintenance release, as we should catch the exception at the very least.
Severity: normal → critical
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking1.9.0.1?
OS: Windows XP → All
Priority: -- → P1
Hardware: PC → All
Target Milestone: --- → Firefox 3
Version: unspecified → Trunk
ok, i'm about 99% positive this is the URL that was causing this:

http://ui.jquery.com/bugs/browser/trunk/tests/simulate/jquery.simulate.js

maybe trying to access the hostname of a .js file throws?
Related to bug 366509?

Dietrich, you've said that you think this is severe enough to block 1.9.0.1, do you have a wallpaper patch to catch the exception?
Flags: wanted1.9.0.x+
Still no reproduction of Comment #1 with 
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0
and Firebug 1.2 svn (about b4).

I do see SessionStore exceptions routinely, no test case to reproduce.
Flags: blocking1.9.0.1? → blocking1.9.0.1-
I'm hitting this, on Mac. Let me see if I can figure out how to reproduce.
1) To be clear, on mac, the error msg I see is: (note line# is same as comment#2, but different to bug summary).

Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMLocation.host]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: file:///Applications/Firefox.app/Contents/MacOS/components/nsSessionStore.js :: sss_saveState :: line 1896"  data: no]
Source File: file:///Applications/Firefox.app/Contents/MacOS/components/nsSessionStore.js
Line: 1896


2) I get this error after restarting Firefox and restoring session. It happens immediately, and keeps recurring every 10-30 seconds.
This could be somehow related to bug 419661 in that under certain circumstances toSource (which is called from sss_saveState) doesn't serialize XUL objects (mainly tabs of not fully restored tabs) to {} but recurses into their properties.

John: Would you mind going through getBrowser().mTabs, toSource them individually and see whether you get the same NS_ERROR_FAILURE? If so, maybe you'll spot properties that usually aren't there which lead us closer to the core issue.

As for 2), that's just the result that SessionStore updates its state at most every 10 seconds (less so, if you don't browse around and don't switch tabs).
Just hit this again, with same symptoms:

- clicking with mouse to switch tabs is ignored, but doing apple-n does work
- typing in URLbar area does not display any awesome-bar-popdown suggestions
- typing in the search box does not display any popdown search suggestions
- browser does gracefully close down, and session restart does correctly restore all tabs/windows.

Looking in error console, I now see: 
...
Error: Permission denied to call method Location.toString
Error: Permission denied to call method Location.toString
Error: Permission denied to call method Location.toString
Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIObserverService.removeObserver]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://browser/content/browser.js :: BrowserShutdown :: line 1019"  data: no]
Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIObserverService.removeObserver]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://browser/content/browser.js :: BrowserShutdown :: line 1019"  data: no]


Simon: sorry I didnt see your update until just now, after I'd hit this problem closed and restarted browser. I'll try it next time.
(In reply to comment #12)
> Error: uncaught exception: [Exception... "Component returned failure code:
> 0x80004005 (NS_ERROR_FAILURE) [nsIObserverService.removeObserver]"  nsresult:
> "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame ::
> chrome://browser/content/browser.js :: BrowserShutdown :: line 1019"  data: no]

These look like bug 310955.
John (O'Duinn): Do you have Firebug installed? the Location.toString errors look like those mentioned in bug 434522. If you're still seeing these errors, you could try with a 3.0.x nightly and you might get some extra info in your error console.
Blocks: 429414
No longer depends on: 429414
Are you still able to reproduce this issue with a 20081106 nightly build? If not, this bug was fixed by bug 407110.
I haven't seen this problem in a while, probably not since upgrading to Firefox 3.0.x.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.