BrutalDoom crashes at (seemingly) random points on GZDoom

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.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: BrutalDoom crashes at (seemingly) random points on GZDoom

Re: BrutalDoom crashes at (seemingly) random points on GZDoo

by Christsnatcher » Thu May 23, 2019 4:52 pm

Thank you very much guys, awesome support!!!

Re: BrutalDoom crashes at (seemingly) random points on GZDoo

by _mental_ » Wed May 22, 2019 8:47 am

Re: BrutalDoom crashes at (seemingly) random points on GZDoo

by Graf Zahl » Wed May 22, 2019 8:01 am

Then such a function should be added.

Re: BrutalDoom crashes at (seemingly) random points on GZDoo

by _mental_ » Wed May 22, 2019 7:57 am

OK, it's the alternative solution I mentioned, with explicit cast for TObjPtr<> instances. There is no designated member function (which is not overloaded operator) to extract a pointer.

Re: BrutalDoom crashes at (seemingly) random points on GZDoo

by Graf Zahl » Wed May 22, 2019 7:48 am

In that case a different solution is needed. The TObjPtr should never be passed to a vararg function at all, the pointer must be extracted beforehand.
And for most other places this change is totally unnecessary.

Re: BrutalDoom crashes at (seemingly) random points on GZDoo

by _mental_ » Wed May 22, 2019 7:00 am

DLevelScript::activator (that has TObjPtr<AActor*> type) does not invoke GC read barrier when it's passed to ellipsis function like ScriptUtil::Exec().
The problem was introduced with this commit with removal of internal GiveInventory() function.
Nulls are no longer assigned to condemned objects, and pointer to such destroyed actors may be passed to script functions.
Sooner or later, a read barrier will be triggered. The exact location where VM abort exception will be thrown depends on particular code path.

Here is how I propose to fix it.

Alternatively, we can cast activator to AActor* when needed to insert read barriers implicitly.
This will reduce the number of changed lines, but will make things not so obvious as well.

Re: BrutalDoom crashes at (seemingly) random points on GZDoo

by Christsnatcher » Tue May 21, 2019 5:38 pm

Hello,

thank you very much for looking into the issue I'm experiencing. Ok, I've zipped my basic GZDoom setup (gzdoom-bin-4-1-2b-x64 + audiopack v3 + BrutalDoom v21 Release build) and uploaded it to MEGA for you to check:

https://mega.nz/#!cNIF0YwA!XbmY4wkUMvNf ... rnbETVhDJM

I did not include DOOM.WAD due to obvious copyright issues, but I'm using the official "The Ultimate DOOM v1.9" .wad. I also added a basic launcher.bat solely for testing purposes as I usually run all source ports with mods via ZDL v3.2.2.3 beta.

To reproduce an exemplary crash the easiest way just run the .bat, choose E4 and "Hurt me plenty". When ingame, select the grenades and grab the shotgun right before you to make the troopers spawn. Now step back and throw a few grenades, you can be sure that the game will crash on a certain explosion, showing me the attached error messages.

If this doesn't help you and you need to investigate further, I'll try to 100% reproduce the Extermination Day armor item pickup crashing event and send you the data.

Cheers,

Christsnatcher
Attachments
Base Profile Screenshot 2019.05.22 - 01.19.26.93.7z
Error messages
(240.46 KiB) Downloaded 96 times

Re: BrutalDoom crashes at (seemingly) random points on GZDoo

by Matt » Tue May 21, 2019 11:35 am

Here's line 457 of the current GZDoom master inventory.zs, last updated March 3-4.

I'm guessing TryPickup is somehow being called with a null toucher defined, or the toucher being referred to is destroyed just before that call, but if that had been the case I would expect to see at least one reference to some ZS in BD itself.
picking up the single armor item in the little bathroom in Extermination Day when playing with BrutalDoom on GZDoom.
Would you be able to link to the exact files that you were using?

Re: BrutalDoom crashes at (seemingly) random points on GZDoo

by _mental_ » Tue May 21, 2019 8:09 am

Please describe how to reproduce this reliably. We need exact steps to be able to investigate this.

BrutalDoom crashes at (seemingly) random points on GZDoom

by Christsnatcher » Tue May 21, 2019 7:53 am

Hello guys,

I first posted about the issues I experience in the Brutal Doom topic on mod.db (https://www.moddb.com/mods/brutal-doom), but was advised to use the GZDoom forums, so here I am (https://i.gyazo.com/a67a1ef059072ac0229 ... 55dadc.png). The embedded link in my original post shows the actual error message: https://i.gyazo.com/02e85a239f353bf01f2 ... 6e73f0.jpg

This happens on all GZDoom builds from 3.7.2 if I'm not mistaken, both in x64 and x86 mode (yes, I was wrong about that in my mod.db post) and with all BrutalDoom builds up from RC7. The crashes are, as mentioned in the title, just seemingly random, as some of them (like the one I described) are 100% reproducible, e.g. picking up the single armor item in the little bathroom in Extermination Day when playing with BrutalDoom on GZDoom.

Many thanks in advance for looking into "my" issue, if you need any kind of additional data, just tell me.

Cheers!

Top