Closed Bug 345660 Opened 18 years ago Closed 18 years ago

Crash [@ ClassifyWrapper] with xmlhttprequest and NS_ERROR_FILE_NOT_FOUND when Firebug extension is installed

Categories

(Core :: DOM: Core & HTML, defect, P1)

defect

Tracking

()

VERIFIED FIXED
mozilla1.8.1beta2

People

(Reporter: martijn.martijn, Assigned: dbaron)

References

()

Details

(5 keywords)

Crash Data

Attachments

(3 files)

See upcoming testcase. This crashes current Firefox builds (1.8.1 branch and trunk) when the Firebug extension is installed and running. This regressed on trunk between 2006-05-25 and 2006-05-26. On branch, the regression happened between 2006-06-06 and 2006-06-26. I think this regressed with bug 206520. Talkback ID: TB21297965H ClassifyWrapper nsDOMClassInfo::BeginGCMark nsDOMClassInfo::MarkReachablePreservedWrappers nsDOMGCParticipantSH::Mark XPC_WN_Helper_Mark js_Mark MarkGCThingChildren MarkGCThingChildren MarkGCThingChildren js_MarkGCThing js_GC js_ForceGC NS_ProcessNextEvent_P nsBaseAppShell::Run 0x00392aac 0xccccc3c0 Of course, maybe this is not Mozilla's fault, and is Firebug doing something wrong.
Attached file testcase
This testcase crashes for me when I have Firebug installed.
firebug generally can't do things wrong, sure it's possible for chrome code to maliciously trigger a crash, but in almost all cases it's either jsd_xpc, xpconnect or jsd's fault. sometimes it's just dom or spidermonkey's fault.
This is basically the code from firebug that causes the crash. I tried to make a testcase out of it, but failed. I know this causes it, because, when I uncomment if (this.showXMLHttpRequests) this.attachXMLHttpSpy(context, win); in firebug.js, then the crash doesn't happen.
Flags: blocking1.8.1?
*** Bug 342509 has been marked as a duplicate of this bug. ***
This works for me using a 1.8 branch Linux debug+opt build. Or is there something I'm supposed to do other than install firebug, restart, and load the testcase?
No, that's all you should do to get this bug. I can still reproduce this on current trunk windows builds. I haven't been able yet to get a good stacktrace in a debug build.
(In reply to comment #5) > This works for me using a 1.8 branch Linux debug+opt build. Or is there > something I'm supposed to do other than install firebug, restart, and load the > testcase? > Be sure to have "Show XmlHttpRequests" checkbox activated in the firebug's Options menu. It is not checked by default, and without it checked, there's no crash.
(In reply to comment #7) > Be sure to have "Show XmlHttpRequests" checkbox activated in the firebug's > Options menu. It is not checked by default, and without it checked, there's no > crash. I don't see any such option inside Tools -> Firebug. Is there some other "Options menu"?
(In reply to comment #8) > I don't see any such option inside Tools -> Firebug. Is there some other > "Options menu"? You can enable xmlhttprequests logging here (but I thought it was enabled by default), I've made an image of it: http://wargers.org/firebug.gif
I got it to crash in a debug build, but not while running under valgrind.
Flags: blocking1.8.1? → blocking1.8.1+
Attached patch patchSplinter Review
This turns out to be a pretty trivial problem. In nsXMLHttpRequest::RemoveEventListener, I leak the ListenerHolder (a typedef to nsMarkedJSFunctionHolder<nsIDOMEventListener>). (I can't use nsTArray<ListenerHolder> because I need pointer identity on the ListenerHolder objects.) Leaking the ListenerHolder means its destructor doesn't run, and its destructor cleans up a pointer to the nsXMLHttpRequest object.
Attachment #231648 - Flags: superreview?(bugmail)
Attachment #231648 - Flags: review?(bugmail)
Assignee: general → dbaron
OS: Windows XP → All
Priority: -- → P1
Hardware: PC → All
Target Milestone: --- → mozilla1.8.1beta2
Comment on attachment 231648 [details] [diff] [review] patch looks good, r/sr=sicking
Attachment #231648 - Flags: superreview?(bugmail)
Attachment #231648 - Flags: superreview+
Attachment #231648 - Flags: review?(bugmail)
Attachment #231648 - Flags: review+
Fix checked in to trunk.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Attachment #231648 - Flags: approval1.8.1? → approval1.8.1+
Fix checked in to MOZILLA_1_8_BRANCH.
Keywords: fixed1.8.1
Verified fixed, using: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1b1) Gecko/20060802 BonEcho/2.0b1 using the testcase and with Firebug installed.
Status: RESOLVED → VERIFIED
Flags: in-testsuite?
Crash Signature: [@ ClassifyWrapper]
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: