Cherry/3D2D-Textscreens

Text screen error

Jango2225 opened this issue · 31 comments

[ERROR] addons/3d2d_textscreens_109643223/lua/entities/sammyservers_textscreen/cl_init.lua:37: bad argument #1 to 'GetTextSize' (string expected, got nil)

  1. GetTextSize - [C]:-1
  2. Draw - addons/3d2d_textscreens_109643223/lua/entities/sammyservers_textscreen/cl_init.lua:37
    3. unknown - addons/3d2d_textscreens_109643223/lua/entities/sammyservers_textscreen/cl_init.lua:70

Please fix this

It looks like you have a textscreen with some bad data. I'm not quite sure how that could have occurred, but I've added some more resilience to bad data in 903d293.

Please try the latest version, now in the workshop.

What if it doesn't work?

If it doesn't work, I'll need you to provide me with updated error logs, and if possible, a way to replicate the issue. A copy of your sammyservers_textscreens.txt, the name of the map it's occurring on, etc. would also help.

I purposefully garbled my data to trigger an error similar to yours, so hopefully my most recent update resolves it. Thanks for helping debug the issue.

lol, the whole script doesn't check for correct tool convars on the serverside, so of course there will be people fucking everything.

If you feel there are any improvements that can be made, I'd love a pull request @mcNuggets1.

I told you, I hate creating pull requests, cmon.
Just answering because I am subscribed to this comments for some reason.

You just have to clamp the values on the server and make sure the color values are INTEGERS, not strings, the TEXT is a string and not NIL, the size is between 1 and 100 and not INF.

That's not much, cmon. :(

The Error shown
`[ERROR] addons/3d2d_textscreens_109643223/lua/entities/sammyservers_textscreen/cl_init.lua:129: bad argument #1 to 'GetTextSize' (string expected, got nil)

  1. GetTextSize - [C]:-1
  2. AddDrawingInfo - addons/3d2d_textscreens_109643223/lua/entities/sammyservers_textscreen/cl_init.lua:129
    3. func - addons/3d2d_textscreens_109643223/lua/entities/sammyservers_textscreen/cl_init.lua:171
    4. unknown - lua/includes/extensions/net.lua:32
    `
    We do not use the default save, we use perma-prop to save text screens.

And we are on rp_venator_dc_v2 (That's the workshop name too)

This isn't even an exploit, he is just using permaprops which isn't setting the lines correctly, wow.

Done it that way for 3-4 years with 8-9 different servers.. Never had that issue before..

The error says you, there is no string specified for the textscreen to use.

So is this issue a result of chromium update?

Issue doesn't happen unless the chromium update is selected, however.. There is little to no change to the game to cause an issue as you are stating..

I have the same issue with chromium being the median to my issues. However, I am using the default save function.

I've never thought to test on the chromium branch, only ever public and dev. It sounds like something changed behind-the-scenes in this branch, but I can't find a public changelog anywhere :/

I'll do my best to take a look at the weekend.

What if you can't fix it?

Thank you sir.

Any update Cherry..?

@Jango2225 No. I won't have time to look at this until Saturday or Sunday unfortunately, sorry. All I can recommend in the meantime is not using the chromium branch until I can diagnose the issue.

Understood..

@dedisystems @Jango2225 I just tried replicating the issue using the chromium branch and can't seem to get the error to occur.

I've added yet another detection for bad textscreen data in 903d293, but I'm going to need a sure-fire way to reproduce the error in order to be able to to debug this any further.

@Cherry Permaprop it instead of saving

@Cherry Any luck?

I unfortunately have very little time to debug during the week @Jango2225. I'll take another look as soon as I can.

I just tried to replicate this issue with PermaProps from https://steamcommunity.com/sharedfiles/filedetails/?id=220336312, and am still unable to do so.

To debug this further, I'm going to need some more information:

  • Does this occur if you reset your PermaProps data (delete sv.db) and re-create them?
  • Does this occur on all maps? Any specific map?
  • What specific textscreen settings can I use to reproduce the issue? Colours, text, sizes, fonts, etc.
  • Please provide any up-to-date errors you may be seeing.

Any color any size, and idk about deleting the file, haven’t tried it we use the basic font, I forget which one it is

Please follow my previous instructions so I can debug this further. I am not able to currently replicate the issue.

@Cherry We've done all that the text screens can be any color, red, blue whatever and the size doesn't matter, we cannot delete the sv.db file as it'll delete all our jobs, and permaprops. it occurs on all maps. The text we use is Coolvetica Outlined.

@Jango2225 I've been trying to replicate the issue and still can not. I really need to you to do some debugging so I can try and resolve this for you.

  • Make a copy of your server and try deleting the sv.db and re-creating the textscreens. Does the issue still occur?
  • If so, please explicitly list every step you've taken, including any errors, so I can replicate what you're describing.

I need specific steps to replicate the issue from a fresh, clean environment.

@Cherry For some reason I can now see the text screens in Chromium, I don't know how

Thanks for the update. I'll go ahead and close this issue - feel free to reply with more information if the issue comes back and I'll investigate further.