The old assertion failure crash to desktop bug with Phalanx craft mission pointer not being set has been fixed by geever earlier.
I just encountered another one:
I had sent two stilettos out of their homebase to chase a UFO when another UFO appeared and initiated a base attack. I was going to load a different savegame in any case, so I just set the base defense to auto mission, equipped soldiers and pressed go and then got an immediate crash to desktop with the following error message:
Assertion failed!
Program: [ufoai-installdirpath]\ufo.exe
File: [ufoai-sourcecodepath]\cp_aircraft.c
Line: 923
Expression: base != aircraft -> homebase
For information on how la-di-da-di-da and so on and so forth
Looks like in the event that a base is destroyed while the aircraft assigned to that base are on a mission, the game has no mechanism for handling the sudden change with unassigned aircraft and then does what computer programs in that situation often do: Crashes and burns like a scout UFO faced with two Stilettos.
The problem could probably be solved by one of the following mechanisms:
- Base destroyed and aircraft on mission causes a check for free hangars in other bases and immediate reassignment for the craft at large.
- If the craft has no sufficient fuel to reach the new home base, the craft is destroyed (crash before it can refuel)
- OR the craft is transferred to the base (it refueled on the way or landed elsewhere and commenced a transport mission to the new destination). In the latter case living quarter space must be checked that it can accommodate the pilot and possible soldiers as well, which probably makes this much more of a headache coding-wise. Unless extra personnel are immediately fired upon reaching the new base and available for recruitment to other bases in the Employees screen
- If there are no free hangars, either the craft are destroyed or sold and personnel assigned to them fired and available for recruitment in the employee screen.
- OR there is some other solution that is not obvious to me.
In any case it looks like a complete bitch to do unless you take the shortest route (the nuclear option for unassigned aircraft).
Screenshot attached. No ufoconsole.log available, since the crash information was not generated.
I have created a tracker item
here.