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

Server crashes with dummies and sv_max_clients 8 #1735

Closed
Dune-jr opened this issue Nov 27, 2018 · 8 comments
Closed

Server crashes with dummies and sv_max_clients 8 #1735

Dune-jr opened this issue Nov 27, 2018 · 8 comments

Comments

@Dune-jr
Copy link
Member

Dune-jr commented Nov 27, 2018

Not sure if that's normal. When I set dummies, even after changing sv_max_clients to a higher value in rcon, I get this segfault:

(gdb) bt
#0  0x000000000045b6a0 in dbg_break () at src/base/system.c:82
#1  0x000000000045b694 in dbg_assert_imp (filename=0x46d770 "src/engine/shared/network_server.cpp", 
    line=281, test=0, msg=0x46d756 "errornous client id") at src/base/system.c:76
#2  0x000000000043d207 in CNetServer::Send (this=0x7ffff6e609e8, pChunk=0x7fffffffcdb0, 
    Token=4294967295) at src/engine/shared/network_server.cpp:281
#3  0x00000000004151c5 in CServer::SendMsg (this=0x7ffff6c1a010, pMsg=0x7fffffffce30, Flags=1, 
    ClientID=10) at src/engine/server/server.cpp:519
#4  0x000000000042ee0a in IServer::SendPackMsg<CNetMsg_Sv_WeaponPickup> (this=0x7ffff6c1a010, 
    pMsg=0x7fffffffd670, Flags=1, ClientID=10) at src/engine/server.h:44
#5  0x0000000000427e70 in CGameContext::SendWeaponPickup (this=0x6f4eb0, ClientID=10, Weapon=3)
    at src/game/server/gamecontext.cpp:263

where the dummy ID is 12 and the MaxClients() returns 8.

@nheir
Copy link
Contributor

nheir commented Nov 27, 2018

sv_max_clients is set once at start, the server has to shutdown to use another value

@LordSk
Copy link
Member

LordSk commented Nov 27, 2018

Dummy IDs count down from MAX_CLIENTS, so that's not surprising.

@Dune-jr
Copy link
Member Author

Dune-jr commented Nov 27, 2018

Should dummies be fixed to countdown from sv_max_clients then?

@nheir
Copy link
Contributor

nheir commented Nov 27, 2018

to MaxClient() i guess

@oy
Copy link
Member

oy commented Nov 27, 2018

No, count nthem down from max_clients would change their id.
It's a debug feature for testing - dunno if sth should be done here. Don't change sv_max_clients and don't join more clients than sv_max_clients-dbg_dummies.

@Dune-jr
Copy link
Member Author

Dune-jr commented Nov 27, 2018

Only calling in a couple of dummies with 7 free player slots created a dummy of ID 12. I mean, even without changing sv_max_clients, it feels unnecessarily bugged.

But it's not very important, after all, sv_max_clients 16 fixes it.

@nheir
Copy link
Contributor

nheir commented Nov 27, 2018

No, count nthem down from max_clients would change their id.

The issue is that dummies don't work if sv_max_clients is not set to 16.

OnClientConnected(MAX_CLIENTS-i-1, true);

Afaik, MaxClients() is a constant fixed to the initial sv_max_clients since it returns the number of possible network clients.

It's a debug feature for testing - dunno if sth should be done here.

Making dummies IA ? :p

@oy
Copy link
Member

oy commented Nov 27, 2018

Yeah, could change it to MaxClients() then.

@oy oy closed this as completed in 499653c Nov 27, 2018
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

4 participants