Subj : Re: JS_DestroyContext() access violation.. To : netscape.public.mozilla.jseng From : njaguar Date : Thu Feb 27 2003 08:51 pm On Thu, 27 Feb 2003 18:23:04 -0800, Brendan Eich wrote: >> >> >>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? >> > >Yes -- if you're not using threads and calling the JS API on more than >one thread, then you shouldn't need to worry about any of that. But it >wasn't obvious that your embedding is not multi-threaded. Is it? > The application is multi-threaded, each script runs on it's own thread, but a single context never has more than one thread.. I don't think this is a case of being multithreaded, but I really don't know.. It's quite odd, and happens somewhat randomly (and hasn't for quite some time actually...) It's almost like the Context isn't ready to be destroyed or something, or perhaps my js32.dll is ancient, and needs to be updated.. ;) >>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... >> > >What went wrong? Well, for one, none of the file includes are in the proper location... It wants all these mac headers and stuff which aren't provided in the nspr distribution, or the js.. There doesn't seem to be any easy way to get all these to work (though I'm going to try again for the third time..) On a side note, if you're interested, this project is pretty far along now, and we have over 7500 users and counting.. www.d2jsp.org is my site, which explains what I am doing. :) Thanks for all your assistance. .