Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TF2 Crashes on Plugin Load #505

Open
waldotf opened this issue Feb 20, 2025 · 0 comments
Open

TF2 Crashes on Plugin Load #505

waldotf opened this issue Feb 20, 2025 · 0 comments

Comments

@waldotf
Copy link

waldotf commented Feb 20, 2025

Same timing as #504, but probably needs a separate fix. Source.Python fully loads, but segfaults immediately on loading my plugin.

Looks like the plugin interrogating the STV user is breaking something, similar to the condition crashing Sourcemod (alliedmodders/sourcemod#2264). Running under gdb, I get this stack trace (truncated the Python calls):

GDB stack trace
#0  0xf62d73aa in CBaseServer::UserInfoChanged(int) () from target:/srv/srcds/bin/engine_srv.so
#1  0xf627f052 in CBaseClient::SetName(char const*) () from target:/srv/srcds/bin/engine_srv.so
#2  0xf627c946 in CBaseClient::Connect(char const*, int, INetChannel*, bool, int) () from target:/srv/srcds/bin/engine_srv.so
#3  0xf62c45a3 in CGameClient::Connect(char const*, int, INetChannel*, bool, int) () from target:/srv/srcds/bin/engine_srv.so
#4  0xf62d88df in CBaseServer::CreateFakeClient(char const*) () from target:/srv/srcds/bin/engine_srv.so
#5  0xf62bb7b1 in CVEngineServer::CreateFakeClientEx(char const*, bool) () from target:/srv/srcds/bin/engine_srv.so
#6  0xecd5d6b7 in boost::python::objects::caller_py_function_impl<boost::python::detail::caller<int (IVEngineServer::*)() const, boost::python::default_call_policies, boost::mpl::vector2<int, IVEngineServer&> > >::operator()(_object*, _object*) () from target:/srv/srcds/tf/addons/source-python/bin/core.so
#7  0xed12a998 in boost::python::objects::function::call(_object*, _object*) const () from target:/srv/srcds/tf/addons/source-python/bin/core.so
#8  0xed12aba5 in boost::detail::function::void_function_ref_invoker0<boost::python::objects::(anonymous namespace)::bind_return, void>::invoke(boost::detail::function::function_buffer&) ()
   from target:/srv/srcds/tf/addons/source-python/bin/core.so
#9  0xed133cfa in boost::python::handle_exception_impl(boost::function0<void>) () from target:/srv/srcds/tf/addons/source-python/bin/core.so
#10 0xed1295e2 in function_call () from target:/srv/srcds/tf/addons/source-python/bin/core.so
#11 0xed6b0046 in PyObject_Call (func=0xcd7bd10, args=args@entry=0xe75eb94c, kwargs=kwargs@entry=0x0) at Objects/abstract.c:2246
#12 0xed6ccffb in property_descr_get (self=0xee21e7d4, obj=0xee226224, type=0xee2181fc) at Objects/descrobject.c:1384
#13 0xed70e50f in _PyObject_GenericGetAttrWithDict (obj=obj@entry=0xee226224, name=name@entry=0xee21e7a0, dict=dict@entry=0x0) at Objects/object.c:1060
#14 0xed70e73b in PyObject_GenericGetAttr (obj=0xee226224, name=0xee21e7a0) at Objects/object.c:1121
#15 0xed70de85 in PyObject_GetAttr (v=v@entry=0xee226224, name=0xee21e7a0) at Objects/object.c:891
#16 0xed79d566 in _PyEval_EvalFrameDefault (f=0xe7f5edac, throwflag=0) at Python/ceval.c:2821
#17 0xed799cbc in PyEval_EvalFrameEx (f=f@entry=0xe7f5edac, throwflag=throwflag@entry=0) at Python/ceval.c:718
#18 0xed79a683 in _PyEval_EvalCodeWithName (_co=_co@entry=0xe9216cd8, globals=globals@entry=0xe921a48c, locals=locals@entry=0xec7f3504, args=args@entry=0x0, argcount=argcount@entry=0,
    kwnames=kwnames@entry=0x0, kwargs=kwargs@entry=0x4, kwcount=kwcount@entry=0, kwstep=kwstep@entry=2, defs=defs@entry=0x0, defcount=defcount@entry=0, kwdefs=kwdefs@entry=0x0,
    closure=closure@entry=0x0, name=name@entry=0x0, qualname=qualname@entry=0x0) at Python/ceval.c:4128
#19 0xed79ad56 in PyEval_EvalCodeEx (_co=0xe9216cd8, globals=0xe921a48c, locals=locals@entry=0xec7f3504, args=args@entry=0x0, argcount=argcount@entry=0, kws=kws@entry=0x0, kwcount=kwcount@entry=0,
    defs=defs@entry=0x0, defcount=defcount@entry=0, kwdefs=kwdefs@entry=0x0, closure=0x0) at Python/ceval.c:4149
