Closed yl-whosit closed 7 months ago
(our internal ref 6502)
Where can I see that?
So you have cases where hud_add
actually fails?
Had a couple of crashes like this:
ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod '' in callback item_OnPlace(): ../mods/rhotator/notify.lua:120: bad argument #1 to 'hud_get' (number expected, got nil)
ERROR[Main]: stack traceback:
ERROR[Main]: [C]: in function 'hud_get'
ERROR[Main]: ../mods/rhotator/notify.lua:120: in function 'notify'
ERROR[Main]: ../mods/rhotator/init.lua:690: in function 'copy_rotation_callback'
ERROR[Main]: ../mods/rhotator/init.lua:485: in function 'func'
ERROR[Main]: ../builtin/profiler/instrumentation.lua:108: in function 'callback'
ERROR[Main]: ../builtin/game/item.lua:285: in function 'on_place'
ERROR[Main]: ../mods/replacer/replacer.lua:214: in function 'replace_single_node'
ERROR[Main]: ../mods/replacer/replacer.lua:307: in function <../mods/replacer/replacer.lua:252>
As I understand it, some other bugged mod can be creating too many huds and not removing them...
(our internal ref 6502)
Where can I see that?
Since replacer crashed twice and we didn't have other mods crashing like this, I'm starting to suspect it may be the replacer code somehow, but I don't see it...
Thanks, I'll look into it. Can't hurt to include code that doesn't crash even in a very unlikely event.
If you do figure out how to replicate it, I'd be grateful to be notified, for testing reasons.
Wait, did I mix up rhotator and replacer?
Now I'm confused. [replacer] has no HUD! I was thinking of [postool]
Ok, so both crashes are from rhotator
... and I was looking at the right code, I just filed it to a wrong repo...
Sorry. :/
(trying to fix bugs without enough sleep is unproductive...)
it's OK. Made me check [postool] and found that it doesn't check against nil everywhere.
According to the API:
(our internal ref 6502)