Skip to content

Segmentation fault #687

@peyre

Description

@peyre

I was in the middle of a Docking (Orbit) mission and immediately after a successful docking (before it showed the movie for the next part) the game crashed showing "Segmentation fault (core dumped)" in the terminal. I have the save game if anyone wants to see it.

Now, it's possible that the change I made to mis_m.cpp to modify length of time in hospital may have caused this, though I would think the movie would show first, since I didn't see the die roll bar in Mission Control. The changes I made start on line 855:

if (mode == F_RET) {  // should work in news
    Guy->Status = AST_ST_RETIRED;
    Guy->Special = 2;
    Guy->RetirementDelay = 1;  // Retire beginning of next season
    Guy->RetirementReason = 9;
    Guy->Assign = Guy->Moved = Guy->Crew = Guy->Task = Guy->Unassigned = 0;
} else if (mode == F_INJ) {
    Guy->Status = AST_ST_INJURED;
    int iDel = 3;
    if (Guy->Endurance > 1) {
        int roll = brandom(100);
        if (Guy->Endurance == 4) {
            if (roll < 31) {
                iDel = 1;
            } else if (roll < 71) {
                iDel = 2;
            }
        }
        if (Guy->Endurance == 3) {
            if (roll < 21) {
                iDel = 1;
            } else if (roll < 51) {
                iDel = 2;
            }
        } else {
            if (roll < 11) {
                iDel = 1;
            } else if (roll < 31) {
                iDel = 2;
            }
        }
    }
    Guy->InjuryDelay = iDel;  // Injured for up to a year, depending on Endurance
    Guy->Special = 4;
    Guy->Assign = Guy->Moved = Guy->Crew = Guy->Task = Guy->Unassigned = 0;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugAn issue that causes a crash or an invalid or undesirable game state.

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions