View Full Version : Weird numbers in server select?
Trackye
09-24-2015, 12:39 PM
Suddenly my server is displaying weird numbers in server select screen like
-897823 or 2342355...
I didnt change anything to make it do this that I am aware of.
Any input? How does this happen?
AdrianD
09-24-2015, 12:44 PM
See if it goes away after you relog to the login server.
I don't think it means anything, uncertain though.
* It means something but I doubt it's important, rather.
Trackye
09-24-2015, 12:45 PM
I was wondering if it was because the server was offline on the last players online tic sent to it and then was up on the next one. Im gonna wait a few and see what happens.
Shendare
09-24-2015, 01:06 PM
Odd.
This is the number sent to the client for the number of players online on a server:
https://github.com/EQEmu/Server/blob/master/loginserver/server_manager.cpp#L260
...
data_ptr += 4;
*(uint32*)data_ptr = (*iter)->GetPlayersOnline();
data_ptr += 4;
++iter;
...
GetPlayersOnline() is a simple property read.
https://github.com/EQEmu/Server/blob/master/loginserver/world_server.h#L119
...
/**
* Gets the number of players on the server.
*/
unsigned int GetPlayersOnline() const { return players_online; }
...
It's properly zeroed out on class construction and in a Reset() method:
https://github.com/EQEmu/Server/blob/master/loginserver/world_server.cpp#L26
WorldServer::WorldServer(EmuTCPConnection *c)
{
connection = c;
zones_booted = 0;
players_online = 0;
...
https://github.com/EQEmu/Server/blob/master/loginserver/world_server.cpp#L48
void WorldServer::Reset()
{
zones_booted = 0;
players_online = 0;
status = 0;
runtime_id;
server_list_id = 0;
server_type = 0;
authorized = false;
logged_in = false;
}
It's given the number by the login server.
https://github.com/EQEmu/Server/blob/master/loginserver/world_server.cpp#L502
void WorldServer::Handle_LSStatus(ServerLSStatus_Struct *s)
{
players_online = s->num_players;
zones_booted = s->num_zones;
status = s->status;
}
The login server sends it here:
https://github.com/EQEmu/Server/blob/master/world/login_server.cpp#L301
void LoginServer::SendStatus() {
statusupdate_timer.Start();
auto pack = new ServerPacket;
pack->opcode = ServerOP_LSStatus;
pack->size = sizeof(ServerLSStatus_Struct);
pack->pBuffer = new uchar[pack->size];
memset(pack->pBuffer, 0, pack->size);
ServerLSStatus_Struct* lss = (ServerLSStatus_Struct*) pack->pBuffer;
if (WorldConfig::get()->Locked)
lss->status = -2;
else if (numzones <= 0)
lss->status = -2;
else
lss->status = numplayers;
lss->num_zones = numzones;
lss->num_players = numplayers;
SendPacket(pack);
delete pack;
}
I lost track of it at numplayers, referenced as an extern:
https://github.com/EQEmu/Server/blob/master/world/login_server.cpp#L69
...
extern ZSList zoneserver_list;
extern ClientList client_list;
extern uint32 numzones;
extern uint32 numplayers;
extern volatile bool RunLoops;
...
Stepping backwards through the pipeline so far here, I haven't seen any place where the number might be set to arbitrary values. Is it possibly a networking or RAM issue?
Trackye
09-24-2015, 01:14 PM
Right now it says -1778384896 lol.
Its very strange as it never did this before last night.
I have checked with both UF and ROF2 clients and it reports these crazy numbers on both clients.
Interestingly the server lists for EQEMU website seems to report it accurately.
Shendare
09-24-2015, 01:26 PM
Have you made any changes at all to login server or world server code?
If you open it up in Github, does it show differences from the master repo in a diff of them?
Trackye
09-24-2015, 01:27 PM
No.
I added a GMcommand but that was days ago and this issue only started happening this morning.
(The command has nothing to do with Login or world it was #finditemmodel)
EDIT
It seems to be reporting correctly now.
perhaps as I suspected it was a Players online tic or something that went wrong.
Shendare
09-24-2015, 01:30 PM
Heh. If all else fails, reboot. Glad it seems to have cleared up, at least.
Stepping through the code was fun, as always. :D
AdrianD
09-24-2015, 01:40 PM
"ForeverQuest" right?
I've logged in to the loginserver and let it refresh multiple times. I get a different number every few refreshes. The number appears to be in the range of a signed INT (mysql datatype). Maybe that could narrow it down.
demonstar55
09-24-2015, 02:07 PM
I would blame the server at login.eqemulator.net rather than EQEmu code :P
Trackye
09-24-2015, 02:21 PM
It may also have something to do with me hosting this server at my house for the meantime and the power having went out and me being issued a new IP.
I have not yet figured out how to set up the DYNDNS configuration in Eqemu's settings.
So its likely this was the culprit.
demonstar55
09-24-2015, 02:34 PM
Nope, public LS hosted on eqemulator.net is special :P
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.