by Xane123 » Thu Oct 21, 2021 11:04 pm

Apologies for the vague title and possibly bad bug report here, but this strange bug has recently started happening in my TC and it's stopping me from developing it, so here's the bug report:
I was playing around with my TC (Magical Mary), jumping around the house's roof in the second level (lv1_p2). When I jumped from the upper roof to a lower one, the console suddenly appeared, saying:
Code: Select all
VM execution aborted: tried to read from address zero. In function parameter "self"
Called from Actor.TakeInventory at gzdoom.pk3:zscript/actors/inventory_util.zs, line 142
Called from ScriptUtil.TakeInventory at gzdoom.pk3:zscript/scriptutil/scriptutil.zs, line 80
Called from Actor.FindInventory [Native]
That might look like a TakeInventory error, but it isn't. I messed with the TC's files and when it crashed again, I saw "Tried to render from a NULL actor.". This makes me believe GZDoom is removing the player actor from the game completely; I think the TakeInventory error appears because one of the ACS script is taking items from the player, but since the actor is now null, it can't take the item and shows that error. In fact, modifying the player actor's DECORATE with a "Stop" command to remove them causes the exact same errors to appear!
Download
this archive (~84MB), extract it, then run the demo files in GZDoom to see the multiple ways I've got this bug to happen. (It's Magical Mary but with most assets removed to lower filesize.)
I do not know why GZDoom is removing the player object/actor when moving in specific ways around the roof in that map, but I do know that if you comment out "PLAYERS" in BaseGamePack1.ipk3/
loadacs.txt file (disabling all of those ACS scripts), this bug stops happening, but then my TC doesn't function correctly without those scripts active.
I've searched for this error, and have read bug reports on this forum, and I've seen developers usually reply with potential fixes; If this problem is caused by my TC, please let me know how I can fix it.

:oops: Apologies for the vague title and possibly bad bug report here, but this strange bug has recently started happening in my TC and it's stopping me from developing it, so here's the bug report:
I was playing around with my TC (Magical Mary), jumping around the house's roof in the second level (lv1_p2). When I jumped from the upper roof to a lower one, the console suddenly appeared, saying:
[code]VM execution aborted: tried to read from address zero. In function parameter "self"
Called from Actor.TakeInventory at gzdoom.pk3:zscript/actors/inventory_util.zs, line 142
Called from ScriptUtil.TakeInventory at gzdoom.pk3:zscript/scriptutil/scriptutil.zs, line 80
Called from Actor.FindInventory [Native][/code]
That might look like a TakeInventory error, but it isn't. I messed with the TC's files and when it crashed again, I saw "Tried to render from a NULL actor.". This makes me believe GZDoom is removing the player actor from the game completely; I think the TakeInventory error appears because one of the ACS script is taking items from the player, but since the actor is now null, it can't take the item and shows that error. In fact, modifying the player actor's DECORATE with a "Stop" command to remove them causes the exact same errors to appear!
Download [url=https://www.dropbox.com/s/icqtivxha3kk63p/GZDoom_StrangeBehavior.7z?dl=0]this archive[/url] (~84MB), extract it, then run the demo files in GZDoom to see the multiple ways I've got this bug to happen. (It's Magical Mary but with most assets removed to lower filesize.)
I do not know why GZDoom is removing the player object/actor when moving in specific ways around the roof in that map, but I do know that if you comment out "PLAYERS" in BaseGamePack1.ipk3/[b]loadacs.txt[/b] file (disabling all of those ACS scripts), this bug stops happening, but then my TC doesn't function correctly without those scripts active.
I've searched for this error, and have read bug reports on this forum, and I've seen developers usually reply with potential fixes; If this problem is caused by my TC, please let me know how I can fix it. :?