Jump to content

Critter Bugs (Crashing)


thegreatmanagement
  • Fixed

A script about critter's behavior code for running away from enemies is causing crashes in servers; the bug also affects Woby for Walter. Many critters have caused crashes in servers, and the following logs are all non modded servers. 


  • Like 1



User Feedback


A developer has marked this issue as fixed. This means that the issue has been addressed in the current development build and will likely be in the next update.

I have the same crash.
 

Spoiler

 

[01:30:43]: [string "scripts/brains/crittersbrain.lua"]:115: bad argument #1 to 'max' (number expected, got nil)
LUA ERROR stack traceback:
=[C]:-1 in (field) max (C) <-1--1>
scripts/brains/crittersbrain.lua:115 in (upvalue) _avoidtargetfn (Lua) <87-120>
   self =
      bt = Priority - READY <READY> ()>0.00
   >Parallel - READY <READY> ()>0.00
   >   >Has Owner - SUCCESS <READY> ()>0.00
   >   >Priority - READY <READY> ()>0.00
   >   >   >Priority - READY <READY> ()>0.00
   >   >   >   >RunAway - FAILED <READY> ()>0.00
   >   >   >   >Parallel - READY <READY> ()>0.00
   >   >   >   >   >Is Near Combat - READY <READY> ()>0.00
   >   >   >   >   >FaceEntity - READY <READY> ()>0.00
   >   >   >Parallel - READY <READY> ()>0.00
   >   >   >   >Playful - READY <READY> ()>0.00
   >   >   >   >Sequence - READY <READY> ()>0.00
   >   >   >   >   >Wait - READY <READY> ()>0.00
   >   >   >   >   >Priority - READY <READY> ()>0.00
   >   >   >   >   >   >Leash - READY <READY> ()>0.00
   >   >   >   >   >   >ActionNode - READY <READY> ()>0.00
   >   >   >   >   >   >StandStill - READY <READY> ()>0.00
   >   >   >Follow - READY <READY> ()>0.00
   >   >   >FailIfRunning - READY <READY> ()>0.00
   >   >   >   >FaceEntity - READY <READY> ()>0.00
   >   >   >Parallel - READY <READY> ()>0.00
   >    [**truncated**]
      inst = 151846 - wobysmall (valid:true)
      behaviourqueue = table: 0x2c932d60
      runawayfrom = 113062 - catcoon (valid:true)
      stopped = false
      events = table: 0x2c932d88
   target = 113062 - catcoon (valid:true)
   owner = 151779 - walter (valid:true)
   owner_combat = table: 0x25f992c0
   target_combat = table: 0x249c3350
   distsq = 30.00719902711
   t = 1632.9334184974
scripts/brains/crittersbrain.lua:148 in () ? (Lua) <133-155>

   self =
      bt = Priority - READY <READY> ()>0.00
   >Parallel - READY <READY> ()>0.00
   >   >Has Owner - SUCCESS <READY> ()>0.00
   >   >Priority - READY <READY> ()>0.00
   >   >   >Priority - READY <READY> ()>0.00
   >   >   >   >RunAway - FAILED <READY> ()>0.00
   >   >   >   >Parallel - READY <READY> ()>0.00
   >   >   >   >   >Is Near Combat - READY <READY> ()>0.00
   >   >   >   >   >FaceEntity - READY <READY> ()>0.00
   >   >   >Parallel - READY <READY> ()>0.00
   >   >   >   >Playful - READY <READY> ()>0.00
   >   >   >   >Sequence - READY <READY> ()>0.00
   >   >   >   >   >Wait - READY <READY> ()>0.00
   >   >   >   >   >Priority - READY <READY> ()>0.00
   >   >   >   >   >   >Leash - READY <READY> ()>0.00
   >   >   >   >   >   >ActionNode - READY <READY> ()>0.00
   >   >   >   >   >   >StandStill - READY <READY> ()>0.00
   >   >   >Follow - READY <READY> ()>0.00
   >   >   >FailIfRunning - READY <READY> ()>0.00
   >   >   >   >FaceEntity - READY <READY> ()>0.00
   >   >   >Parallel - READY <READY> ()>0.00
   >    [**truncated**]
      inst = 151846 - wobysmall (valid:true)
      behaviourqueue = table: 0x2c932d60
      runawayfrom = 113062 - catcoon (valid:true)
      stopped = false
      events = table: 0x2c932d88