#20 0xed796722 in builtin___build_class__ (self=0xee32257c, args=0xe757f22c, kwds=0x0) at Python/bltinmodule.c:170
#21 0xed70b087 in _PyCFunction_FastCallDict (func_obj=func_obj@entry=0xee322644, args=args@entry=0xec99676c, nargs=nargs@entry=2, kwargs=kwargs@entry=0x0) at Objects/methodobject.c:231
#22 0xed70b34c in _PyCFunction_FastCallKeywords (func=func@entry=0xee322644, stack=stack@entry=0xec99676c, nargs=2, kwnames=kwnames@entry=0x0) at Objects/methodobject.c:295
#23 0xed79aafc in call_function (pp_stack=pp_stack@entry=0xffeaea1c, oparg=oparg@entry=2, kwnames=kwnames@entry=0x0) at Python/ceval.c:4798
#24 0xed79e9e3 in _PyEval_EvalFrameDefault (f=0xec99662c, throwflag=0) at Python/ceval.c:3284
#25 0xed799cbc in PyEval_EvalFrameEx (f=f@entry=0xec99662c, throwflag=throwflag@entry=0) at Python/ceval.c:718
#26 0xed79a683 in _PyEval_EvalCodeWithName (_co=_co@entry=0xe9216de0, globals=globals@entry=0xe921a48c, locals=locals@entry=0xe921a48c, args=args@entry=0x0, argcount=argcount@entry=0,
    kwnames=kwnames@entry=0x0, kwargs=kwargs@entry=0x4, kwcount=kwcount@entry=0, kwstep=kwstep@entry=2, defs=defs@entry=0x0, defcount=defcount@entry=0, kwdefs=kwdefs@entry=0x0,
    closure=closure@entry=0x0, name=name@entry=0x0, qualname=qualname@entry=0x0) at Python/ceval.c:4128
#27 0xed79ad56 in PyEval_EvalCodeEx (_co=_co@entry=0xe9216de0, globals=globals@entry=0xe921a48c, locals=locals@entry=0xe921a48c, args=args@entry=0x0, argcount=argcount@entry=0, kws=kws@entry=0x0,
    kwcount=kwcount@entry=0, defs=defs@entry=0x0, defcount=defcount@entry=0, kwdefs=kwdefs@entry=0x0, closure=closure@entry=0x0) at Python/ceval.c:4149
#28 0xed79adcb in PyEval_EvalCode (co=co@entry=0xe9216de0, globals=globals@entry=0xe921a48c, locals=locals@entry=0xe921a48c) at Python/ceval.c:695
#29 0xed797cbe in builtin_exec_impl (module=0xee32257c, locals=0xe921a48c, globals=0xe921a48c, source=0xe9216de0) at Python/bltinmodule.c:974
#30 builtin_exec (module=0xee32257c, args=0xe9918a2c) at Python/clinic/bltinmodule.c.h:281
#31 0xed70b1e5 in PyCFunction_Call (func=func@entry=0xee322a7c, args=args@entry=0xe9918a2c, kwds=kwds@entry=0xec806fcc) at Objects/methodobject.c:114
#32 0xed7a1949 in do_call_core (kwdict=0xec806fcc, callargs=0xe9918a2c, func=0xee322a7c) at Python/ceval.c:5063
#33 _PyEval_EvalFrameDefault (f=0xecaa062c, throwflag=0) at Python/ceval.c:3366
#34 0xed799cbc in PyEval_EvalFrameEx (f=f@entry=0xecaa062c, throwflag=throwflag@entry=0) at Python/ceval.c:718
#35 0xed79a683 in _PyEval_EvalCodeWithName (_co=_co@entry=0xee32f9c0, globals=globals@entry=0xee2c71bc, locals=locals@entry=0x0, args=args@entry=0xe9933880, argcount=argcount@entry=3,
    kwnames=kwnames@entry=0x0, kwargs=kwargs@entry=0xe993388c, kwcount=kwcount@entry=0, kwstep=kwstep@entry=1, defs=defs@entry=0x0, defcount=defcount@entry=0, kwdefs=kwdefs@entry=0x0,
    closure=closure@entry=0x0, name=name@entry=0xee30d800, qualname=qualname@entry=0xee30d800) at Python/ceval.c:4128
#36 0xed79a9db in fast_function (kwnames=0x0, nargs=3, stack=<optimized out>, func=0xee30becc) at Python/ceval.c:4939
#37 call_function (pp_stack=pp_stack@entry=0xffeaee6c, oparg=oparg@entry=3, kwnames=kwnames@entry=0x0) at Python/ceval.c:4819
#38 0xed79e9e3 in _PyEval_EvalFrameDefault (f=0xe9933734, throwflag=0) at Python/ceval.c:3284
#39 0xed799cbc in PyEval_EvalFrameEx (f=f@entry=0xe9933734, throwflag=throwflag@entry=0) at Python/ceval.c:718
#40 0xed799d7d in _PyFunction_FastCall (co=<optimized out>, args=<optimized out>, nargs=2, globals=0xee2c8f04) at Python/ceval.c:4880
...

Attempting to rebuild against the updated hl2sdk (alliedmodders/hl2sdk@ebd971b) runs into a bunch of missing typedefs -- looks like some more patching is needed. Not surprising since they're incorporating the shiny new tf2 2013 SDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant