id summary reporter owner description type status priority milestone component resolution keywords cc phab_field 5587 Connection not established / Segfault after nick change and hosting STUN game elexis "In alpha 23 (at least my patched copy) and SVN I get a segfault for a client trying to join a STUN lobby game after the host nickname changed. When the host cancels the game and clicks on host again, the progress dialog will remain stuck at the ""Registering with server..."" stage. It seems there is some element of undefined behavior involved, because sometimes it sems to be fail in different ways (not even the host being able to join his game) depending on how many times one tries to host in a row. {{{ 0x00007ffff682def5 in gloox::Jingle::Session::sessionInitiate(gloox::Jingle::Content const*) () from /usr/lib/libgloox.so.17 (gdb) info stack #0 0x00007ffff682def5 in gloox::Jingle::Session::sessionInitiate(gloox::Jingle::Content const*) () from /usr/lib/libgloox.so.17 #1 0x0000555555a2c8af in glooxwrapper::Jingle::Session::sessionInitiate (this=0x7fff00000000, ipStr=, port=) at ../../../source/lobby/glooxwrapper/glooxwrapper.cpp:850 #2 0x0000555555a1e533 in XmppClient::SendStunEndpointToHost (this=0x555556aca000, stunEndpoint=..., hostJIDStr=...) at ../../../source/lobby/XmppClient.cpp:1306 #3 0x0000555555a3cd35 in JSI_Network::StartNetworkJoin (pCxPrivate=0x555556af80f0, playerName=..., serverAddress=..., serverPort=20595, useSTUN=, hostJID=...) at ../../../source/network/scripting/JSInterface_Network.cpp:114 #4 0x0000555555a3e5aa in ScriptInterface_NativeWrapper::call(JSContext*, JS::MutableHandle, void (ScriptInterface::CxPrivate*, CStrW const&, CStr8 const&, unsigned short, bool, CStr8 const&), CStrW, CStr8, unsigned short, bool, CStr8) (cx=, fptr=, params=..., params=..., params=..., params=..., params=...) at ../../../source/scriptinterface/NativeWrapperDefns.h:85 #5 ScriptInterface::call (cx=cx@entry=0x555556a94740, argc=, vp=0x555555d6df58) at ../../../source/scriptinterface/NativeWrapperDefns.h:124 #6 0x00007ffff7a239e8 in js::CallJSNative (args=..., native=0x555555a3e1b0 (JSContext*, unsigned int, JS::Value*)>, cx=0x555556a94740) at ../../dist/include/js/CallArgs.h:204 #7 js::Invoke (cx=0x555556a94740, args=..., construct=) at /home/elexis/code/0ad-svn/trunk/libraries/source/spidermonkey/mozjs-45.0.2/js/src/vm/Interpreter.cpp:444 #8 0x00007ffff7a194dc in Interpret (cx=0x555556a94740, state=warning: RTTI symbol not found for class 'gloox::Jingle::Content' ...) at /home/elexis/code/0ad-svn/trunk/libraries/source/spidermonkey/mozjs-45.0.2/js/src/vm/Interpreter.cpp:2766 #9 0x00007ffff7a23657 in js::RunScript (cx=cx@entry=0x555556a94740, state=...) at /home/elexis/code/0ad-svn/trunk/libraries/source/spidermonkey/mozjs-45.0.2/js/src/vm/Interpreter.cpp:391 #10 0x00007ffff7a2391d in js::Invoke (cx=cx@entry=0x555556a94740, args=..., construct=construct@entry=js::NO_CONSTRUCT) at /home/elexis/code/0ad-svn/trunk/libraries/source/spidermonkey/mozjs-45.0.2/js/src/vm/Interpreter.cpp:462 #11 0x00007ffff7a242fc in js::Invoke (cx=cx@entry=0x555556a94740, thisv=..., fval=..., argc=2, argv=, rval=..., rval@entry=...) at /home/elexis/code/0ad-svn/trunk/libraries/source/spidermonkey/mozjs-45.0.2/js/src/vm/Interpreter.cpp:496 #12 0x00007ffff7882ebd in JS_CallFunctionName (cx=0x555556a94740, obj=..., name=, args=..., rval=...) at ../../dist/include/js/Value.h:1667 #13 0x000055555570951f in ScriptInterface::CallFunction_ (this=0x555556af80f0, val=..., name=0x555555a807db ""init"", argv=..., ret=...) at ../../../source/scriptinterface/ScriptInterface.cpp:565 #14 0x000055555595bfd4 in ScriptInterface::CallFunctionVoid, JS::Rooted > (this=0x555556af80f0, val=..., name=0x555555a807db ""init"", params=..., params=...) at ../../../source/scriptinterface/NativeWrapperDefns.h:225 #15 0x0000555555958f45 in CGUIManager::SGUIPage::LoadPage (this=0x5555574a0360, scriptRuntime=...) at ../../../source/gui/GUIManager.cpp:213 #16 0x0000555555957f99 in CGUIManager::PushPage (this=0x555555e96c80, pageName=..., initData=warning: RTTI symbol not found for class 'std::_Sp_counted_ptr' warning: RTTI symbol not found for class 'std::_Sp_counted_ptr' std::shared_ptr (use count 2, weak count 0) = {...}, callbackFunction=...) at ../../../source/gui/GUIManager.cpp:104 #17 0x0000555555998525 in JSI_GUIManager::PushGuiPage (pCxPrivate=0x555558c692f0, name=..., initData=..., callbackFunction=...) at ../../../source/gui/scripting/JSInterface_GUIManager.cpp:32 #18 0x00005555559992c0 in ScriptInterface_NativeWrapper::call, std::allocator > const&, JS::Handle, JS::Handle), std::__cxx11::basic_string, std::allocator >, JS::Handle, JS::Handle >(JSContext*, JS::MutableHandle, void (ScriptInterface::CxPrivate*, std::__cxx11::basic_string, std::allocator > const&, JS::Handle, JS::Handle), std::__cxx11::basic_string, std::allocator >, JS::Handle, JS::Handle) (cx=, fptr=, params=..., params=..., params=...) at ../../../source/scriptinterface/NativeWrapperDefns.h:85 #19 ScriptInterface::call, std::allocator >, JS::Handle, JS::Handle, &JSI_GUIManager::PushGuiPage> (cx=cx@entry=0x555558b6fda0, argc=, vp=0x555555d6ddf8) at ../../../source/scriptinterface/NativeWrapperDefns.h:124 #20 0x00007ffff7a239e8 in js::CallJSNative (args=..., native=0x555555999110 , std::allocator >, JS::Handle, JS::Handle, &JSI_GUIManager::PushGuiPage>(JSContext*, unsigned int, JS::Value*)>, cx=0x555558b6fda0) at ../../dist/include/js/CallArgs.h:204 #21 js::Invoke (cx=0x555558b6fda0, args=..., construct=) at /home/elexis/code/0ad-svn/trunk/libraries/source/spidermonkey/mozjs-45.0.2/js/src/vm/Interpreter.cpp:444 #22 0x00007ffff7a194dc in Interpret (cx=0x555558b6fda0, state=warning: RTTI symbol not found for class 'gloox::Jingle::Content' ...) at /home/elexis/code/0ad-svn/trunk/libraries/source/spidermonkey/mozjs-45.0.2/js/src/vm/Interpreter.cpp:2766 #23 0x00007ffff7a23657 in js::RunScript (cx=cx@entry=0x555558b6fda0, state=...) at /home/elexis/code/0ad-svn/trunk/libraries/source/spidermonkey/mozjs-45.0.2/js/src/vm/Interpreter.cpp:391 #24 0x00007ffff7a2391d in js::Invoke (cx=cx@entry=0x555558b6fda0, args=..., construct=construct@entry=js::NO_CONSTRUCT) at /home/elexis/code/0ad-svn/trunk/libraries/source/spidermonkey/mozjs-45.0.2/js/src/vm/Interpreter.cpp:462 #25 0x00007ffff7a242fc in js::Invoke (cx=0x555558b6fda0, thisv=..., fval=..., argc=1, argv=, rval=...) at /home/elexis/code/0ad-svn/trunk/libraries/source/spidermonkey/mozjs-45.0.2/js/src/vm/Interpreter.cpp:496 #26 0x00007ffff78824b9 in JS_CallFunctionValue (cx=, obj=..., fval=..., args=..., rval=...) at ../../dist/include/js/Value.h:1667 #27 0x000055555596dad0 in IGUIObject::ScriptEvent (this=0x555558f42f60, Action=...) at ../../../source/gui/IGUIObject.cpp:421 #28 0x000055555596c2a8 in IGUIObject::SendEvent (this=0x555558f42f60, type=, EventName=...) at ../../../source/gui/IGUIObject.cpp:391 #29 0x0000555555969c7f in IGUIButtonBehavior::HandleMessage (this=0x555558f42f20, Message=...) at ../../../source/gui/IGUIButtonBehavior.cpp:66 #30 0x00005555559807ed in virtual thunk to CButton::HandleMessage(SGUIMessage&) () at ../../../source/gui/CButton.cpp:75 #31 0x000055555596c29d in IGUIObject::SendEvent (this=0x555558f42f60, type=, EventName=...) at ../../../source/gui/IGUIObject.cpp:389 #32 0x0000555555925b2f in CGUI::HandleEvent (this=0x555558689880, ev=) at ../../../source/gui/CGUI.cpp:162 #33 0x000055555595694e in CGUIManager::HandleEvent (this=0x555555e96c80, ev=0x7fffffffe5e0) at ../../../source/gui/GUIManager.cpp:337 #34 0x0000555555956328 in gui_handler (ev=0x5555574b4670) at ../../../source/gui/GUIManager.cpp:48 #35 0x00005555559b1cc8 in in_dispatch_event (ev=0x7fffffffe5e0) at ../../../source/lib/input.cpp:62 #36 0x00005555555b1229 in PumpEvents () at ../../../source/main.cpp:227 #37 Frame () at ../../../source/main.cpp:367 #38 RunGameOrAtlas (argc=, argv=) at ../../../source/main.cpp:638 #39 0x00005555555aecd5 in main (argc=1, argv=0x7fffffffe8b8) at ../../../source/main.cpp:684 }}} It was tried with nani and Angen today in both a23 and svn, and there the issue didn't occur. Or rather it didn't segfault, but the connection wasn't established either. Messagebox kept saying ""Registering"" with a ""service unavailable"" line in chat. So from those experiments, it seems the segfault is only triggered when using two 0ad lobby accounts on the same computer, and otherwise the connection just doesn't work out." defect new Should Have Backlog Network