aliens

Author Topic: Crash at end of UFO recovery: DebriefingState::prepareDebriefing() crashes  (Read 4325 times)

Offline pkrcel

  • Colonel
  • ****
  • Posts: 192
    • View Profile
As the Thread title says, I'm experiencing a strange "bug".

I'm ending a crashed UFO recovery (UFO map from "YetMoreUFOs" mod, terrain map from Hobbe's "Terrain Pack" mod), and it crashed during DebriefingState::prepareDebriefing() at line 486 of DebriefingState.cpp

Code: [Select]
for (std::vector<BaseFacility*>::iterator k = base->getFacilities()->begin(); k != base->getFacilities()->end();)
{
https:// this facility was demolished
if (battle->getModuleMap()[(*k)->getX()][(*k)->getY()].second == 0)  https://**** CRASHES HERE operator[] returns invalid
{
base->destroyFacility(k);
}
else
{
++k;
}
}


The funny thing is that it should NOT traverse this code branch since it's a UFO recovery and I have a skyranger in battlescape, and so I think that afterall it's okay that in this situation it crashes.


Attached my savefile, for anyone that woudl like to have a look.
EDIT: firing at the last surviving snakeman shoudl yield a kill and then the crash.

Thanks for any help at what I should do to not scrap the entire UFO recovery.

Cheers.
Pkrcel
« Last Edit: October 30, 2014, 11:04:57 pm by pkrcel »

Offline ivandogovich

  • Commander
  • *****
  • Posts: 2381
  • X-Com Afficionado
    • View Profile
    • Ivan Dogovich Youtube
no other mods?

Offline pkrcel

  • Colonel
  • ****
  • Posts: 192
    • View Profile
Right, I also run Equal Terms.

I should add that this is the second mission I run with yetmoreufos (previously I was running Luke's Extra UFO)


Offline ivandogovich

  • Commander
  • *****
  • Posts: 2381
  • X-Com Afficionado
    • View Profile
    • Ivan Dogovich Youtube
Just brainstorming here, (and I didn't look at your code) but sometimes crashes at the end of the mission are due to unrecoverable battlefield items?


Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
for some reason there's a base in your save with inBattlescape: true
any idea why this might be?

Offline pkrcel

  • Colonel
  • ****
  • Posts: 192
    • View Profile
I had a base defense previously, I'd say "two or three missions ago"....

In other words I'm sure I had other UFO recoveries since the base defense.

I haven't tinkered with the save whatsoever, so I can't tell of any other reason.

EDIT: I might add the base defense was NOT in the Base that's affected in this save, to memory this base hasn't yet been targeted by an alien assault. nevermind, read below.

EDIT2: I *guess* that toggling the property to False should take care of the crash, correct?

EDIT3: sorry I got things mixed up, reading the YAML files is a nightmare due to the wonky serialization order of yaml-cpp (or so I think) "Fire Island" is indeed the last base I had to defend.




« Last Edit: October 31, 2014, 09:12:11 am by pkrcel »