Random crash in softpoly

Bugs that have been investigated and resolved somehow.

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.
dpJudas
 
 
Posts: 3036
Joined: Sat May 28, 2016 1:01 pm

Re: Random crash in softpoly

Post by dpJudas »

No matter how you slice it, an access violation for mMaterial.mMaterial->tex->shaderspeed can only be explained by two things: 1) access a pointer after deletion, 2) massive memory buffer overruns that messed up the pointer.

In any case, I'm in favor of waiting doing anything about it until graf's new branch gets merged in. There's no point in trying to do a workaround if the changes Graf did may have solved by the problem already, which it very well might. And even if it didn't, you'd have to do the fix twice then.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3141
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: Random crash in softpoly

Post by drfrag »

Yep seems that's the best course of action.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Random crash in softpoly

Post by Graf Zahl »

Can you test this on the texture rework branch?
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3141
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: Random crash in softpoly

Post by drfrag »

Done, seems it's gone now.
BTW what is the HAVE_SOFTPOLY option on linux for? AFAIK it's the minimal compile unit and it runs on software so it's always available, precisely i have a HAVE_OPENGL option to compile only with softpoly.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Random crash in softpoly

Post by Graf Zahl »

I need that to get the code into Raze and have it 100% identical with GZDoom. For the transition I must ensure that I can compile both engines off the exact same backend code base. Once the transition is complete the #define can be removed again
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3141
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: Random crash in softpoly

Post by drfrag »

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

Re: Random crash in softpoly

Post by Graf Zahl »

I just had a crash with this code on my rework branch. But it wasn't mMaterial.mMaterial.tex that was bogus, but mMaterial.mMaterial itself.
On KDiZD Z1M1 I can reproduce it with almost 100% certainty after the initial wipe.
From the looks of it it tries to access the invalid material from the wipe texture. The problem looks to be PolyRenderState::Clear, being called from Set3DViewport which for unknown reason calls 'Apply'. But right after the wipe that's plain and simply an undefined operation because the currently set texture is no longer valid.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3141
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: Random crash in softpoly

Post by drfrag »

I've just tried with the iwads for now, 10 launches in a row and now another 10.
What about reverting the old "fix"?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Random crash in softpoly

Post by Graf Zahl »

I had no crashes with the IWADs, I had crashes with KDiZD. The IWADs do not seem to trigger the condition that causes the problem.
User avatar
Rachael
Posts: 13530
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Random crash in softpoly

Post by Rachael »

drfrag wrote:What about reverting the old "fix"?
Short of prettying the code, the fix does not affect anything whatsoever and reverting it will not fix your problem.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3141
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: Random crash in softpoly

Post by drfrag »

Just asking. It's not my problem but our problem.
No crash here with KDIZD 1.2 and g4.4pre-381-g70d30feb4. RelWithDebInfo v141 64 bit. But actually there's another crash if i exit the selection box without launching the game.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3141
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: Random crash in softpoly

Post by drfrag »

Seems it's gone after the texture refactor.
Post Reply

Return to “Closed Bugs [GZDoom]”