Re: Crash when deleting dumb context from JSD_DebuggerOff()
James Ross <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.jsdebugger |
|---|---|
| Message-ID | <[email protected]> |
Dassburger wrote: > So, the question is is it allowed to call JSD_DebuggerOff() while > runtime still has contexts and scripts loaded. Yes; if Venkman is not set to start JSD at startup, then it will turn JSD on and off as you open and close Venkman, which works fine. You can turn debugging for a particular SpiderMonkey runtime on and off as you please, however, JSD can only see scripts that are loaded *after* it is turned on, as far as I can remember. (So, if you turn it off and on it 'forgets' all the currently loaded scripts.) You mentioned threading and that SpiderMonkey and JSD are not compiled with thread-safety - if you even *think* about using threads without compiling the appropriate thread-safety you *will* crash randomly and often. You should definitely compile with thread-safety or only ever use one thread with these components (even then, you could accidentally call one or other from the wrong thread unless you're exceptionally careful). Once that issue is dealt with, any crashes are misuse of the APIs or bugs - you *will* need to collect stack traces from a debug build for any more to be worked out. Note that, if your app has multiple threads, get the stacks for all of the threads at the time of the crash - even if you don't think you're using SpiderMonkey or JSD across threads. I would suspect that something in SpiderMonkey that JSD is using has gone away unexpectedly or otherwise without JSD's knowledge, possibly because of GC, and that causes JSD to die when being turning off. Need stacks with line numbers and such to begin figuring out *what* object it might be, though. -- James Ross <[email protected]> ChatZilla Developer