Subj : Re: JS_THREADSAFE / assertion failed on rt->gcRunning To : sebastien maraux From : Brendan Eich Date : Fri Mar 04 2005 08:24 am sebastien maraux wrote: > > Here is my call stack when the assertion fails : > I call a function which should update data of my script : This stack is listed in the reverse of the normal order, but ok. > JS_CallFunctionValue(m_JSContext, m_GlobalObject, fval, 2, argv, > &rval); > -> js_InternalInvoke(JSContext *cx, JSObject *obj, jsval fval, uintN > flags, > uintN argc, jsval *argv, jsval *rval) > -> js_Invoke(JSContext *cx, uintN argc, uintN flags) //call a function > to move an object left > -> js_Interpret(cx, &v); > -> JSBool js_DefaultValue(JSContext *cx, JSObject *obj, JSType hint, > jsval *vp) > -> js_TryMethod(cx, obj, cx->runtime->atomState.toStringAtom, 0, NULL, > &v)) > -> js_InternalInvoke(JSContext *cx, JSObject *obj, jsval fval, uintN > flags, > uintN argc, jsval *argv, jsval *rval) > -> js_Invoke() // call a function to draw moved object > -> (my function) fieldToString() // try to print its new position : > build a string from its vector position > -> JS_NewUCStringCopyZ > -> JS_NewString > -> js_AllocGCThing > -> assertion failed on JS_ASSERT(!rt->gcRunning); What is on the stack "below" JS_CallFunctionValue? Please show the entire stack. Also please show all threads' stacks (I know you said you used only one thread, but something left rt->gcRunning set, which means either another thread is in the GC, was in it and died without crashing the entire process, or a GC is nesting on this stack -- or you have an inconsistent build of some sort). /be .