[Fixed] VM execution aborted : tried to read from address zero

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

VM execution aborted : tried to read from address zero

Postby David Blackford » Fri May 10, 2019 9:34 am

Hi helpers and developers!

I have been working on my first doom mod and have maybe broken something with it running on GZDoom. However I don't know how to track this problem down, since my coding knowledge is very limited.

Error message:
https://i.imgur.com/aAtvTrZ.png

I've tried it with GZDoom 3.7, GZDoom 4.0 and GZDoom 4.1.1 and all return the same error message. This seems to happen at random and mostly will happen when there is a lot going on at once.

And this is my, probably horribly coded, mod that is most likely the perpetrator causing it. Any help on tracking where it is originating from would be much appreciated.
Doom Exp - @moddb
Last edited by David Blackford on Fri May 10, 2019 10:40 am, edited 1 time in total.
Reason: made links clickable
David Blackford
 

Re: VM execution aborted : tried to read from address zero

Postby Zhs2 » Fri May 10, 2019 6:21 pm

Without looking into your mod, this error reads as if you're trying to give an item to either a null pointer or an actor that doesn't exist anymore.
User avatar
Zhs2
Power of three.
 
Joined: 07 Nov 2008
Location: Maryland, USA, but probably also in someone's mod somewhere

Re: VM execution aborted : tried to read from address zero

Postby _mental_ » Sat May 11, 2019 3:24 am

In this mod ScriptUtil.GiveInventory() seems be called only by ACS scripts. I don't think it's possible to track this issue without adding some console.printf() to the core scripts.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: VM execution aborted : tried to read from address zero

Postby Officer D » Sat May 11, 2019 8:28 am

No clue why my thread was opened under a different name. :?

So you saying the only way to get a log tracking the error would be by converting all the ACS scripts to zscript?
User avatar
Officer D
 
Joined: 10 May 2019
Location: Germany
Discord: 411794575716515851
Twitch ID: officer_d82
Operating System: Windows Vista/7 64-bit
Graphics Processor: nVidia (Modern GZDoom)

Re: VM execution aborted : tried to read from address zero

Postby wildweasel » Sat May 11, 2019 9:45 am

Officer D wrote:No clue why my thread was opened under a different name. :?

You were probably not logged in when you posted.
Officer D wrote:So you saying the only way to get a log tracking the error would be by converting all the ACS scripts to zscript?

Not necessarily - try adding some Print or Log statements into your script to make sure that all your vars, etc. are what they're supposed to be.
User avatar
wildweasel
「お前はもうトースト」[you are already toast.]
Moderator Team Lead
 
Joined: 15 Jul 2003

Re: VM execution aborted : tried to read from address zero

Postby Officer D » Sat May 11, 2019 12:13 pm

Stupid question. Could it have been caused by having certain functions, in the monster statements without brackets set? For example, I copied some functions from the decorates over to zscript and had stuff like A_ClearTarget and A_Pain without the brackets. I added them with bracket, e.g. A_Pain(); and played for a few hours without encountering the error message. Maybe I just got lucky by not getting another crash. But if anybody could confirm that actually was the problem, I would be very relieved and we could mark the thread as solved.

Edit:
Okay, that didn't seem to solve the problem. I just managed to get the error message again. However it happened on a slaughter map as tons of monsters died at once. They are all setup to give the player inventory dummies upon death. I guess there is a limit for ACS scripts to be called at once that give the player inventory items?
User avatar
Officer D
 
Joined: 10 May 2019
Location: Germany
Discord: 411794575716515851
Twitch ID: officer_d82
Operating System: Windows Vista/7 64-bit
Graphics Processor: nVidia (Modern GZDoom)

Re: VM execution aborted : tried to read from address zero

Postby _mental_ » Sun May 12, 2019 8:54 am

Like it was already said, if you really want investigate this yourself, you should add some debug output to the core scripts near location of VM abort.
Also, try to save often during playing. Probably, it will be much faster to reproduce the problem from a saved game.

There is another option that may help developers. Record a demo until the issue happens and attach to this topic.
To do so, use recordmap console command. The following command will save demo to mydemo.lmp file.
Code: Select allExpand view
recordmap mydemo map01
_mental_
 
 
 
Joined: 07 Aug 2011

Re: VM execution aborted : tried to read from address zero

Postby Officer D » Mon May 13, 2019 8:03 am

Okay, thank you for the suggestions. If I figure out what the problem was, I'll be sure to get back to this thread.
User avatar
Officer D
 
Joined: 10 May 2019
Location: Germany
Discord: 411794575716515851
Twitch ID: officer_d82
Operating System: Windows Vista/7 64-bit
Graphics Processor: nVidia (Modern GZDoom)

Re: VM execution aborted : tried to read from address zero

Postby _mental_ » Sat May 25, 2019 9:54 am

Most likely, it's the same issue as this one.
_mental_
 
 
 
Joined: 07 Aug 2011


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests