Closed Bug 274648 Opened 21 years ago Closed 21 years ago

crash using repeat element on Windows

Categories

(Core Graveyard :: XForms, defect)

x86
Windows XP
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: aaronr, Assigned: aaronr)

Details

(Keywords: crash)

Attachments

(2 files)

Mozilla can crash or hang on Windows if you use a testcase with a repeat element in it. There is an assertion: ###!!! ASSERTION: You can't dereference a NULL nsCOMPtr with operator->().: 'mRawPtr != 0', file ../../dist/include/xpcom\nsCOMPtr.h, line 849 Error loading URL file:///X:/myprogs/xml/xforms/easyrepeat.xhtml : 804b0002 I'll attach testcase and patch.
This case shows the problem. The problem is with line 426 in nsXFormsRepeatElement.cpp: rv = child->GetNextSibling(getter_AddRefs(child)); getter_AddRefs monkeys with the comptr before it is passed in, so child will all of the sudden become nsnull before it is offset to find GetNextSibling function.
Attached patch proposed fixSplinter Review
proposed fix. Testcase still doesn't show all of the items in the repeat, but I don't think that has anything to do with the patch.
Attachment #168732 - Flags: superreview?(bryner)
Attachment #168732 - Flags: review?(allan)
Status: NEW → ASSIGNED
Keywords: crash
Comment on attachment 168732 [details] [diff] [review] proposed fix r+sr=darin (thinko!)
Attachment #168732 - Flags: superreview?(bryner)
Attachment #168732 - Flags: superreview+
Attachment #168732 - Flags: review?(allan)
Attachment #168732 - Flags: review+
fixed-on-trunk
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
(In reply to comment #2) > Created an attachment (id=168732) [edit] > proposed fix > > proposed fix. Testcase still doesn't show all of the items in the repeat, but > I don't think that has anything to do with the patch. Nope, that's a known bug (bug 266685). You need to style group and repeat so they are styled properly.
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: