Subj : JS_HandleTrap unhandled exception To : netscape.public.mozilla.jseng From : Mike Moening Date : Thu Mar 31 2005 03:14 pm The jsdbgapi.c file crashed. The trap->handler was set to NULL. I'm not exactly sure how it happened but its possible that another thread removed the trap during execution...I don't know. Would it be possible to check for null before calling the handler? /* * It's important that we not use 'trap->' after calling the callback -- * the callback might remove the trap! */ op = (jsint)trap->op; status = trap->handler(cx, script, pc, rval, trap->closure); <---- Crash happened here... Could it be changed to this: if(trap->handler) status = trap->handler(cx, script, pc, rval, trap->closure); <---- Crash happened here... Otherwise how do I avoid a problem like this? Thanks! .