Forum

> > CS2D > General > Userstats bug
Forums overviewCS2D overviewGeneral overviewLog in to reply

English Userstats bug

9 replies
To the start Previous 1 Next To the start

old Userstats bug

Banaan
User Off Offline

Quote
In the userstats.dat file, generated by the server, there are occasionally some really strange entries where the USGN is immensely large:

1
\rHTc\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0

The first four bytes (\rHTc) represent the USGN ID, and in this case they translate to ID #1666467853, which is, as far as I know, not an existing USGN ID. The entries before and after this one are normal.

As far as I have seen, the rest of the data is always null when this happens.

This isn't a major problem of course, but it kinda screwed my table layout here: file cs2d StatsDecoder

old Re: Userstats bug

boyzinthewoodz
User Off Offline

Quote
lol once when i logged in, into usgn i looked at my friendlist and suddenly i had a friend with some usgn ID like this: #1666467853
name of this usgn wasnt there also i just had him as friend and i thougt all the others got deleted.
anyway it happens just 1 time per week and the problem is solved after a restart of cs2d
edited 1×, last 01.10.11 02:05:51 am

old Re: Userstats bug

Starkkz
Moderator Off Offline

Quote
wouldn't that be a reason of server crashing?, because if the CS2D tries to read 4 bytes and they return null.

old Re: Userstats bug

DC
Admin Off Offline

Quote
huh... I don't know how this happens. the read/write routines are pretty simple and don't allow much room for errors.. hmmm
are you 100% sure that you are reading it correctly? the nick comes in front of the USGN ID and it's a string with a variable length so something could go wrong there...

but @ starkkz: no, the stats loading routine has been secured some releases ago. it automatically stops reading when the stats file is incomplete. it does not crash the server.

old Re: Userstats bug

Banaan
User Off Offline

Quote
Yes, I'm absolutely sure. I just read the rest of the line as the name, then strip the newline. The USGN is then simple the next four bytes.

In manual mode (just reading the file by myself; newline is easy to spot) I get the exact same result.

old Re: Userstats bug

DC
Admin Off Offline

Quote
pretty strange. can you send/upload such a uerstats file?

old Re: Userstats bug

DC
Admin Off Offline

Quote
i'll see if I can find a reason for that.. but it looks quite bad at the moment. very f*cked up..

old Re: Userstats bug

Banaan
User Off Offline

Quote
1
2
[21:15:02] cF*//Red Dragon//~M is using IP 123.123.123.12:58885 and U.S.G.N. ID #1313161540
[21:15:02] U.S.G.N.: cF*//Red Dragon//~M is NOT using U.S.G.N. ID #1313161540!

I guess that's what's causing it.
This happened a few times, spread out over a month.

old Re: Userstats bug

DC
Admin Off Offline

Quote
in this case the bug should be fixed with the previous dedicated server patch which introduced the USGN verification before joining (as long as this feature is enabled - which is the default setting).

of course this does not fix existing wrong entires in the stats file!
To the start Previous 1 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview