Random crash in softpoly
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.
Re: Random crash in softpoly
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.
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.
- drfrag
- Vintage GZDoom Developer
- Posts: 3141
- Joined: Fri Apr 23, 2004 3:51 am
- Location: Spain
- Contact:
Re: Random crash in softpoly
Yep seems that's the best course of action.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49066
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Random crash in softpoly
Can you test this on the texture rework branch?
- drfrag
- Vintage GZDoom Developer
- Posts: 3141
- Joined: Fri Apr 23, 2004 3:51 am
- Location: Spain
- Contact:
Re: Random crash in softpoly
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.
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.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49066
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Random crash in softpoly
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
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49066
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Random crash in softpoly
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.
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.
- drfrag
- Vintage GZDoom Developer
- Posts: 3141
- Joined: Fri Apr 23, 2004 3:51 am
- Location: Spain
- Contact:
Re: Random crash in softpoly
I've just tried with the iwads for now, 10 launches in a row and now another 10.
What about reverting the old "fix"?
What about reverting the old "fix"?
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49066
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Random crash in softpoly
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.
Re: Random crash in softpoly
Short of prettying the code, the fix does not affect anything whatsoever and reverting it will not fix your problem.drfrag wrote:What about reverting the old "fix"?
- drfrag
- Vintage GZDoom Developer
- Posts: 3141
- Joined: Fri Apr 23, 2004 3:51 am
- Location: Spain
- Contact:
Re: Random crash in softpoly
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.
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.
- drfrag
- Vintage GZDoom Developer
- Posts: 3141
- Joined: Fri Apr 23, 2004 3:51 am
- Location: Spain
- Contact:
Re: Random crash in softpoly
Seems it's gone after the texture refactor.