phungus420
Deity
- Joined
- Mar 1, 2003
- Messages
- 6,296
Well, I was wrong here. I converted the save over to RevDCM, and still got this CvUnitSelectionGroupAI assert failure, but it didn't have a fatal hang. So went pack and reanalyzed the save and the fatal hang. This time I isolated it to a single unit. It's a modded unit of mine, the Pathfinder. But here is the thing, there is no art bug, and the XML is fine with this unit. I've seen hundreds of them around in test games, and no problem (they are a strength 6 upgrade for explorers). Never had this hang reported in 1.02. So on a hunch I thought it might be AI related, and changed the unit's AI type to UNITAI_EXPLORE from UNITAI_ATTACK, changing it to explore fixes this fatal hang.
I then tried replicating this with explorerers and other pathfinders, to no avail. It seems to be some issue intrinsic to this particular stack. The AI is at war with all his neighbors in this case, and it looks like this is a City Attack stack that is being built, if that helps. Also all recon units have been modded so that they can attack but not capture. I'll try to see if I can get this hang to reproduce somehow, but so far it seems to be something that happens when the AI looks at this particular stack...
Edit:
Well no luck. I swapped the pathfinder for an explorer, but the AI just upgraded to a pathfinder. No further hangs, whatever issue it had on the previous turn seemed to be fixed. The I tried remove the tech to upgrade, but it just sends the attack stack out with an explorer fine...
Edit2:
Well I still can't figure out how to reproduce this. The only way I can get the crash to happen is if a pathfinder unit is in the city with the samuri and has it's AI set to UNITAI_ATTACK on that specific turn. Changing anything, AI type, the tile the pathfinder is in doesn't replicate it. And replacing the pathfinder with an explorer doesn't cause a fatal hang either. I'm totally stumped. I'll show a picture of the unit and what's going on (switched to this player to show the situation, this is also how I isolated the cause of this hang):
Oh and unit stats, Explorer is the same as default BtS explorer except it may attack (but not capture), and doesn't have the free promos, instead gets +20% defense on hills and forest/jungles. Pathfinder is the same as an explorer except it is strength 6, has a 20% withdraw chance, and has a base 30% strength on hills and forest/jungle. Anyway totally stumped here. Any ideas? I could look through the Unit AI code if I had some idea of what to look for.
I then tried replicating this with explorerers and other pathfinders, to no avail. It seems to be some issue intrinsic to this particular stack. The AI is at war with all his neighbors in this case, and it looks like this is a City Attack stack that is being built, if that helps. Also all recon units have been modded so that they can attack but not capture. I'll try to see if I can get this hang to reproduce somehow, but so far it seems to be something that happens when the AI looks at this particular stack...
Edit:
Well no luck. I swapped the pathfinder for an explorer, but the AI just upgraded to a pathfinder. No further hangs, whatever issue it had on the previous turn seemed to be fixed. The I tried remove the tech to upgrade, but it just sends the attack stack out with an explorer fine...
Edit2:
Well I still can't figure out how to reproduce this. The only way I can get the crash to happen is if a pathfinder unit is in the city with the samuri and has it's AI set to UNITAI_ATTACK on that specific turn. Changing anything, AI type, the tile the pathfinder is in doesn't replicate it. And replacing the pathfinder with an explorer doesn't cause a fatal hang either. I'm totally stumped. I'll show a picture of the unit and what's going on (switched to this player to show the situation, this is also how I isolated the cause of this hang):
Spoiler :

Oh and unit stats, Explorer is the same as default BtS explorer except it may attack (but not capture), and doesn't have the free promos, instead gets +20% defense on hills and forest/jungles. Pathfinder is the same as an explorer except it is strength 6, has a 20% withdraw chance, and has a base 30% strength on hills and forest/jungle. Anyway totally stumped here. Any ideas? I could look through the Unit AI code if I had some idea of what to look for.