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

CMapLayers::OnRender client crash #3182

Open
ChillerDragon opened this issue Nov 13, 2022 · 1 comment · May be fixed by #2931
Open

CMapLayers::OnRender client crash #3182

ChillerDragon opened this issue Nov 13, 2022 · 1 comment · May be fixed by #2931

Comments

@ChillerDragon
Copy link
Contributor

I currently mess with re-implementing the server. And it is full of bugs. One of those causes the client to crash.

I can reproduce consistently so if someone needs more info let me know either here or on irc.

[2022-11-13 08:12:59][client]: connecting to '127.0.0.1:8303'
[2022-11-13 08:12:59][connection]: got token, replying, token=5b6c576 mytoken=2d75a94a
[2022-11-13 08:12:59][client]: connected, sending info

Thread 1 "teeworlds" received signal SIGSEGV, Segmentation fault.
0x00005555555c3aa9 in CMapLayers::OnRender (this=0x55555586e680 <gs_MapLayersBackGround>)
    at /home/chiller/Desktop/git/teeworlds/src/game/client/components/maplayers.cpp:273
273                     if(!Config()->m_GfxNoclip && pGroup->m_Version >= 2 && pGroup->m_UseClipping)
(gdb) bt
#0  0x00005555555c3aa9 in CMapLayers::OnRender (this=0x55555586e680 <gs_MapLayersBackGround>) at /home/chiller/Desktop/git/teeworlds/src/game/client/components/maplayers.cpp:273
#1  0x0000555555622e89 in CGameClient::OnRender (this=0x55555593f950) at /home/chiller/Desktop/git/teeworlds/src/game/client/gameclient.cpp:614
#2  0x0000555555570e25 in CClient::Render (this=0x7ffff706f010) at /home/chiller/Desktop/git/teeworlds/src/engine/client/client.cpp:797
#3  0x0000555555576a76 in CClient::Run (this=0x7ffff706f010) at /home/chiller/Desktop/git/teeworlds/src/engine/client/client.cpp:2133
#4  0x0000555555578c67 in main (argc=2, argv=0x7fffffffca58) at /home/chiller/Desktop/git/teeworlds/src/engine/client/client.cpp:2710
(gdb) print pGroup 
$1 = (CMapItemGroup *) 0x0
@ChillerDragon
Copy link
Contributor Author

I hotfixed it for me using

CMapItemGroup *pGroup = pLayers->GetGroup(g);
if(!pGroup)
  continue;

In here

CMapItemGroup *pGroup = pLayers->GetGroup(g);

ChillerDragon added a commit to ChillerDragon/teeworlds_network that referenced this issue Nov 13, 2022
Sadly reconnecting somehow crashes the client :(

teeworlds/teeworlds#3182
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant