CoD4x_Server icon indicating copy to clipboard operation
CoD4x_Server copied to clipboard

Broken playername / score

Open AlexanderCurl opened this issue 7 years ago • 10 comments

Okay since @IceNinjaman said if I spot this again, need to investigate this issue. So, yesterday I spotted a player without name and -37243284632874632 score (1st. pic). I checked on console there was a zombi client connected on the server.

The last 2 pics is a guy who using some cyrillic chars in his name I guess.

Pics: https://imgur.com/a/jmdeW

AlexanderCurl avatar May 29 '17 11:05 AlexanderCurl

Oh I forgot, @IceNinjaman said, he checked with HLSW as well, on there looks good.

AlexanderCurl avatar May 30 '17 11:05 AlexanderCurl

There was no errors like this in vanilla game so it must be something on server side.

T-Maxxx avatar May 30 '17 12:05 T-Maxxx

guess we will keep that in the back of our heads. doesn't seem critical to me. let us know when anyones able to reproduce errors like that. the title is extremely undescriptive, i've changed it.

D4edalus avatar Aug 04 '17 08:08 D4edalus

I bet it's because UTF-8 characters use more than one byte in ASCII representation, so some things relying on strings with fixed size are getting unexpected input and this unintended behaviour..

cyberplant avatar Aug 04 '17 08:08 cyberplant

yeah i had that thought too. its probably a playername coming from steam as utf8. dont know the encoding on the server of playernames, but i guess its just ascii. it could be that writing the name coming from steam to the respective string on the server causes a little bufferoverflow. (utf8 stringlength vs ascii stringlength)

D4edalus avatar Aug 04 '17 08:08 D4edalus

UTF-8 can be supported in the future?

AlexanderCurl avatar Sep 22 '17 11:09 AlexanderCurl

I don't think so. There are a lot of places where we will have to use 2 instead of 1 for string length.

T-Maxxx avatar Sep 23 '17 05:09 T-Maxxx

Ok I leave it open, because sometimes I still spot a weird playername and activity.

AlexanderCurl avatar Sep 23 '17 07:09 AlexanderCurl

UTF-8 should be supported in what way? the server should not have a problem with it because strings are just zero terminated. it might render some garbage on the console, but who cares really. same on the client. But the topic of this issue is rather to fix the caused errornous behaviour you described in your initial post, we don't even know if that's caused by utf8 texts, that's just speculation. However, if you can create a reproducable error scenario we can start fixing it.

D4edalus avatar Sep 23 '17 08:09 D4edalus

Still happends from time to time, if you reconnect it will fix it, if you check clients with rcon they are all mostly good but client names get messed up sometimes, people take different peoples name or they dont have a name at all, and its kinda client sided because a reconnect will fix this mostly, doesnt happend to everyone and its not common really. After disabling steam names I dont think I've noticed this issue so far.

kristiandz avatar Mar 04 '19 19:03 kristiandz