Crash when deleting dumb context from JSD_DebuggerOff()
"Dassburger" <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.jsdebugger |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <[email protected]> |
Hello! We develop some program which uses SpiderMonkey as an interpreter for embedded language. The platform also supports debugging embedded scripts. I have a JS runtime which has some script loaded in it. Then by some request from outside I turn on debugging with JSD_DebuggerOnForUser(). After some debugging actions comes another request which results in a call to JSD_DebuggerOff(). Here, the script is still loaded, but waits for some user action, for example, for a button click on a form. While executing the call to JSD_DebuggerOff() occasionaly it results in Access Violation somewhere in SpiderMonkey's garbage collector. The first trouble in hunting this bug is that the crash occurs occasionaly. Most time it's perfectly Ok. I thought about some multithreading problem (because SpiderMonkey and JSD are compiled NOT thread-safe), but the problem remains even if all calls to JavaScript-specific stuff occurs from the same thread. So, the question is is it allowed to call JSD_DebuggerOff() while runtime still has contexts and scripts loaded. To be specific, there is no scripts _executing_ at the moment of crash. They are compiled and loaded into runtime, but all of them are waiting for user actions. The request to turn of debugging comes from user, but it is not processed by JS, but by other parts of our programs. (Sorry, my English is not good, so the explanation can seem unclear.)