Chaosforge Forum

  • November 28, 2023, 10:11
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Pages: [1]

Author Topic: [] Got an error at AoRA when died in Hells Armory  (Read 1778 times)


  • Second Lieutenant
  • *
  • Offline Offline
  • Posts: 174
  • Lost Soul
    • View Profile

Code: [Select]
Timestamp   : 17.05.2013 22:31:01
Error level : ERROR
Message     : Lua hook OnAction caught ELuaStateException!

Call path     : beings[].OnAction
Call params   : ()
Error message : Lua error : lua\\beings.lua:1001: Object expected as parameter 1!

Timestamp   : 17.05.2013 22:31:09
Message     : Fatal exception encountered

An unhandled exception occurred at $0046E619 :
ELuaException : LuaError: beings[].OnAction -- Lua error : lua\\beings.lua:1001: Object expected as parameter 1!
  $0046E619  TDOOMLUA__ONERROR,  line 435 of src/doomlua.pas
  $004583E7  TLUASYSTEM__PROTECTEDRUNHOOK,  line 1511 of e:/Projects/fpcvalkyrie/src/vluasystem.pas
  $0049E75B  TTHING__CALLHOOK,  line 113 of src/dfthing.pas
  $004A3502  TBEING__ACTION,  line 1246 of src/dfbeing.pas
  $004A361B  TBEING__CALL,  line 1264 of src/dfbeing.pas
  $0041F64F  TDOOM__RUN,  line 378 of src/doombase.pas
  $00401CC5  main,  line 111 of src/doomrl.pas

killed by shambler, actually. That is mortem
Spoiler (click to show/hide)
Once advanced DoomRL player
Find mysterious sword Dragonslayer
Say "Best thing ever found!" and start jumping around...
But he can't get the sword from the ground


  • Programmer
  • Elder Chaos Guard
  • Captain
  • *
  • *
  • Offline Offline
  • Posts: 266
    • View Profile
Re: [] Got an error at AoRA when died in Hells Armory
« Reply #1 on: May 20, 2013, 14:30 »

Heh, that's a nasty bug, but it's fixed in repo now.  I'll explain why it's nasty.

This bug comes up when a being has an OnAction hook, the player dies, there's a nuke waiting to go off, and the hook doesn't check to see if the game is still running first.

The issue is this: The being has 2 OnAction hooks that run one after the other: The AI hook, and the Being's own hook.  Only 3 beings have such a hook defined at the being level -- Shambler, Lava Elemental, and Apostle.

If you die to one of these beings because of one of their attacks, the death occurs during the AI OnAction script.  The bug happens if you have a nuke that has yet to go off (because the nuke will explode as part of the player dying), as this will end up killing the attacking being.

Then the error: The being will attempt to run it's being-level OnAction hook, and fail because at this point it doesn't exist anymore.  Crash.

TL,DR: Your game will error out if you die to the attacks of a Shambler, Lava Elemental, or Apostle and there is an active nuke on the map.
Hell Knight Warrant Officer (  [26!/8/3/1/0]

Mancubus 2nd Lieutenant (  [22/12/3/0/0]
M:16 S:43 (126) A:17
Pages: [1]