Subj : Re: JS_DestroyContext() access violation.. To : netscape.public.mozilla.jseng From : njaguar Date : Thu Feb 27 2003 08:23 pm On Thu, 27 Feb 2003 09:58:50 -0800, Brendan Eich wrote: >njaguar wrote: > >>Okay, I have this persistant core runtime that stays resident in >>memory, and certain things trigger scripts to run (ie, I create new >>contexts)... >> >>However, occasionally, it crashes with an access violation on the >>JS_DestroyContext() line. I am completely baffled as to why it's doing >>this.. Am I supposed to call something else prior to this for cleanup? >>Etc.. Here's a stack dump of what's going on: >> > >Get a real stack in a debugger, first. Also, are you using multiple >threads? If so, are you following the request model (using >JS_BeginRequest and JS_EndRequest, etc.)? > >You should be using JS1.5 SpiderMonkey RC5 or the cvs trunk. > >/be Since my application is a DLL attached to another program, getting a "real stack dump" isn't as easy as one might think. :P I'm not here to argue that, I know there's obviously something flawed in my implementation, and I'm looking to fix that. Are there are tutorials or docs on how to accurately use JS_BeginRequest and JS_EndRequest? And don't these require a JS_THREADSAFE version of spidermonkey to be compiled? Lastly, I tried grabbing and compiling JS1.5RC5, but had NO luck getting it to compile with VC++ 6.. Getting RC3 and 4 to compile I didn't have issues... Thanks .