Skip to content

NoSpawnAlt crash #3

Description

@SethGekco

I'd post the dump, but it is 2GB (what the actual fuck). If I am given the go ahead, I'll gladly delete it. If you guys REALLY want it, I will figure something out, like torrent or something lol.

Take with a grain of salt, it's what Claude is claiming is the problem:

Null deref in UnitClass_DrawAsVXL_Shadow when Ares integration is disabled (Antares)

Versions: Phobos Development Build #486 · Antares 21.352.1218 (reports "Applying Ares 3.0p1") · YR 1.001, Syringe 0.7.2.0 (CnCNet branch), Wine

Crash: C0000005 at Phobos RVA 0x920F (UnitClass_DrawAsVXL_Shadow, hook 0x0073C47A).
Exception record: READ at 0x00000004. Reproduced 6× over five days, always with the same
register fingerprint (EAX=0, ECX=0, EBX==EDI=TechnoTypeClass*, EDX-EDI=0xB8).

Trigger: any V3 Launcher that has already fired its rocket being drawn.

Chain:

  1. AresHelper::Init() finds Antares (it ships OriginalFilename = "Ares.dll") but rejects it —
    the second gate is a hardcoded PE TimeDateStamp whitelist in src/Utilities/AresHelper.cpp:
    { 0x5fc37ef6, Ares30 }, { 0x61daa114, Ares30p }. Antares' timestamp isn't in it, so
    AresVersion = UnknownAresHelper::CanUseAres == false for the whole session.
    Log line: [Phobos] Detected a version of Ares that is not supported by Phobos. Disabling integration.

  2. In src/Ext/TechnoType/Hooks.MatrixOp.cpp, GetMainVoxel():

    if (pDrawType->NoSpawnAlt && pThis->SpawnManager && pThis->SpawnManager->CountDockedSpawns() == 0) {
        if (AresHelper::CanUseAres) { ...; return &AresTechnoTypeExt(pDrawType->align_2FC)->NoSpawnAltVXL; }
        return &pDrawType->TurretVoxel;   // <-- non-Ares fallback, unguarded
    }

    V3 is NoSpawnAlt=yes and Turret=no, so TurretVoxel is {null, null}. Verified from the
    minidump: MainVoxel (+0xB0) is loaded, TurretVoxel (+0xB8) is {0,0}, NoSpawnAlt (+0x1E8) = 1.
    The following cmp ecx,[eax+4] then reads address 0x4.

Suggested fix: null-check main_vxl->VXL/->HVA after GetMainVoxel() and fall back to
MainVoxel (or skip the shadow) — a NoSpawnAlt type with no turret voxel has no valid alt art
in the non-Ares path at all.

Secondary, probably the higher-value fix: the timestamp whitelist means every CanUseAres
site in Phobos (~20: techno/house/country ext reads, capture manager, tunnels, selection, EVA,
turret counts >18, voxel selection) silently takes its non-Ares branch under Antares. Recognising
Antares, or offering an override, would close this whole class rather than one crash.

debug.log
syringe.log
except.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions