Subj : Re: JS_InitClass segfaults in my JS/Python bridge To : netscape.public.mozilla.jseng From : jjl@pobox.com (John J. Lee) Date : Fri Aug 01 2003 04:30 pm jjl@pobox.com (John J. Lee) writes: [...] > segfault or illegal instruction inside JS_InitClass. In fact, I get [...] Not sure this is much help, but here's a traceback (not sure what that ?? is, either): (gdb) bt #0 0x081f7598 in ?? () #1 0x4040da5a in JS_InitClass (cx=0x81d6248, obj=0x81f6b40, parent_proto=0x81f6b40, clasp=0x8202500, constructor=0x403dc0f8 <__pyx_f_12spidermonkey_constructor_stub>, nargs=0, ps=0x0, fs=0x0, static_ps=0x0, static_fs=0x0) at jsapi.c:1828 #2 0x403da65b in __pyx_f_12spidermonkey_5Class___new__ (__pyx_v_self=0x40398644, __pyx_args=0x4022fb44, __pyx_kwds=0x0) at spidermonkey.c:645 #3 0x403dc499 in __pyx_tp_new_Class (t=0x403de8e0, a=0x4022fb44, k=0x0) at spidermonkey.c:1066 #4 0x08080d56 in type_call (type=0x403de8e0, args=0x4022fb44, kwds=0x0) at Objects/typeobject.c:414 #5 0x0805a37c in PyObject_Call (func=0x403de8e0, arg=0x4022fb44, kw=0x0) at Objects/abstract.c:1755 #6 0x080a372f in PyEval_CallObjectWithKeywords (func=0x403de8e0, arg=0x4022fb44, kw=0x0) at Python/ceval.c:3346 #7 0x0805a3da in PyObject_CallObject (o=0x403de8e0, a=0x4022fb44) at Objects/abstract.c:1746 #8 0x403d9f89 in __pyx_f_12spidermonkey_7Context_bind_class (__pyx_v_self=0x4039839c, __pyx_args=0x401d772c, __pyx_kwds=0x0) at spidermonkey.c:509 #9 0x080e082c in PyCFunction_Call (func=0x403969ec, arg=0x401d772c, kw=0x0) at Objects/methodobject.c:77 #10 0x080a385b in call_function (pp_stack=0xbffff26c, oparg=1) at Python/ceval.c:3439 #11 0x080a1f66 in eval_frame (f=0x8194a94) at Python/ceval.c:2116 #12 0x080a51ff in fast_function (func=0x4039f10c, pp_stack=0xbffff38c, n=1, na=1, nk=0) at Python/ceval.c:3518 #13 0x080a38e1 in call_function (pp_stack=0xbffff38c, oparg=1) at Python/ceval.c:3458 #14 0x080a1f66 in eval_frame (f=0x81500ac) at Python/ceval.c:2116 #15 0x080a2e52 in PyEval_EvalCodeEx (co=0x401cc820, globals=0x401d435c, locals=0x0, args=0x81532a4, argcount=2, kws=0x81532ac, kwcount=0, defs=0x4037dc58, defcount=2, closure=0x0) at Python/ceval.c:2663 #16 0x080a525c in fast_function (func=0x4039f25c, pp_stack=0xbffff51c, n=2, na=2, nk=0) at Python/ceval.c:3529 #17 0x080a38e1 in call_function (pp_stack=0xbffff51c, oparg=2) at Python/ceval.c:3458 #18 0x080a1f66 in eval_frame (f=0x815314c) at Python/ceval.c:2116 #19 0x080a51ff in fast_function (func=0x4039f0d4, pp_stack=0xbffff63c, n=0, na=0, nk=0) at Python/ceval.c:3518 #20 0x080a38e1 in call_function (pp_stack=0xbffff63c, oparg=0) at Python/ceval.c:3458 #21 0x080a1f66 in eval_frame (f=0x816a0b4) at Python/ceval.c:2116 #22 0x080a2e52 in PyEval_EvalCodeEx (co=0x401be360, globals=0x4019079c, locals=0x4019079c, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2663 #23 0x080a5109 in PyEval_EvalCode (co=0x401be360, globals=0x4019079c, locals=0x4019079c) at Python/ceval.c:537 #24 0x080c1843 in run_node (n=0x40179350, filename=0xbffffa0f "domtest.py", globals=0x4019079c, locals=0x4019079c, flags=0xbffff848) at Python/pythonrun.c:1205 #25 0x080c17fe in run_err_node (n=0x40179350, filename=0xbffffa0f "domtest.py", globals=0x4019079c, locals=0x4019079c, flags=0xbffff848) at Python/pythonrun.c:1192 #26 0x080c1440 in PyRun_FileExFlags (fp=0x811f748, filename=0xbffffa0f "domtest.py", start=257, globals=0x4019079c, locals=0x4019079c, closeit=1, flags=0xbffff848) at Python/pythonrun.c:1183 #27 0x080c0022 in PyRun_SimpleFileExFlags (fp=0x811f748, filename=0xbffffa0f "domtest.py", closeit=1, flags=0xbffff848) at Python/pythonrun.c:802 #28 0x080c0fbc in PyRun_AnyFileExFlags (fp=0x811f748, filename=0xbffffa0f "domtest.py", closeit=1, flags=0xbffff848) at Python/pythonrun.c:599 #29 0x08054ecb in Py_Main (argc=3, argv=0xbffff8d4) at Modules/main.c:415 #30 0x080547e4 in main (argc=3, argv=0xbffff8d4) at Modules/python.c:23 (gdb) John .