[r3105] Sin City instant crash

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.
Post Reply
User avatar
Jimmy
 
 
Posts: 4726
Joined: Mon Apr 10, 2006 1:49 pm
Preferred Pronouns: He/Him
Contact:

[r3105] Sin City instant crash

Post by Jimmy »

ZDoom now instantly bombs out when loading up MAP01 of Sin City by Ed Cripps. I get no crash log, just a "ZDoom has stopped working" Windows error.

I've noticed that Ed mentions something about a skybox crash on the WAD's /idgames page, which may have recently become more prominent. Setting r_skyboxes to FALSE doesn't fix this, however.

EDIT: Oh bugger - just realized that this crash in fact only happens when running the WAD with Omega. :oops:
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: [r3105] Sin City instant crash

Post by Gez »

Works with r3089. Works for me with GZDoom r1175 (based on r3105).

Compiling ZDoom r3105 to see if I get the crash.


Compiled, works for me.
User avatar
Jimmy
 
 
Posts: 4726
Joined: Mon Apr 10, 2006 1:49 pm
Preferred Pronouns: He/Him
Contact:

Re: [r3105] Sin City instant crash

Post by Jimmy »

With Omega as well? :shock:
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: [r3105] Sin City instant crash

Post by Gez »

I didn't see your edit, so no, I haven't tested with Omega. I don't think I have it handy, either.
User avatar
Jimmy
 
 
Posts: 4726
Joined: Mon Apr 10, 2006 1:49 pm
Preferred Pronouns: He/Him
Contact:

Re: [r3105] Sin City instant crash

Post by Jimmy »

I've made a couple small changes since the last official release, so here it is:
j-omega.wad
(245.06 KiB) Downloaded 31 times
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: [r3105] Sin City instant crash

Post by Gez »

Interesting, the crash happens here:

Code: Select all

        case PCD_CHECKWEAPON:
            if (activator == NULL || activator->player == NULL || // Non-players do not have weapons
                activator->player->ReadyWeapon == NULL)
            {
                STACK(1) = 0;
            }
            else
            {
                STACK(1) = 0 == stricmp (FBehavior::StaticLookupString (STACK(1)),
->                    activator->player->ReadyWeapon->GetClass()->TypeName.GetChars());
            }
            break;
User avatar
Jimmy
 
 
Posts: 4726
Joined: Mon Apr 10, 2006 1:49 pm
Preferred Pronouns: He/Him
Contact:

Re: [r3105] Sin City instant crash

Post by Jimmy »

So... it's something to do with starting weapons? I'm sorry, I'm not familiar with the source code at all. :?

Possibly unrelated, but in this build, the NoWeapon1-4 weapons that the player starts out with in Omega have their class name printed to the screen rather than their Tag, which is empty (""). Probably a deliberate change - but one that can still be easily addressed on my end.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: [r3105] Sin City instant crash

Post by Gez »

It's something to do with ACS.

Tags default to the class name when empty, so it's normal.

By the way, did you see those warnings in the log before the crash?

Code: Select all

ACS: I don't know what \cCUnder the waterfall... is.
ACS: I don't know what \cCUnder the waterfall... is.
ACS: I don't know what \cCUnder the waterfall... is.
ACS: I don't know what \cCUnder the waterfall... is.
ACS: I don't know what \cCUnder the waterfall... is.
ACS: I don't know what \cCUnder the waterfall... is.
Edit: I fixed the problem by adding a check for NULLness:

Code: Select all

        case PCD_CHECKWEAPON:
            if (activator == NULL || activator->player == NULL || // Non-players do not have weapons
                activator->player->ReadyWeapon == NULL || FBehavior::StaticLookupString (STACK(1)) == NULL)
            {
                STACK(1) = 0;
            }
            else
            {
                STACK(1) = 0 == stricmp (FBehavior::StaticLookupString (STACK(1)),
                    activator->player->ReadyWeapon->GetClass()->TypeName.GetChars());
            }
            break;

I think what happens here is a script conflict between OMG_ACS and the level script. I notice you haven't made it a library...

Edit: Using the awesome power of the almighty SLADE3, I added this line in the OMG_ACS text lump:

Code: Select all

// Omega ACS file, written by James "Jimmy" Paddock.
//==================================================

#library "omega"
#include "zcommon.acs"
Then right-click on the lump, Scripts->Compile ACS. Automagically, it updated the OMG_ACS script lump between the A_ markers. (I didn't even know it was that smart, it's the first time I use this on a script lump that doesn't belong to a map.)

Save, load in (unaltered) ZDoom -- no crash.


So, basically, this is [User error] though the engine could use an additional NULL check just for stability concerns.
User avatar
Jimmy
 
 
Posts: 4726
Joined: Mon Apr 10, 2006 1:49 pm
Preferred Pronouns: He/Him
Contact:

Re: [r3105] Sin City instant crash

Post by Jimmy »

Right. Cheers for the clarity. :D
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [r3105] Sin City instant crash

Post by Graf Zahl »

I addressed this a bit differently.
Post Reply

Return to “Closed Bugs [GZDoom]”