[BUG] Client crash if a textdraw is shown to a player on spawn

Started by ., Apr 07, 2016, 10:54 PM

Previous topic - Next topic

.

Description
Again. The client crashes if a textdraw is shown to a player on spawn

Reproducible
Always

What you were doing when the bug happened
This started as a joke on IRC (log bellow). Eventually reaching to the sweet spot that causes this behavior.

What you think caused the bug
I couldn't possibly know that.



Take the following example code:
local str = "";

for (local n = 0; n < 8; ++n)
{
    str += " YOU NO 60 FPS! ";
}

function onServerStart()
{
    text <- CreateTextdraw(str, 16, 16, 0x00FF00FF);
}

function onPlayerSpawn(player)
{
    text.ShowForPlayer(player);
}

Place it into a simple script file -> Load it as the gamemode -> Start the server -> Connect to the server -> Try to spawn. Your client should crash.



IRC log. Irrelevant but was promised in description.
01:14:48 <Murdock> autokick low fps!
01:15:08 <Kirollos> wow
01:15:13 <Kirollos> you want to autokick all pakis?
01:15:32 <Murdock> if plr.FPS != 60 then plr.Kick
01:15:41 <Kirollos> wow
01:15:41 <Murdock> how?
01:15:43 <Kirollos> !=
01:14:20 <SLC> you slipped there Murdock :P
01:14:32 <SLC> if you have 61 fps. you get kicked :P
01:16:17 <Kirollos> ikr D:
01:16:48 <Murdock> nono my script are fine u always angry SLC dont judge me just working script give me
01:15:43 * SLC puts hand in his pocket and prepares to pull something out...
01:16:04 <SLC> SUPRISE! it's an empty hand
01:16:22 <SLC> out of scripts
01:18:09 <Kirollos> surprise mafaka
01:17:43 <SLC> you know what'll be funny? if the player has FPS < 60.
create a string with repeated "YOU NO 60 FPS!" and draw it in the middle of the screen
01:18:08 <SLC> enough to occupy most of the screen
01:20:09 <Murdock> that would be a nice suggestion for the extremewhiteycity server
01:18:48 <SLC> that will cause the FPS to got even lower and eventually make him leave
01:20:45 <Murdock> now stormeus will have to hadd textdraw.Scale
01:20:51 <Murdock> -h
01:20:06 <SLC> hmm, let's see how many characters can there be in a textdraw :D
01:22:50 <Murdock> hmm, let's see if i can grab any snack around me
01:22:48 <SLC> making it a bright green
01:28:21 <SLC> hmm, doesn't show it
01:30:42 <SLC> Murdock, guess what XD
01:32:35 <Murdock> ?
01:30:59 <SLC> I just found a new way to crash the client XD
01:31:33 <SLC> gonna try it on the official plugin to see if it does the same
01:37:24 <SLC> lol, it even steals the mouse and you need to close it by keyboard XD
01:38:08 <SLC> I'm gonna send you a piece of code to confirm it's not just me
.

EK.IceFlake

Maybe it was refreshing some stuff on onplayerspawn and trying to erase the textrdraw while the server was trying to create it making an infinite loop

.

Quote from: NE.CrystalBlue on Apr 08, 2016, 09:08 AMMaybe it was refreshing some stuff on onplayerspawn and trying to erase the textrdraw while the server was trying to create it making an infinite loop

There's no point in speculating here. Since we have no idea what happens behind the scene. And this is a crash. What does that have to do with an infinite loop?

In situations like these you simply give enough information for the developers to reproduce the crash that you're getting and leave it to them to fix it (if possible).
.