[Greasemonkey] OOPy GM script seems to crash Firefox
Aaron Boodman
zboogs at gmail.com
Fri Jun 24 11:58:45 EDT 2005
What version of FF are you using? I have been seeing some crashes like
this in Deer Park alphas... I was going to ask around about them.
On 6/24/05, Dan Phiffer <dan at phiffer.org> wrote:
> Before I was noticing the script would run for a bit longer before
> crashing, but now it crashes immediately.
>
> Is there any way to make sense of the crash data that gets reported
> by Mac OS? Here is part of it that seems like it would be useful:
>
> Thread 0 Crashed:
> 0 org.mozilla.firefox 0x00303bc0 nsGenericElement::InsertChildAt
> (nsIContent*, unsigned, int, int) + 376
> 1 org.mozilla.firefox 0x00304b34
> nsGenericElement::doInsertBefore(nsIContent*, nsIDOMNode*,
> nsIDOMNode*, nsIDOMNode**) + 1560
> 2 libxpcom.dylib 0x07059998 _XPTC_InvokeByIndex + 216
> 3 org.mozilla.firefox 0x00033208 XPCWrappedNative::CallMethod
> (XPCCallContext&, XPCWrappedNative::CallMode) + 2508
> 4 org.mozilla.firefox 0x0002909c XPC_WN_CallMethod(JSContext*,
> JSObject*, unsigned, long*, long*) + 220
> 5 libmozjs.dylib 0x060293ac js_Invoke + 1716
> 6 libmozjs.dylib 0x06030768 js_Interpret + 26228
> 7 libmozjs.dylib 0x060293ec js_Invoke + 1780
> 8 libmozjs.dylib 0x06030768 js_Interpret + 26228
> 9 libmozjs.dylib 0x060293ec js_Invoke + 1780
> 10 org.mozilla.firefox 0x0003c314
> ...
>
> -Dan
>
> On Jun 23, 2005, at 7:44 PM, Aaron Boodman wrote:
>
> > Was it crashing immediately upon doing this, or a little later?
> >
> > On 6/23/05, Dan Phiffer <dan at phiffer.org> wrote:
> >
> >>
> >> On Jun 23, 2005, at 3:15 PM, Dan Phiffer wrote:
> >>
> >>
> >>> So I think I fixed that script. Instead of appending all the
> >>> accumulated DIV elements of loaded content to the document object
> >>> initially, I'm just holding them in an array and displaying them as
> >>> they're needed. I tried making a simple test case to demonstrate
> >>> the problem, but I couldn't craft one that would crash consistently.
> >>>
> >>
> >> Scratch that, here was the difference:
> >>
> >> // This crashes
> >> var node = document.createElement('div');
> >> node.innerHTML = lots_of_content;
> >> othernode.appendChild(node);
> >>
> >> // This doesn't crash
> >> var node = document.createElement('div');
> >> othernode.appendChild(node);
> >> node.innerHTML = lots_of_content;
> >>
> >> Again, no test case, but worth trying if you run into mysterious
> >> crashing.
> >>
> >> -Dan
> >> _______________________________________________
> >> Greasemonkey mailing list
> >> Greasemonkey at mozdev.org
> >> http://mozdev.org/mailman/listinfo/greasemonkey
> >>
> >>
> > _______________________________________________
> > Greasemonkey mailing list
> > Greasemonkey at mozdev.org
> > http://mozdev.org/mailman/listinfo/greasemonkey
> >
>
> _______________________________________________
> Greasemonkey mailing list
> Greasemonkey at mozdev.org
> http://mozdev.org/mailman/listinfo/greasemonkey
>
More information about the Greasemonkey
mailing list