Help regarding the VM Execution Aborted problem

Need help running G/Q/ZDoom/ECWolf/Zandronum/3DGE? Did your computer break? Ask here.

Moderator: GZDoom Developers

capnbunnypaws
Posts: 9
Joined: Sun Jul 25, 2021 12:23 pm

Help regarding the VM Execution Aborted problem

Post by capnbunnypaws »

Hello,

I am posting again, because the GZDoom community has greatly helped me in resolving the issues. I have attempted to troubleshoot on my own, but to no success.

My friend and I currently have a VM Execution Aborted problem, specifically towards the aquiring of health, or something, of an actor for TPHPBARS.zc and getting a NULL value(?). We do not know how this error happens, but it has consistently happened throughout our playthroughts, at some point during HeXen's first hub. We usually just reload the map and move on, but maybe someone has a more elegant solution?

Details:
We are using LZDoom version 3.88a;
Mod used: https://drive.google.com/file/d/16mtweg ... sp=sharing
Save File: https://drive.google.com/file/d/1iv9FLP ... sp=sharing
Crash Screenshot: https://drive.google.com/file/d/1wmDHOo ... sp=sharing

User avatar
Player701
 
 
Posts: 1382
Joined: Wed May 13, 2009 3:15 am
Discord: Player701#8214
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support
Location: Russia

Re: Help regarding the VM Execution Aborted problem

Post by Player701 »

The error happens inside one of the mod's scripts, so you should probably ask the mod's author to fix it, provided that they support LZDoom in the first place. It's quite possible though that this is not related to the version of GZDoom/LZDoom being used, since using an incompatible version would have most likely resulted in the engine refusing to run the mod at all. There is also a slight chance that it might be an engine bug (especially if it appears to happen randomly) but it should probably be investigated by the mod's author(s) first, anyway.

It looks like this is the mod you're using, but it doesn't seem to be an official release - could be an unofficial patch or something; the latest official version appears to be V3A but yours is 4 (?), and I couldn't find any mentions of "woc_4.pk3" here except for this thread, which also appears to be made by you. If you know where you got it from, you could ask there. It doesn't look like the original author has been active on these forums recently, but other people who use that mod may still be able to help you, so you could try posting in the WoC thread too.

User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47961
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Help regarding the VM Execution Aborted problem

Post by Graf Zahl »

This looks like the mod calls Actor.CountInv with a null pointer as self. If that is the case it's clearly a mod bug.

capnbunnypaws
Posts: 9
Joined: Sun Jul 25, 2021 12:23 pm

Re: Help regarding the VM Execution Aborted problem

Post by capnbunnypaws »

Graf Zahl wrote:This looks like the mod calls Actor.CountInv with a null pointer as self. If that is the case it's clearly a mod bug.


Thank you for clarifying. If it is not too much to ask, could you point out potential fixes to the issue? I am still learning to ZScript and could use the guidance.

capnbunnypaws
Posts: 9
Joined: Sun Jul 25, 2021 12:23 pm

Re: Help regarding the VM Execution Aborted problem

Post by capnbunnypaws »

Player701 wrote:The error happens inside one of the mod's scripts, so you should probably ask the mod's author to fix it, provided that they support LZDoom in the first place. It's quite possible though that this is not related to the version of GZDoom/LZDoom being used, since using an incompatible version would have most likely resulted in the engine refusing to run the mod at all. There is also a slight chance that it might be an engine bug (especially if it appears to happen randomly) but it should probably be investigated by the mod's author(s) first, anyway.

It looks like this is the mod you're using, but it doesn't seem to be an official release - could be an unofficial patch or something; the latest official version appears to be V3A but yours is 4 (?), and I couldn't find any mentions of "woc_4.pk3" here except for this thread, which also appears to be made by you. If you know where you got it from, you could ask there. It doesn't look like the original author has been active on these forums recently, but other people who use that mod may still be able to help you, so you could try posting in the WoC thread too.


That is because it is a personally tweaked mod, not an Official one, as mentioned in that last post I made, and I was aware that it had an issue. I simply wished to ask the experts specifically, since I do not have the tools/knowledge to debug the error. Thank you for the guidance, though, it does help a lot. :)

User avatar
Player701
 
 
Posts: 1382
Joined: Wed May 13, 2009 3:15 am
Discord: Player701#8214
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support
Location: Russia

Re: Help regarding the VM Execution Aborted problem

Post by Player701 »

capnbunnypaws wrote:Thank you for clarifying. If it is not too much to ask, could you point out potential fixes to the issue? I am still learning to ZScript and could use the guidance.

If you're calling a method on an object, you have to make sure the object is not null, or a VM abort will happen.

E.g.

Code: Select all

if (somebody != null)
{
    return somebody.CountInv('Clip');
}

return 0; // or whatever else you want to do when your actor is null

However, it is not always that simple. Most of the time, it doesn't make sense to pass a null pointer in the first place, so you have to find out why it happened, and place a null check somewhere further up the call chain. It depends on your particular use case. Do not hesitate to ask further questions in the scripting forum especially if you can isolate the problem to a certain extent so that it will be easier to analyze.

capnbunnypaws
Posts: 9
Joined: Sun Jul 25, 2021 12:23 pm

Re: Help regarding the VM Execution Aborted problem

Post by capnbunnypaws »

Player701 wrote:
capnbunnypaws wrote:Thank you for clarifying. If it is not too much to ask, could you point out potential fixes to the issue? I am still learning to ZScript and could use the guidance.

If you're calling a method on an object, you have to make sure the object is not null, or a VM abort will happen.

E.g.

Code: Select all

if (somebody != null)
{
    return somebody.CountInv('Clip');
}

return 0; // or whatever else you want to do when your actor is null

However, it is not always that simple. Most of the time, it doesn't make sense to pass a null pointer in the first place, so you have to find out why it happened, and place a null check somewhere further up the call chain. It depends on your particular use case. Do not hesitate to ask further questions in the scripting forum especially if you can isolate the problem to a certain extent so that it will be easier to analyze.



Thank you for your help and guidance. The instructions were clear, and I will make the tweaks to the code based on your example. You have been a great help. :)

Return to “Technical Issues”