Help regarding the VM Execution BEEFCAFE pointer
Moderator: GZDoom Developers
Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Help regarding the VM Execution BEEFCAFE pointer
Hello,
I am a new user of the forum, so forgive any newbie mistakes. I did not know where to post the issue either, since it seems somewhat weird...
Me and my friend have recently been enjoying HeXen coop using Thetis's Wrath of Cronos mod. We enjoyed it so much, that I've learned enough ZScript to edit the mod to the point of creating new mobs and adding a new additional class. To put it shortly, somewhere in the middle of the next "hub", the Seven Portals, the skills of my new class cease working, usually replaced with the default string of "Passive" or "Not learned yet". And it' is weird, because they have worked for hours, with the mob generating Director on, flawlessly, then suddenly break, resulting in a VM Execution error pointing to 00000000BEEFCAFE whenever any of us attempt to change levels, even the console command.
I was wondering if anyone had any clue regarding where to look at, because I have double-tripple checked the new class, all the monsters, and nothing to my knowledge out of place... If anyone is actually interested, I would happily provide the .PK3, crashlog or save file(though it's meant for 2 players).
I do know that the issue is revolving around the new class and potentially something that "breaks" the skill cycle, but don't know what...
I am a new user of the forum, so forgive any newbie mistakes. I did not know where to post the issue either, since it seems somewhat weird...
Me and my friend have recently been enjoying HeXen coop using Thetis's Wrath of Cronos mod. We enjoyed it so much, that I've learned enough ZScript to edit the mod to the point of creating new mobs and adding a new additional class. To put it shortly, somewhere in the middle of the next "hub", the Seven Portals, the skills of my new class cease working, usually replaced with the default string of "Passive" or "Not learned yet". And it' is weird, because they have worked for hours, with the mob generating Director on, flawlessly, then suddenly break, resulting in a VM Execution error pointing to 00000000BEEFCAFE whenever any of us attempt to change levels, even the console command.
I was wondering if anyone had any clue regarding where to look at, because I have double-tripple checked the new class, all the monsters, and nothing to my knowledge out of place... If anyone is actually interested, I would happily provide the .PK3, crashlog or save file(though it's meant for 2 players).
I do know that the issue is revolving around the new class and potentially something that "breaks" the skill cycle, but don't know what...
Re: Help regarding the VM Execution BEEFCAFE pointer
Please post everything you have.
Re: Help regarding the VM Execution BEEFCAFE pointer
I don't know the mod and I haven't dabbled in ZScript, so I can't provide any precise insight. But 0xBEEFCAFE looks like a debug value, so it seems you're accessing data that was freed. If that happens when changing level, it must mean that the data it tries to access is level data that was cleaned out.
-
- Posts: 9
- Joined: Sun Jul 25, 2021 12:23 pm
Help regarding the VM Execution BEEFCAFE pointer
Hello,
I am a new user of the forum, so forgive any newbie mistakes. I did not know where to post the issue either, since it seems somewhat weird...
Me and my friend have recently been enjoying HeXen coop using Thetis's Wrath of Cronos mod. We enjoyed it so much, that I've learned enough ZScript to edit the mod to the point of creating new mobs and adding a new additional class. To put it shortly, somewhere in the middle of the next "hub", the Seven Portals, the skills of my new class cease working, usually replaced with the default string of "Passive" or "Not learned yet". And it' is weird, because they have worked for hours, with the mob generating Director on, flawlessly, then suddenly break, resulting in a VM Execution error pointing to 00000000BEEFCAFE whenever any of us attempt to change levels, even the console command.
I was wondering if anyone had any clue regarding where to look at, because I have double-tripple checked the new class, all the monsters, and nothing to my knowledge out of place... If anyone is actually interested, I would happily provide the .PK3, crashlog or save file(though it's meant for 2 players).
I do know that the issue is revolving around the new class and potentially something that "breaks" the skill cycle, but don't know what...
Edit: We are using LZDoom version 3.88a, the latest official.
(Posting again because I forgot to log in last time. I apologize)
I am a new user of the forum, so forgive any newbie mistakes. I did not know where to post the issue either, since it seems somewhat weird...
Me and my friend have recently been enjoying HeXen coop using Thetis's Wrath of Cronos mod. We enjoyed it so much, that I've learned enough ZScript to edit the mod to the point of creating new mobs and adding a new additional class. To put it shortly, somewhere in the middle of the next "hub", the Seven Portals, the skills of my new class cease working, usually replaced with the default string of "Passive" or "Not learned yet". And it' is weird, because they have worked for hours, with the mob generating Director on, flawlessly, then suddenly break, resulting in a VM Execution error pointing to 00000000BEEFCAFE whenever any of us attempt to change levels, even the console command.
I was wondering if anyone had any clue regarding where to look at, because I have double-tripple checked the new class, all the monsters, and nothing to my knowledge out of place... If anyone is actually interested, I would happily provide the .PK3, crashlog or save file(though it's meant for 2 players).
I do know that the issue is revolving around the new class and potentially something that "breaks" the skill cycle, but don't know what...
Edit: We are using LZDoom version 3.88a, the latest official.
(Posting again because I forgot to log in last time. I apologize)
-
- Posts: 9
- Joined: Sun Jul 25, 2021 12:23 pm
Re: Help regarding the VM Execution BEEFCAFE pointer
Save file https://drive.google.com/file/d/1Y2CbK9 ... sp=sharing_mental_ wrote:Please post everything you have.
Mod https://drive.google.com/file/d/1zBgKTO ... sp=sharing
Crash report https://drive.google.com/file/d/1Lg1LG0 ... sp=sharing
I hope this helps.
Re: Help regarding the VM Execution BEEFCAFE pointer
Spoiler: Callstack of the crashPresence of DCorpsePointer makes me think that it's the same corpse queue crash, just for the old codebase. Most likely, a WriteBarrier is missing somewhere.
-
- Posts: 9
- Joined: Sun Jul 25, 2021 12:23 pm
Re: Help regarding the VM Execution BEEFCAFE pointer
Sorry for the silly question, but where do I find the exact line on LZDoom 3.88a? I understood the fix in question, but fail to find the location while browsing the lzdoom.pk3. Unless I am looking in the wrong location?_mental_ wrote:Spoiler: Callstack of the crashPresence of DCorpsePointer makes me think that it's the same corpse queue crash, just for the old codebase. Most likely, a WriteBarrier is missing somewhere.
- drfrag
- Vintage GZDoom Developer
- Posts: 3141
- Joined: Fri Apr 23, 2004 3:51 am
- Location: Spain
- Contact:
Re: Help regarding the VM Execution BEEFCAFE pointer
I don't think it's the same crash, with your sample script it didn't crash and the implementation of the corpse queue is the old one.
But how do i reproduce the crash? Have you loaded the savegame? I cannot load it with the command line "-file woc_4.pk3 -loadgame ZdoomedBros1.zds" it says that it cannot find it.
But how do i reproduce the crash? Have you loaded the savegame? I cannot load it with the command line "-file woc_4.pk3 -loadgame ZdoomedBros1.zds" it says that it cannot find it.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49073
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Help regarding the VM Execution BEEFCAFE pointer
That would be in the C++ source, not in script code.
As a first test, I'd suggest you remove the A_QueueCorpse call from NewDisciplePlayer and BaseDisciplePlayer. This function is meant for monster corpses and may cause some issues with dead players.
As a first test, I'd suggest you remove the A_QueueCorpse call from NewDisciplePlayer and BaseDisciplePlayer. This function is meant for monster corpses and may cause some issues with dead players.
Re: Help regarding the VM Execution BEEFCAFE pointer
Did you do all the steps needed to trigger overflow of corpse queue during GC propagation? Even if so, this doesn't mean that the old implementation is bug-free.drfrag wrote:I don't think it's the same crash, with your sample script it didn't crash and the implementation of the corpse queue is the old one.
It's based on garbage collected objects and a linked list (own stat thinkers), so the error could be pretty much anywhere.
I reconstructed the callstack from the provided crash dump. Debugging it with coop saved game is out of scope for me.drfrag wrote:But how do i reproduce the crash? Have you loaded the savegame?
-
- Posts: 9
- Joined: Sun Jul 25, 2021 12:23 pm
Re: Help regarding the VM Execution BEEFCAFE pointer
I am not certain about the loadgame, but we have. The loadgame worked, we could move, do actions, kill all monsters/baddies with the console, but the moment we entered a portal, or used the changemap command, it instantly crashed with the aforementioned error. I have no idea why the loadgame does not work, I did add it all as it were in the folder. Perhaps it being a two player multiplayer has something to do with it?drfrag wrote:I don't think it's the same crash, with your sample script it didn't crash and the implementation of the corpse queue is the old one.
But how do i reproduce the crash? Have you loaded the savegame? I cannot load it with the command line "-file woc_4.pk3 -loadgame ZdoomedBros1.zds" it says that it cannot find it.
We will currently be testing Graf Zahl's solution, which was removing the A_QueueCorpse from the player definitions. I will deliberately kill my player at the beginning of the hub and we will see if we can complete it without issues.
- drfrag
- Vintage GZDoom Developer
- Posts: 3141
- Joined: Fri Apr 23, 2004 3:51 am
- Location: Spain
- Contact:
Re: Help regarding the VM Execution BEEFCAFE pointer
It's loaded from the command line but not from the debugger, seems the file is in use by VS itself but i get the error "savegame is from a different level".
From Vs the internal my_wstat64 function returns -1 since GetFileAttributesExW fails.
From Vs the internal my_wstat64 function returns -1 since GetFileAttributesExW fails.
- drfrag
- Vintage GZDoom Developer
- Posts: 3141
- Joined: Fri Apr 23, 2004 3:51 am
- Location: Spain
- Contact:
Re: Help regarding the VM Execution BEEFCAFE pointer
Okay wrong working directory, about the different level is that becouse they were using hexen 1.0 instead of 1.1? I guess that's the case.
I did and i already had checked that bug in the past._mental_ wrote:id you do all the steps needed to trigger overflow of corpse queue during GC propagation?
Re: Help regarding the VM Execution BEEFCAFE pointer
The bug isn't the same as the mentioned one in the modern codebase. However, it's still about double freeing of an object.
I suspect, the problem is in addition of a pointer to more than one thinker lists, STAT_PLAYER and STAT_CORPSEPOINTER.
This explains why changing a level is needed in order to reproduce the crash.
I suspect, the problem is in addition of a pointer to more than one thinker lists, STAT_PLAYER and STAT_CORPSEPOINTER.
This explains why changing a level is needed in order to reproduce the crash.
-
- Posts: 9
- Joined: Sun Jul 25, 2021 12:23 pm
Re: Help regarding the VM Execution BEEFCAFE pointer
We have tried your solution, and it seems to have worked. The player I was using did not leave a corpse as before, and did not trigger an error thoughout our playthrough. So that seems to be solved, the error was that I copypasted the Disciple monster's code, without considering it as a player, leaving it to queue up a corpse as a monster.Graf Zahl wrote:That would be in the C++ source, not in script code.
As a first test, I'd suggest you remove the A_QueueCorpse call from NewDisciplePlayer and BaseDisciplePlayer. This function is meant for monster corpses and may cause some issues with dead players.
However, there is still the issue of the skills suddenly ceasing functioning. I cannot provide anything to reproduce the error, but I could try describing the conditions, since this isn't a case of a crash, rather than something changing states bizzarely. The issue occurred consistently at the end of the Seven Portals, after pressing the three levers needed to open the exit. The skills I had on my player character were mainly CallCleric, CallFighter, CallMage. For the vast part of the game, they worked as intended: if nothing exists, summon; if it exists, ThingMove; if double clicked, remove. However, after passing said stage, the skills would either show a "Passive" text or a "Not Learned" text, without any idea why.
It isn't the original issue, but maybe you could enlighten us regarding a potential cause? We would be very grateful.