Firefox 1.5.0.7 introduces a crash bug

Bug #62815 reported by Markus Kolb
8
Affects Status Importance Assigned to Milestone
Mozilla Firefox
Fix Released
Critical
firefox (Ubuntu)
Fix Released
Undecided
David Farning

Bug Description

With the dapper security update to 1.5.0.7 Firefox crashes on complex web applications.
See http://bugs.typo3.org/view.php?id=4238 for more information.

Revision history for this message
In , Bugzilla-gtalbot (bugzilla-gtalbot) wrote :

Upon clicking the URL, I crashed with Seamonkey 1.1a rv:1.9a1 build 2005102208
but I did not crash with Firefox 1.5 rv:1.8b5 build 20051021; XP Pro SP2 here.
Though Firefox 1.5 javascript console reports
"
Error: uncaught exception: [Exception... "Component returned failure code:
0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIDOMRange.extractContents]" nsresult:
"0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: javascript:
document.createRange().extractContents(); :: <TOP_LEVEL> :: line 1" data: no]
"

CONFIRMING

Revision history for this message
In , Bugzilla-gtalbot (bugzilla-gtalbot) wrote :

I couldn't find a duplicate for this bug.

Adding clean-report and talkbackid keywords

Revision history for this message
In , Gavin Sharp (gavin-sharp) wrote :

Created attachment 200530
full stack trace

Revision history for this message
In , Ajvincent (ajvincent) wrote :

Related:
###!!! ASSERTION: You can't dereference a NULL nsCOMPtr with operator->().: 'mRawPtr != 0', file ../../dist/include/xpcom\nsCOMPtr.h, line 849

Revision history for this message
In , Ajvincent (ajvincent) wrote :

Oh ho. The mStartParent is the HTML document. Documents have no owner document, so we get null back at line 1725:

res = mStartParent->GetOwnerDocument(getter_AddRefs(document));

From there, we go downhill.

Patch coming up shortly.

Revision history for this message
In , Ajvincent (ajvincent) wrote :

Created attachment 200882
patch, v1

After this patch, we get NS_ERROR_FAILURE. The range is empty.

Revision history for this message
In , Jst (jst) wrote :

Comment on attachment 200882
patch, v1

+ nsCOMPtr<nsIDOMDocument> document(do_QueryInterface(mStartParent));
+ if (!document) {
+ res = mStartParent->GetOwnerDocument(getter_AddRefs(document));
+ if (NS_FAILED(res)) return res;
+ }