=(tail call):-1 in ()  (tail) <-1--1>
scripts/behaviourtree.lua:200 in (method) Visit (Lua) <199-205>
   self =
      lastresult = READY
      status = READY
      fn = function - scripts/brains/crittersbrain.lua:172
      parent = table: 0x163ee0c8
      name = Is Near Combat

scripts/behaviourtree.lua:643 in (method) Visit (Lua) <633-664>
   self =
      name = Parallel
      status = READY
      parent = table: 0x17027df0
      children = table: 0x163ee058
      lastresult = READY
   done = true
   any_done = false
   idx = 1
   child = table: 0x163ee080
scripts/behaviourtree.lua:578 in (method) Visit (Lua) <554-610>
   self =
      lasttime = 1632.9334184974
      name = Priority
      parent = table: 0x1ac4ed48
      status = READY
      period = 1
      children = table: 0x2bf7b218
      lastresult = READY
   time = 1632.9334184974
   do_eval = true
   oldidx = nil
   old_event = nil
   found = false
   idx = 2
   child = table: 0x163ee0c8
   should_test_anyway = nil
scripts/behaviourtree.lua:578 in (method) Visit (Lua) <554-610>
   self =
      l
[01:30:43]: [string "scripts/brains/crittersbrain.lua"]:115: bad argument #1 to 'max' (number expected, got nil)

LUA ERROR stack traceback:
    =[C]:-1 in (field) max (C) <-1--1>
    scripts/brains/crittersbrain.lua:115 in (upvalue) _avoidtargetfn (Lua) <87-120>
    scripts/brains/crittersbrain.lua:148 in () ? (Lua) <133-155>
    =(tail call):-1 in ()  (tail) <-1--1>
    scripts/behaviourtree.lua:200 in (method) Visit (Lua) <199-205>
    scripts/behaviourtree.lua:643 in (method) Visit (Lua) <633-664>
    scripts/behaviourtree.lua:578 in (method) Visit (Lua) <554-610>
    scripts/behaviourtree.lua:578 in (method) Visit (Lua) <554-610>
    scripts/behaviourtree.lua:643 in (method) Visit (Lua) <633-664>
    scripts/behaviourtree.lua:578 in (method) Visit (Lua) <554-610>
    scripts/behaviourtree.lua:22 in (method) Update (Lua) <20-27>
    scripts/brain.lua:212 in (method) OnUpdate (Lua) <205-214>
    scripts/brain.lua:135 in (method) Update (Lua) <105-147>
    scripts/update.lua:237 in () ? (Lua) <164-243>

[01:30:43]: Warning: Widget:SetFocusFromChild is happening on a widget outside of the screen/widget hierachy. This will cause focus moves to fail. Is   ScriptErrorWidget       not a screen?
[01:30:43]: stack traceback:
        scripts/widgets/widget.lua:605 in (method) SetFocusFromChild (Lua) <602-627>
        scripts/widgets/widget.lua:624 in (method) SetFocusFromChild (Lua) <602-627>
        scripts/widgets/widget.lua:624 in (method) SetFocusFromChild (Lua) <602-627>
        scripts/widgets/widget.lua:656 in (method) SetFocus (Lua) <629-665>
        scripts/widgets/menu.lua:83 in (method) SetFocus (Lua) <74-85>
        scripts/widgets/scripterrorwidget.lua:109 in (method) OnUpdate (Lua) <102-119>
        scripts/update.lua:95 in () ? (Lua) <33-134>

 

 

Share this comment


Link to comment
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...