View Issue Details

IDProjectCategoryView StatusLast Update
0003373Spring engineGeneralpublic2013-08-24 18:26
Reportercleanrock Assigned ToKloot  
PrioritylowSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version91.0.1+git 
Summary0003373: crash when exiting before countdown finished
DescriptionWhile investigating 3371 (which i was unable to reproduce on 91.0) i found that spring crash if you exit before countdown finished.
This is because the AI is not created properly until game start and shutdown will try to destroy the non-existing AI since the AI has an id before start:

void CEngineOutHandler::SetSkirmishAIDieing(const size_t skirmishAIId) {
    SCOPED_TIMER("AI Total");

    try {
        id_skirmishAI[skirmishAIId]->Dieing();
    } CATCH_AI_EXCEPTION;
}

Map id_skirmishAI above is empty so we get a new NULL pointer entry.
Steps To Reproduce- start spring
- setup Player vs NullAI game (i used BA 7.72)
- press "Test the game" and exit (Alt+F4) before countdown finished
Additional InformationThis crash started at commit 6b2fd94621d91cfd528e2021bc36a295db00ee72, not sure why though.
I attached an ugly fix for this which checks for null-pointer but i think we need a better fix.
TagsNo tags attached.
Attached Files
ugly.patch (Attachment missing)
Checked infolog.txt for Errors

Relationships

has duplicate 0003960 closed crash when quitting during countdown to gamestart 
related to 0003371 resolvedabma Crash when spring started and closed before game started 

Activities

Issue History

Date Modified Username Field Change
2012-12-17 17:09 cleanrock New Issue
2012-12-17 17:09 cleanrock File Added: ugly.patch
2012-12-17 17:12 cleanrock Relationship added related to 0003371
2013-08-24 18:14 cleanrock Relationship added has duplicate 0003960
2013-08-24 18:26 Kloot Changeset attached => spring develop fc55c202
2013-08-24 18:26 Kloot Assigned To => Kloot
2013-08-24 18:26 Kloot Status new => resolved
2013-08-24 18:26 Kloot Resolution open => fixed