The common case here is that mStartParent is *not* a document, so this would be faster over all if you flipped this around (since you wouldn't be trying to QI to nsIDOMDocument when you know it will fail in most cases), i.e.:

+ nsCOMPtr<nsIDOMDocument> document;
+ res = mStartParent->GetOwnerDocument(getter_AddRefs(document));
+ if (NS_FAILED(res)) return res;
+ if (!document) {
+ document = do_QueryInterface(mStartParent);
+ }

r+sr=jst either way though.

Revision history for this message
In , Ajvincent (ajvincent) wrote :

Created attachment 200886
patch, v1.1

Per #developers, I've also added an assertion for document, and for optimized builds, we return if we don't have a document. I'm carrying forward jst's r+sr. I'd appreciate someone checking this in for me, please.

Revision history for this message
In , Ajvincent (ajvincent) wrote :

jst has checked in my patch, thank you.

Revision history for this message
In , Stephen-donner (stephen-donner) wrote :

Verified FIXED using javascript: document.createRange().extractContents(); in the URL bar with build 2005-10-27-04 on Windows XP SeaMonkey trunk.

Revision history for this message
In , Martijn-martijn (martijn-martijn) wrote :
Revision history for this message
In , Martijn-martijn (martijn-martijn) wrote :

Comment on attachment 200886
patch, v1.1

It also crashes on the 1.8.0.x branch, using the typo3 demo.

Revision history for this message
In , Mtschrep (mtschrep) wrote :

Comment on attachment 200886
patch, v1.1

Differing to 1.8.1.1

Revision history for this message
In , Adam Guthrie (ispiked) wrote :

*** Bug 353473 has been marked as a duplicate of this bug. ***

Revision history for this message
Markus Kolb (mkolb) wrote :

With the dapper security update to 1.5.0.7 Firefox crashes on complex web applications.
See http://bugs.typo3.org/view.php?id=4238 for more information.

Revision history for this message
In , Adam Guthrie (ispiked) wrote :

*** Bug 354829 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Martijn-martijn (martijn-martijn) wrote :

Comment on attachment 200886
patch, v1.1

Maybe this can be reconsidered?
It is numer 30 on the firefox2 branch crash list, so it's not really a
topcrasher, but the patch is almost a year in trunk and seems very
safe to me.

Revision history for this message
In , Mtschrep (mtschrep) wrote :

Comment on attachment 200886
patch, v1.1

Still want to wait for this till 1.8.1.1 - thanks for bringing this back up!

Revision history for this message
In , Ligaard (ligaard) wrote :

The Typo3 community discovered the problem immediately after 1.5.0.7 came out. Most are admins and rolled back to 1.5.0.6. The actual number of people affected are larger but it is masked by the rollbacks.

If this does not make it into 1.5.0.8 and 2.0 I hope for an immediate update very soon after.

Revision history for this message
In , Martijn-martijn (martijn-martijn) wrote :

Oh great, the typo3 demo doesn't crash with Firefox1.5.0.6, but does crash after I've updated to Firefox1.5.07 :(

Revision history for this message
In , Mtschrep (mtschrep) wrote :

Comment on attachment 200886
patch, v1.1

Ok. Given we have some folks who are known to be affected let's get this in for RC2.

Revision history for this message
In , Ajvincent (ajvincent) wrote :

The patch applies cleanly to Gecko 1.8 branch with an offset of -23 lines. Need checkin.

Revision history for this message
In , Ajvincent (ajvincent) wrote :

Also applies cleanly to Gecko 1.8.0 branch, offset -31 lines.

Revision history for this message
In , Martijn-martijn (martijn-martijn) wrote :

Checking in nsRange.cpp;
/cvsroot/mozilla/content/base/src/nsRange.cpp,v <-- nsRange.cpp
new revision: 1.189.2.6; previous revision: 1.189.2.5
done

Checked into the 1.8.1 branch.
I just verified in my debug 1.8.1 branch build that it indeed fixes the typo3 crash.

Revision history for this message
In , Martijn-martijn (martijn-martijn) wrote :

Comment on attachment 200886
patch, v1.1

This was checked in on the 1.8.1 branch, so it will also need to be checked in on the 1.8.0.8 branch.

Revision history for this message
In , Adam Guthrie (ispiked) wrote :

*** Bug 354995 has been marked as a duplicate of this bug. ***

Revision history for this message
John Vivirito (gnomefreak) wrote :

Thank you for reporting this bug. The link you gave, i saw issues with mac os and windows nothing on ubuntu/linux debian/linux. Can you please attach a crash report either from a backtrace or from inside /var/crash/.

Changed in firefox:
status: Unconfirmed → Needs Info
Revision history for this message
In , Martijn-martijn (martijn-martijn) wrote :

*** Bug 355011 has been marked as a duplicate of this bug. ***

Revision history for this message
Markus Kolb (mkolb) wrote :

It seems to be a platform independent bug.
The backtrace is attached.

Revision history for this message
In , Dveditz (dveditz) wrote :

Comment on attachment 200886
patch, v1.1

approved for 1.8.0 branch, a=dveditz for drivers

Revision history for this message
In , Martijn-martijn (martijn-martijn) wrote :

Checking in nsRange.cpp;
/cvsroot/mozilla/content/base/src/nsRange.cpp,v <-- nsRange.cpp
new revision: 1.189.6.2; previous revision: 1.189.6.1
done

Checked into the 1.8.0.x branch.

Revision history for this message
Markus Kolb (mkolb) wrote :

Here is a patch for the crash problem...
https://bugzilla.mozilla.org/attachment.cgi?id=200886

Changed in firefox:
status: Unknown → Fix Released
Revision history for this message
In , Jay-mozilla (jay-mozilla) wrote :

v.fixed on 1.8.0 branch with Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.0.8pre) Gecko/20061020 Firefox/1.5.0.8pre

Revision history for this message
David Oxland (doxland) wrote :

I am experiencing the same thing in edgy. This comes in the form; Firefox simply disappears from the screen with no failure notice. On opening firefox again, if an offer to restore previous session which had terminated suddenly is accepted the session resumes and very shortly terminates.
Always the same.

Revision history for this message
John Vivirito (gnomefreak) wrote :

Thanks for your bug report. Could you please try to obtain a
backtrace by following the instructions on
       http://wiki.ubuntu.com/DebuggingProgramCrash.
This will greatly aid us in tracking down your problem.

or Can you please install firefox-dbg than at terminal type dbg firefox hit enter than at the > sign type run and hit enter. than paste the output to a empty file and save it than use the attachfile/comment link on the left of this page to attach it.

David Farning (dfarning)
Changed in firefox:
assignee: nobody → dfarning
status: Needs Info → Fix Released
Changed in firefox:
importance: Unknown → Critical
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.