Debug build asserts (crashes)

Discussion / Announcement area for Dark Nebulae Core development.
Post Reply
Dogbones
Posts: 2721
Joined: Mon Nov 24, 2003 8:00 am
Location: Virginia

Post by Dogbones »

Okay normally this is not an issue at all but there is debug code that 'chokes' on this and forces the client to exit. [This may also cause the retail build of the client to crash for some people...]

I know embarrasingly little about cores blush.gif but from the code the GetPartType call is failing when given the sucessorPartID as an argument. So PartID 238 does not have a Type? It is okay for a Part not to have a successor which has a type, but not if the part in question is an expendable type.

Hopefully these numbers translate to something that is meaningfull outside of the code

mdata is a structure with the following values

Code: Select all

amount 15
partID 86
succesorPartID 238
launchCount 1
expendabletypeID 26
inventoryLineMDL "invchaff"



Code: Select all

if (m_pexpendabletype)
{
     m_equipmenttype = m_pexpendabletype->GetEquipmentType();
     m_pexpendabletype->AddRef();
     m_launcherDef = m_pexpendabletype->GetLauncherDef();

     if (m_data.successorPartID != NA)
     {
        m_pptSuccessor = pMission->GetPartType(m_data.successorPartID);
        assert (m_pptSuccessor);  <---- THIS IS WHERE IT FAILS
     }

     pMission->AddPartType(this);
}


Dog
Image
DOG PROPERTY LAWS:
2. If it's in my mouth, it's mine.
[unless it tastes bad, then it is yours.]
mdvalley
Posts: 324
Joined: Sun Nov 21, 2004 8:00 am

Post by mdvalley »

That part is CM3. The core file says that it upgrades to part ID 238, but there is no part 238 in DN 4.5, which is why it asserts. In-game, it should not matter. Since you can never get part 238, the code will never attempt to make the upgrade. But it would be nice to fix that for the next DN version.
Noir
Posts: 153
Joined: Tue Jul 01, 2003 7:00 am
Location: Dark Nebulae
Contact:

Post by Noir »

Ah, this is a left over from DN 00.05.00 testing, it should be fixed when 00.05.00 is released.
Image
Allegiance - Dark Nebulae - Web Site
"NANITE MOTHER $#@!ER... DO YOU MOUNT IT?"
Dogbones
Posts: 2721
Joined: Mon Nov 24, 2003 8:00 am
Location: Virginia

Post by Dogbones »

Cool beans Noir.

Now that we have access to the code and debug builds hopefully we can iron out some of these 'quirks'. In the full defense of the core devs, they would a) never know some of these things were issues and B) some of the things the debug build complains about are not really issues, just stuff the orig programmers didn't think would happen.
Image
DOG PROPERTY LAWS:
2. If it's in my mouth, it's mine.
[unless it tastes bad, then it is yours.]
Post Reply