[User error] [g2420371c4/4.7.0]Random player actor removal?

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

[g2420371c4/4.7.0]Random player actor removal?

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

: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: Select allExpand view
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. :?
User avatar
Xane123
Magical Mary Developer
 
Joined: 24 Nov 2015
Location: Inwood, WV
Discord: Xane123#3770
Github ID: Xane123
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia (Modern GZDoom)

Re: [g2420371c4/4.7.0]Random player actor removal?

Postby Marisa Kirisame » Fri Oct 22, 2021 11:51 am

Code: Select allExpand view
      Walk3_Left:
         MRY2 NOPQRSTU 2
         MRY2 F 4
         Stop
      Walk3_Right:
         MRY2 FGHIJKLM 2
         MRY2 N 4
         Stop

Don't do this. If you do this in player states, you're effectively setting up the playerpawn to delete itself.
User avatar
Marisa Kirisame
ZScript Crimester
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: 霧雨魔理沙#1666
Twitch ID: MarisaDOOM
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: [g2420371c4/4.7.0]Random player actor removal?

Postby Xane123 » Sat Oct 23, 2021 2:14 pm

:shock: Wow, I feel so stupid right now! Yep, that would cause the player to be removed; The footstep script prevented it, but staying in the air allowed the "Stop" to execute...

This makes perfect sense; I'll fix this. Thanks, Marisa. :oops:
User avatar
Xane123
Magical Mary Developer
 
Joined: 24 Nov 2015
Location: Inwood, WV
Discord: Xane123#3770
Github ID: Xane123
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia (Modern GZDoom)


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests