Jump to content

Two unlikely crashes


godsno
  • Pending

These two crashes sometimes appear in my server log.

1. SGwilson.lua   line 2203: assert(false, "Left death state.") .  What caused it?

2. SGklaus.lua   line 316: inst.brain.stopped. 


Steps to Reproduce

Shut down(may be it crashed) and run the dedicated server,but it crashed (brain a nil value). This is the log.

 

2021-05-17-10-44-57-Master.txt




User Feedback


1 hour ago, Nettalie said:

It seems you are using this mod, which appears to be causing the issue.
Steam Workshop::Myth characters-神话人物 (steamcommunity.com)

So you will likely need to disable this mod in order to not run into this bug.

He is correct there can be mods that can't go together, or require another mod to run. *They will have the required mods on the mods workshop page.* if I recall you need the Mythworlds mods in order to run the characters, and vise versa.

Share this comment


Link to comment
Share on other sites

I think it is also very likely to be a crash caused by the module. These two errors are too difficult to appear.I try to fix these two bugs.But I don't know if this will work.

Source code:

2200        onexit = function(inst)
2201           --You should never leave this state once you enter it!
2202            if inst.components.revivablecorpse == nil then
2203                assert(false, "Left death state.")
2204            end
2205        end,

My code:

onexit = function(inst)
  --You should never leave this state once you enter it!
  if inst.components.revivablecorpse == nil then
    -- assert(false, "Left death state.")                  don't use assert
    -- go to death state again
	print("Left death state.")
    if inst.components.health and not inst.components.health:IsDead() then 
      print("Kill again")
      inst.components.health:Kill()
    end
  end
end,

---------------------------------------------------------

Source code:

313            TimeEvent(3, function(inst)
314                if not inst:IsUnchained() then
315                    inst.sg.statemem.resurrecting = true
316			  if inst.brain.stopped then
317			     inst.brain:Start()
318			  end
319                    inst.sg:GoToState("resurrect")
320                end
321            end),

My code:

TimeEvent(3, function(inst)
    if not inst:IsUnchained() then
      inst.sg.statemem.resurrecting = true
      if inst.brain and inst.brain.stopped then  -- add inst.brain
        inst.brain:Start()
      end
      inst.sg:GoToState("resurrect")
    end
  end),

 

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...