wiremod / wire

Garry's Mod add-on that allows users to wire up components in order to make more elaborate automatic and user-controlled contraptions.
http://www.wiremod.com
Apache License 2.0
549 stars 332 forks source link

addons/wiremod/lua/entities/gmod_wire_rt_screen.lua:202: assertion failed! #2263

Closed Aws0mee closed 2 years ago

Aws0mee commented 2 years ago

Hello I have no context whatsoever but this error was being spammed when you look in a certain direction in my server

[wiremod] addons/wiremod/lua/entities/gmod_wire_rt_screen.lua:202: assertion failed!
  1. assert - [C]:-1
   2. DrawScreen - addons/wiremod/lua/entities/gmod_wire_rt_screen.lua:202
    3. unknown - addons/wiremod/lua/entities/gmod_wire_rt_screen.lua:281 (x435)
Vurv78 commented 2 years ago

@stepa2 ?

Not sure how these work so just mentioning you for the time being since you added them

Divran commented 2 years ago

Yeah I saw this earlier but didn't have time to reply at the time. Pretty sure I could fix it myself if I took a look at it, but I'm definitely gonna give @stepa2 some time to respond first.

Generally assert should not be used at all outside of unit tests. The assert should probably simply be an if statement instead, so that if the check fails, it does nothing rather than throw an error.