crash when I run range's surroundContents method

RESOLVED WORKSFORME

Status

()

--
critical
RESOLVED WORKSFORME
15 years ago
6 years ago

People

(Reporter: volod_0x16, Unassigned)

Tracking

({crash, stackwanted, testcase})

Trunk
x86
Linux
crash, stackwanted, testcase
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

15 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113

browser craches when I browse html with such content:
<html><body>
<script type="text/javascript">
range = document.createRange();
newNode = document.createElement("b");
range.selectNodeContents(document);
range.surroundContents(newNode)
</script>
text
</body></html>


Reproducible: Always

Steps to Reproduce:
1. create html file with content:
<html><body>
<script type="text/javascript">

range = document.createRange();
newNode = document.createElement("b");
range.selectNodeContents(document);

range.surroundContents(newNode)

</script>
text
</body></html>

2. try to view it
3.

Actual Results:  
brower has crashed

Comment 1

15 years ago
I don't crash using Firebird 20040119 on Win2k.

JS console shows:

Error: uncaught exception: [Exception... "Component returned failure code:
0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIDOMRange.surroundContents]"  nsresult:
"0x80070057 (NS_ERROR_ILLEGAL_VALUE)"  location: "JS frame :: testcase.html ::
<TOP_LEVEL> :: line 6"  data: no]

Can you get a stack on Linux and attach it via "create a new attachment" ?
http://www.mozilla.org/unix/debugging-faq.html

if you're using the standard mozilla startup script, just do
% mozilla -g
(gdb) run
[wait for mozilla to crash]
(gdb) bt
Attach the output from "bt" via "create a new attachment" (on bugzilla)
Severity: normal → critical
Keywords: crash, stackwanted
(Reporter)

Comment 2

15 years ago
Created attachment 139420 [details]
gdb's output on crash
(Reporter)

Comment 3

15 years ago
Created attachment 139421 [details]
html that makes mozilla crash

Comment 4

15 years ago
I also crash with Firebird 0.8 branch build 20040114.
Keywords: testcase
A stack trace from a nightly is not useful.....
Assignee: general → traversal-range
Component: DOM: Core → DOM: Traversal-Range

Comment 6

15 years ago
I get the same error as Olivier from Comment 1 did and no crash.  Using LInux
2004020207
I saw this crash using 1.6, but not 1.7beta (or a current trunk).  Resolving as
WORKSFORME.  Reporter, please re-open if this is still a problem on 1.7beta or
newer.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → WORKSFORME

Comment 8

10 years ago
Crashtest added as part of http://hg.mozilla.org/mozilla-central/rev/afc662d52ab1
Flags: in-testsuite+
Component: DOM: Traversal-Range → DOM: Core & HTML
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.