Thargoids added as groups crash game.

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Thargoids added as groups crash game.

Post by Switeck »

This line can cause game crashes:
system.addGroupToRoute("thargoid", 9, 0.8, "wp");

(This is my guess for what happens, please don't shoot me! :lol: )
What seems to happen is in a big furball, a Thargoid or Thargon shoots another Thargoid or Thargon. Then group attack orders OR escort attack orders are given, and chaos ensues. Before long, the game crashes.
Here's the last few messages before the final crash:

12:42:51.609 [ai.message.failed.overflow]: ***** ERROR: AI pending messages overflow for 'Thargoid Warship 647'; pending messages:
("AGGRESSOR_SWITCHED_TARGET 561 765", "AGGRESSOR_SWITCHED_TARGET 563 769", "AGGRESSOR_SWITCHED_TARGET 561 646", "AGGRESSOR_SWITCHED_TARGET 561 769", "AGGRESSOR_SWITCHED_TARGET 564 444", "AGGRESSOR_SWITCHED_TARGET 559 475", "AGGRESSOR_SWITCHED_TARGET 562 432", "AGGRESSOR_SWITCHED_TARGET 571 475", "AGGRESSOR_SWITCHED_TARGET 570 769", "AGGRESSOR_SWITCHED_TARGET 559 432", "AGGRESSOR_SWITCHED_TARGET 571 444", "AGGRESSOR_SWITCHED_TARGET 571 577", "AGGRESSOR_SWITCHED_TARGET 559 760", "AGGRESSOR_SWITCHED_TARGET 567 444", "AGGRESSOR_SWITCHED_TARGET 567 432", "AGGRESSOR_SWITCHED_TARGET 567 577", "AGGRESSOR_SWITCHED_TARGET 562 769", "AGGRESSOR_SWITCHED_TARGET 567 760", "AGGRESSOR_SWITCHED_TARGET 561 475", "AGGRESSOR_SWITCHED_TARGET 559 646", "AGGRESSOR_SWITCHED_TARGET 571 765", "AGGRESSOR_SWITCHED_TARGET 563 444", "AGGRESSOR_SWITCHED_TARGET 567 762", "AGGRESSOR_SWITCHED_TARGET 571 646", "AGGRESSOR_SWITCHED_TARGET 563 432", "AGGRESSOR_SWITCHED_TARGET 571 769", "AGGRESSOR_SWITCHED_TARGET 561 444", "AGGRESSOR_SWITCHED_TARGET 561 432", "AGGRESSOR_SWITCHED_TARGET 567 646", "AGGRESSOR_SWITCHED_TARGET 561 577", "AGGRESSOR_SWITCHED_TARGET 567 769", "AGGRESSOR_SWITCHED_TARGET 561 760", "AGGRESSOR_SWITCHED_TARGET 570 432")
12:42:51.609 [exception]: Squashing exception OoliteException:AI pendingMessages overflow for Thargoid Warship 647 in AI handler pirateAI.plist:ATTACK_SHIP.ATTACKED
12:42:51.609 [ai.message.failed.overflow]: ***** ERROR: AI pending messages overflow for 'Thargoid Warship 647'; pending messages:
("AGGRESSOR_SWITCHED_TARGET 561 765", "AGGRESSOR_SWITCHED_TARGET 563 769", "AGGRESSOR_SWITCHED_TARGET 561 646", "AGGRESSOR_SWITCHED_TARGET 561 769", "AGGRESSOR_SWITCHED_TARGET 564 444", "AGGRESSOR_SWITCHED_TARGET 559 475", "AGGRESSOR_SWITCHED_TARGET 562 432", "AGGRESSOR_SWITCHED_TARGET 571 475", "AGGRESSOR_SWITCHED_TARGET 570 769", "AGGRESSOR_SWITCHED_TARGET 559 432", "AGGRESSOR_SWITCHED_TARGET 571 444", "AGGRESSOR_SWITCHED_TARGET 571 577", "AGGRESSOR_SWITCHED_TARGET 559 760", "AGGRESSOR_SWITCHED_TARGET 567 444", "AGGRESSOR_SWITCHED_TARGET 567 432", "AGGRESSOR_SWITCHED_TARGET 567 577", "AGGRESSOR_SWITCHED_TARGET 562 769", "AGGRESSOR_SWITCHED_TARGET 567 760", "AGGRESSOR_SWITCHED_TARGET 561 475", "AGGRESSOR_SWITCHED_TARGET 559 646", "AGGRESSOR_SWITCHED_TARGET 571 765", "AGGRESSOR_SWITCHED_TARGET 563 444", "AGGRESSOR_SWITCHED_TARGET 567 762", "AGGRESSOR_SWITCHED_TARGET 571 646", "AGGRESSOR_SWITCHED_TARGET 563 432", "AGGRESSOR_SWITCHED_TARGET 571 769", "AGGRESSOR_SWITCHED_TARGET 561 444", "AGGRESSOR_SWITCHED_TARGET 561 432", "AGGRESSOR_SWITCHED_TARGET 567 646", "AGGRESSOR_SWITCHED_TARGET 561 577", "AGGRESSOR_SWITCHED_TARGET 567 769", "AGGRESSOR_SWITCHED_TARGET 561 760", "AGGRESSOR_SWITCHED_TARGET 570 432")
12:42:51.609 [exception]: Squashing exception OoliteException:AI pendingMessages overflow for Thargoid Warship 647 in AI handler pirateAI.plist:ATTACK_SHIP.ATTACKED
...
12:43:10.203 [exception]: Squashing exception OoliteException:AI pendingMessages overflow for Thargoid Warship 647 in AI handler pirateAI.plist:ATTACK_SHIP.ATTACKED
12:43:10.203 [ai.message.failed.overflow]: ***** ERROR: AI pending messages overflow for 'Thargoid Warship 647'; pending messages:
("AGGRESSOR_SWITCHED_TARGET 561 765", "AGGRESSOR_SWITCHED_TARGET 563 769", "AGGRESSOR_SWITCHED_TARGET 561 646", "AGGRESSOR_SWITCHED_TARGET 561 769", "AGGRESSOR_SWITCHED_TARGET 564 444", "AGGRESSOR_SWITCHED_TARGET 559 475", "AGGRESSOR_SWITCHED_TARGET 562 432", "AGGRESSOR_SWITCHED_TARGET 571 475", "AGGRESSOR_SWITCHED_TARGET 570 769", "AGGRESSOR_SWITCHED_TARGET 559 432", "AGGRESSOR_SWITCHED_TARGET 571 444", "AGGRESSOR_SWITCHED_TARGET 571 577", "AGGRESSOR_SWITCHED_TARGET 559 760", "AGGRESSOR_SWITCHED_TARGET 567 444", "AGGRESSOR_SWITCHED_TARGET 567 432", "AGGRESSOR_SWITCHED_TARGET 567 577", "AGGRESSOR_SWITCHED_TARGET 562 769", "AGGRESSOR_SWITCHED_TARGET 567 760", "AGGRESSOR_SWITCHED_TARGET 561 475", "AGGRESSOR_SWITCHED_TARGET 559 646", "AGGRESSOR_SWITCHED_TARGET 571 765", "AGGRESSOR_SWITCHED_TARGET 563 444", "AGGRESSOR_SWITCHED_TARGET 567 762", "AGGRESSOR_SWITCHED_TARGET 571 646", "AGGRESSOR_SWITCHED_TARGET 563 432", "AGGRESSOR_SWITCHED_TARGET 571 769", "AGGRESSOR_SWITCHED_TARGET 561 444", "AGGRESSOR_SWITCHED_TARGET 561 432", "AGGRESSOR_SWITCHED_TARGET 567 646", "AGGRESSOR_SWITCHED_TARGET 561 577", "AGGRESSOR_SWITCHED_TARGET 567 769", "AGGRESSOR_SWITCHED_TARGET 561 760", "AGGRESSOR_SWITCHED_TARGET 570 432")
12:43:10.203 [exception]: Squashing exception OoliteException:AI pendingMessages overflow for Thargoid Warship 647 in AI handler pirateAI.plist:ATTACK_SHIP.ATTACKED
12:43:10.203 [ai.message.failed.overflow]: ***** ERROR: AI pending messages overflow for 'Thargoid Warship 647'; pending messages:
("AGGRESSOR_SWITCHED_TARGET 561 765", "AGGRESSOR_SWITCHED_TARGET 563 769", "AGGRESSOR_SWITCHED_TARGET 561 646", "AGGRESSOR_SWITCHED_TARGET 561 769", "AGGRESSOR_SWITCHED_TARGET 564 444", "AGGRESSOR_SWITCHED_TARGET 559 475", "AGGRESSOR_SWITCHED_TARGET 562 432", "AGGRESSOR_SWITCHED_TARGET 571 475", "AGGRESSOR_SWITCHED_TARGET 570 769", "AGGRESSOR_SWITCHED_TARGET 559 432", "AGGRESSOR_SWITCHED_TARGET 571 444", "AGGRESSOR_SWITCHED_TARGET 571 577", "AGGRESSOR_SWITCHED_TARGET 559 760", "AGGRESSOR_SWITCHED_TARGET 567 444", "AGGRESSOR_SWITCHED_TARGET 567 432", "AGGRESSOR_SWITCHED_TARGET 567 577", "AGGRESSOR_SWITCHED_TARGET 562 769", "AGGRESSOR_SWITCHED_TARGET 567 760", "AGGRESSOR_SWITCHED_TARGET 561 475", "AGGRESSOR_SWITCHED_TARGET 559 646", "AGGRESSOR_SWITCHED_TARGET 571 765", "AGGRESSOR_SWITCHED_TARGET 563 444", "AGGRESSOR_SWITCHED_TARGET 567 762", "AGGRESSOR_SWITCHED_TARGET 571 646", "AGGRESSOR_SWITCHED_TARGET 563 432", "AGGRESSOR_SWITCHED_TARGET 571 769", "AGGRESSOR_SWITCHED_TARGET 561 444", "AGGRESSOR_SWITCHED_TARGET 561 432", "AGGRESSOR_SWITCHED_TARGET 567 646", "AGGRESSOR_SWITCHED_TARGET 561 577", "AGGRESSOR_SWITCHED_TARGET 567 769", "AGGRESSOR_SWITCHED_TARGET 561 760", "AGGRESSOR_SWITCHED_TARGET 570 432")
12:43:10.203 [exception]: Squashing exception OoliteException:AI pendingMessages overflow for Thargoid Warship 647 in AI handler pirateAI.plist:FLEE.ATTACKED
12:43:10.203 [ai.message.failed.overflow]: ***** ERROR: AI pending messages overflow for 'Thargoid Warship 647'; pending messages:
("AGGRESSOR_SWITCHED_TARGET 561 765", "AGGRESSOR_SWITCHED_TARGET 563 769", "AGGRESSOR_SWITCHED_TARGET 561 646", "AGGRESSOR_SWITCHED_TARGET 561 769", "AGGRESSOR_SWITCHED_TARGET 564 444", "AGGRESSOR_SWITCHED_TARGET 559 475", "AGGRESSOR_SWITCHED_TARGET 562 432", "AGGRESSOR_SWITCHED_TARGET 571 475", "AGGRESSOR_SWITCHED_TARGET 570 769", "AGGRESSOR_SWITCHED_TARGET 559 432", "AGGRESSOR_SWITCHED_TARGET 571 444", "AGGRESSOR_SWITCHED_TARGET 571 577", "AGGRESSOR_SWITCHED_TARGET 559 760", "AGGRESSOR_SWITCHED_TARGET 567 444", "AGGRESSOR_SWITCHED_TARGET 567 432", "AGGRESSOR_SWITCHED_TARGET 567 577", "AGGRESSOR_SWITCHED_TARGET 562 769", "AGGRESSOR_SWITCHED_TARGET 567 760", "AGGRESSOR_SWITCHED_TARGET 561 475", "AGGRESSOR_SWITCHED_TARGET 559 646", "AGGRESSOR_SWITCHED_TARGET 571 765", "AGGRESSOR_SWITCHED_TARGET 563 444", "AGGRESSOR_SWITCHED_TARGET 567 762", "AGGRESSOR_SWITCHED_TARGET 571 646", "AGGRESSOR_SWITCHED_TARGET 563 432", "AGGRESSOR_SWITCHED_TARGET 571 769", "AGGRESSOR_SWITCHED_TARGET 561 444", "AGGRESSOR_SWITCHED_TARGET 561 432", "AGGRESSOR_SWITCHED_TARGET 567 646", "AGGRESSOR_SWITCHED_TARGET 561 577", "AGGRESSOR_SWITCHED_TARGET 567 769", "AGGRESSOR_SWITCHED_TARGET 561 760", "AGGRESSOR_SWITCHED_TARGET 570 432")
12:43:10.203 [exception]: Squashing exception OoliteException:AI pendingMessages overflow for Thargoid Warship 647 in AI handler pirateAI.plist:ATTACK_SHIP.ATTACKED
12:43:10.937 [ai.message.failed.overflow]: ***** ERROR: AI pending messages overflow for 'Thargoid Warship 647'; pending messages:
("AGGRESSOR_SWITCHED_TARGET 561 765", "AGGRESSOR_SWITCHED_TARGET 563 769", "AGGRESSOR_SWITCHED_TARGET 561 646", "AGGRESSOR_SWITCHED_TARGET 561 769", "AGGRESSOR_SWITCHED_TARGET 564 444", "AGGRESSOR_SWITCHED_TARGET 559 475", "AGGRESSOR_SWITCHED_TARGET 562 432", "AGGRESSOR_SWITCHED_TARGET 571 475", "AGGRESSOR_SWITCHED_TARGET 570 769", "AGGRESSOR_SWITCHED_TARGET 559 432", "AGGRESSOR_SWITCHED_TARGET 571 444", "AGGRESSOR_SWITCHED_TARGET 571 577", "AGGRESSOR_SWITCHED_TARGET 559 760", "AGGRESSOR_SWITCHED_TARGET 567 444", "AGGRESSOR_SWITCHED_TARGET 567 432", "AGGRESSOR_SWITCHED_TARGET 567 577", "AGGRESSOR_SWITCHED_TARGET 562 769", "AGGRESSOR_SWITCHED_TARGET 567 760", "AGGRESSOR_SWITCHED_TARGET 561 475", "AGGRESSOR_SWITCHED_TARGET 559 646", "AGGRESSOR_SWITCHED_TARGET 571 765", "AGGRESSOR_SWITCHED_TARGET 563 444", "AGGRESSOR_SWITCHED_TARGET 567 762", "AGGRESSOR_SWITCHED_TARGET 571 646", "AGGRESSOR_SWITCHED_TARGET 563 432", "AGGRESSOR_SWITCHED_TARGET 571 769", "AGGRESSOR_SWITCHED_TARGET 561 444", "AGGRESSOR_SWITCHED_TARGET 561 432", "AGGRESSOR_SWITCHED_TARGET 567 646", "AGGRESSOR_SWITCHED_TARGET 561 577", "AGGRESSOR_SWITCHED_TARGET 567 769", "AGGRESSOR_SWITCHED_TARGET 561 760", "AGGRESSOR_SWITCHED_TARGET 570 432")
12:43:10.937 [exception]: Squashing exception OoliteException:AI pendingMessages overflow for Thargoid Warship 647 in AI handler pirateAI.plist:ATTACK_SHIP.ATTACKED
12:43:11.000 [ai.message.failed.overflow]: ***** ERROR: AI pending messages overflow for 'Thargoid Warship 647'; pending messages:
("AGGRESSOR_SWITCHED_TARGET 561 765", "AGGRESSOR_SWITCHED_TARGET 563 769", "AGGRESSOR_SWITCHED_TARGET 561 646", "AGGRESSOR_SWITCHED_TARGET 561 769", "AGGRESSOR_SWITCHED_TARGET 564 444", "AGGRESSOR_SWITCHED_TARGET 559 475", "AGGRESSOR_SWITCHED_TARGET 562 432", "AGGRESSOR_SWITCHED_TARGET 571 475", "AGGRESSOR_SWITCHED_TARGET 570 769", "AGGRESSOR_SWITCHED_TARGET 559 432", "AGGRESSOR_SWITCHED_TARGET 571 444", "AGGRESSOR_SWITCHED_TARGET 571 577", "AGGRESSOR_SWITCHED_TARGET 559 760", "AGGRESSOR_SWITCHED_TARGET 567 444", "AGGRESSOR_SWITCHED_TARGET 567 432", "AGGRESSOR_SWITCHED_TARGET 567 577", "AGGRESSOR_SWITCHED_TARGET 562 769", "AGGRESSOR_SWITCHED_TARGET 567 760", "AGGRESSOR_SWITCHED_TARGET 561 475", "AGGRESSOR_SWITCHED_TARGET 559 646", "AGGRESSOR_SWITCHED_TARGET 571 765", "AGGRESSOR_SWITCHED_TARGET 563 444", "AGGRESSOR_SWITCHED_TARGET 567 762", "AGGRESSOR_SWITCHED_TARGET 571 646", "AGGRESSOR_SWITCHED_TARGET 563 432", "AGGRESSOR_SWITCHED_TARGET 571 769", "AGGRESSOR_SWITCHED_TARGET 561 444", "AGGRESSOR_SWITCHED_TARGET 561 432", "AGGRESSOR_SWITCHED_TARGET 567 646", "AGGRESSOR_SWITCHED_TARGET 561 577", "AGGRESSOR_SWITCHED_TARGET 567 769", "AGGRESSOR_SWITCHED_TARGET 561 760", "AGGRESSOR_SWITCHED_TARGET 570 432")
12:43:11.000 [exception]: Squashing exception OoliteException:AI pendingMessages overflow for Thargoid Warship 647 in AI handler thargoidAI.plist:LOOK_FOR_TARGETS.ENTER
12:43:11.000 [ai.message.failed.overflow]: ***** ERROR: AI pending messages overflow for 'Thargoid Warship 647'; pending messages:
("AGGRESSOR_SWITCHED_TARGET 561 765", "AGGRESSOR_SWITCHED_TARGET 563 769", "AGGRESSOR_SWITCHED_TARGET 561 646", "AGGRESSOR_SWITCHED_TARGET 561 769", "AGGRESSOR_SWITCHED_TARGET 564 444", "AGGRESSOR_SWITCHED_TARGET 559 475", "AGGRESSOR_SWITCHED_TARGET 562 432", "AGGRESSOR_SWITCHED_TARGET 571 475", "AGGRESSOR_SWITCHED_TARGET 570 769", "AGGRESSOR_SWITCHED_TARGET 559 432", "AGGRESSOR_SWITCHED_TARGET 571 444", "AGGRESSOR_SWITCHED_TARGET 571 577", "AGGRESSOR_SWITCHED_TARGET 559 760", "AGGRESSOR_SWITCHED_TARGET 567 444", "AGGRESSOR_SWITCHED_TARGET 567 432", "AGGRESSOR_SWITCHED_TARGET 567 577", "AGGRESSOR_SWITCHED_TARGET 562 769", "AGGRESSOR_SWITCHED_TARGET 567 760", "AGGRESSOR_SWITCHED_TARGET 561 475", "AGGRESSOR_SWITCHED_TARGET 559 646", "AGGRESSOR_SWITCHED_TARGET 571 765", "AGGRESSOR_SWITCHED_TARGET 563 444", "AGGRESSOR_SWITCHED_TARGET 567 762", "AGGRESSOR_SWITCHED_TARGET 571 646", "AGGRESSOR_SWITCHED_TARGET 563 432", "AGGRESSOR_SWITCHED_TARGET 571 769", "AGGRESSOR_SWITCHED_TARGET 561 444", "AGGRESSOR_SWITCHED_TARGET 561 432", "AGGRESSOR_SWITCHED_TARGET 567 646", "AGGRESSOR_SWITCHED_TARGET 561 577", "AGGRESSOR_SWITCHED_TARGET 567 769", "AGGRESSOR_SWITCHED_TARGET 561 760", "AGGRESSOR_SWITCHED_TARGET 570 432")
12:43:11.000 [exception]: ***** Handling Non-fatal : OoliteException : AI pendingMessages overflow for Thargoid Warship 647 *****
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: Thargoids added as groups crash game.

Post by JensAyton »

Bug #18055
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Re: Thargoids added as groups crash game.

Post by Switeck »

Are Thargons, once fired, treated like escorts of the Thargoid mothership?
Or is the connection more...tenuous?
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Thargoids added as groups crash game.

Post by Thargoid »

They're essentially missiles, but flying under a different AI.

Essentially once fired they are independent, although they check periodically that there is a thargoid mothership around (any one will do) to remain active.
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Re: Thargoids added as groups crash game.

Post by Switeck »

I guess that means you can kill them with regular 30 credit missiles, because the Thargoid "mothership" will never get a message that it needs to fire its ECM.
That also means if 1 Thargon shoots a Thargoid, only other Thargoids in the same group are likely to "join in" trying to kill that Thargon?
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Thargoids added as groups crash game.

Post by Eric Walch »

Switeck wrote:
That also means if 1 Thargon shoots a Thargoid, only other Thargoids in the same group are likely to "join in" trying to kill that Thargon?
When ships shoot at other ships in the same group, those ships are expelled from the group. Galactic navy contains a mission with a big thargoid fleet. The whole fleet is a single group and I never witnessed an AI overflow problem. In 1.74 there was often friendly fire between thargoids, but in 1.75.1 that should be clearly less. When looking at the group properties of thargoids attacking thargoids, you should see they are from different groups.

And thargoids are chaotic, not able to do coordinated attacks. So, they don't use groupAttackTarget commands.
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Re: Thargoids added as groups crash game.

Post by Switeck »

"When ships shoot at other ships in the same group, those ships are expelled from the group."

Which means there's even less reason for the crash than I imagined. No cross-fires of allies trying to kill each other, since they're expelled from group. No escorts attacking motherships, since Thargons are missiles rather than true escorts. Just some insane snarl-up of perhaps 1 Thargoid warship out of 9 or more. And I have no real ideas for what triggers it except it's consistently happening typically within minutes of the Thargoid group spawning. Inheriting targeting information from now-dead previous ship to use that number? At least 1 other person on irc said they got a crash too, but not necessarily from the Thagoids.

I did in the past have a Thargoid get a pirateAI.plist script somehow, and I know from looking at my ship spawner code that adds Thargoids...it isn't what's doing that!
Not much to this:
system.addGroupToRoute("thargoid", 9, 0.8, "wp");

"And thargoids are chaotic, not able to do coordinated attacks. So, they don't use groupAttackTarget commands."

That may be reading a bit too much into the tea leaves. :lol:
While the game isn't programmed that way, an OXP could treat them differently. That could mean some Thargoids may not be as chaotic as others, even if they're only a very small subgroup...that we haven't yet seen in-universe.

I was adding them as a group of 9 to see if there was better coordination. I was hoping for less tendency to diverge in different directions until the only signs that Thargoids have "been here" is a little bit of debris and an inactive Thargon or 2. This occurred even though Thargoid warships were still alive nearby, since Thargons AI.plist has no programming to actually follow Thargoid warships around. That they stick together for any time at all is happenstance of their attacks "pulling" them towards enemies. I'm working on making slightly better Thargon logic with my mod for the purpose of following Thargoid warships around. I can't say it's going well.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Thargoids added as groups crash game.

Post by Eric Walch »

When I look at the code I notice that:

Code: Select all

12:43:11.000 [exception]: Squashing exception OoliteException:AI pendingMessages overflow for Thargoid Warship 647 in AI handler thargoidAI.plist:LOOK_FOR_TARGETS.ENTER
12:43:11.000 [ai.message.failed.overflow]: ***** ERROR: AI pending messages overflow for 'Thargoid Warship 647'; pending messages:
("AGGRESSOR_SWITCHED_TARGET 561 765", "AGGRESSOR_SWITCHED_TARGET 563 769", "AGGRESSOR_SWITCHED_TARGET 561 646", "AGGRESSOR_SWITCHED_TARGET 561 769", "AGGRESSOR_SWITCHED_TARGET 564 444", "AGGRESSOR_SWITCHED_TARGET 559 475", "AGGRESSOR_SWITCHED_TARGET 562 432", "AGGRESSOR_SWITCHED_TARGET 571 475", "AGGRESSOR_SWITCHED_TARGET 570 769", "AGGRESSOR_SWITCHED_TARGET 559 432", "AGGRESSOR_SWITCHED_TARGET 571 444", "AGGRESSOR_SWITCHED_TARGET 571 577", "AGGRESSOR_SWITCHED_TARGET 559 760", "AGGRESSOR_SWITCHED_TARGET 567 444", "AGGRESSOR_SWITCHED_TARGET 567 432", "AGGRESSOR_SWITCHED_TARGET 567 577", "AGGRESSOR_SWITCHED_TARGET 562 769", "AGGRESSOR_SWITCHED_TARGET 567 760", "AGGRESSOR_SWITCHED_TARGET 561 475", "AGGRESSOR_SWITCHED_TARGET 559 646", "AGGRESSOR_SWITCHED_TARGET 571 765", "AGGRESSOR_SWITCHED_TARGET 563 444", "AGGRESSOR_SWITCHED_TARGET 567 762", "AGGRESSOR_SWITCHED_TARGET 571 646", "AGGRESSOR_SWITCHED_TARGET 563 432", "AGGRESSOR_SWITCHED_TARGET 571 769", "AGGRESSOR_SWITCHED_TARGET 561 444", "AGGRESSOR_SWITCHED_TARGET 561 432", "AGGRESSOR_SWITCHED_TARGET 567 646", "AGGRESSOR_SWITCHED_TARGET 561 577", "AGGRESSOR_SWITCHED_TARGET 567 769", "AGGRESSOR_SWITCHED_TARGET 561 760", "AGGRESSOR_SWITCHED_TARGET 570 432")
contains always the same messages. Looking at the code that generates the messages, I see:

Code: Select all

- (void) message:(NSString *) ms
{
	if ([[self owner] universalID] == NO_TARGET)  return;  // don't think until launched

	if ([pendingMessages count] > 32)
	{
		OOLogERR(@"ai.message.failed.overflow", @"AI pending messages overflow for '%@'; pending messages:\n%@", ownerDesc, pendingMessages);
		[NSException raise:@"OoliteException"
					format:@"AI pendingMessages overflow for %@", ownerDesc];
	}
	
	[pendingMessages addObject:ms];
}
The overflow warning is generated, but the code is still trying to add the message. These pending messages are generated by the thargoidAI code part:

Code: Select all

	"ATTACK_SHIP" =
	{
		ENTER = (performAttack);
		"ATTACKED" = (setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP");
		// deletions
		UPDATE = (scanForNonThargoid, "pauseAI: 30.0");
	};
The command setTargetToPrimaryAggressor generates the "AGGRESSOR_SWITCHED_TARGET xxx yyy", messages. But, unlike other messages, these are almost all different because xxx and yyy contain ship IDs that are likely different ships every time. The pause is set at 30 seconds, so when there are to many attacks by different ships within that 30 seconds that generate a target switch, we have the overflow.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Thargoids added as groups crash game.

Post by Eric Walch »

Looking at the code, I also see:

Code: Select all

- (void) setTargetToPrimaryAggressor
{
	if (![UNIVERSE entityForUniversalID:primaryAggressor])
		return;
	if (primaryTarget == primaryAggressor)
		return;
		
	// a more considered approach here:
	// if we're already busy attacking a target we don't necessarily want to break off
	//
	switch (behaviour)
	{
		case BEHAVIOUR_ATTACK_FLY_FROM_TARGET:
		case BEHAVIOUR_ATTACK_FLY_TO_TARGET:
			if (randf() < 0.75)	// if I'm attacking, ignore 75% of new aggressor's attacks
				return;
			break;
		
		default:
			break;
	}
In above behaviour list are BEHAVIOUR_ATTACK_FLY_TO_TARGET_TWELVE and BEHAVIOUR_ATTACK_FLY_TO_TARGET_SIX missing. It could be intentional, but I have a suspicion that it was just omitted at this location when these two behaviours were added to Oolite, long ago. This leads to that some ships will always switch target and not only 25% of the time while attacking towards the target.
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Re: Thargoids added as groups crash game.

Post by Switeck »

Eric Walch wrote:
The command setTargetToPrimaryAggressor generates the "AGGRESSOR_SWITCHED_TARGET xxx yyy", messages. But, unlike other messages, these are almost all different because xxx and yyy contain ship IDs that are likely different ships every time. The pause is set at 30 seconds, so when there are to many attacks by different ships within that 30 seconds that generate a target switch, we have the overflow.
...
In above behaviour list are BEHAVIOUR_ATTACK_FLY_TO_TARGET_TWELVE and BEHAVIOUR_ATTACK_FLY_TO_TARGET_SIX missing. It could be intentional, but I have a suspicion that it was just omitted at this location when these two behaviours were added to Oolite, long ago. This leads to that some ships will always switch target and not only 25% of the time while attacking towards the target.
Just to sort out if I follow and understand you...
The Thargoid warship's 30 second delay in the update of the attack section means a LOT of ships could have hit it in that time, but it can only change targets once per 30 seconds.
It has to keep track of all that hit it in that interval.
But because of not coding for the case conditions of BEHAVIOUR_ATTACK_FLY_TO_TARGET_TWELVE and BEHAVIOUR_ATTACK_FLY_TO_TARGET_SIX (which it is most likely to be in), EACH enemy ship hit triggers a guaranteed target change to parse through when it finally does update?
However by then the list has grown so long as to trigger an overflow?

This may be distantly related?:
https://bb.oolite.space/viewtopic.php?p=136789#p136789
[ai.error.stackOverflow]: ***** ERROR: AI stack overflow for <ShipEntity 0xe80eed0>{"Prinz-Class Zerstoerer (Erinain)"} in feudal-challengerhomeAI.plist: FLEE -- stack:
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Thargoids added as groups crash game.

Post by Eric Walch »

Switeck wrote:
Just to sort out if I follow and understand you...
The Thargoid warship's 30 second delay in the update of the attack section means a LOT of ships could have hit it in that time, but it can only change targets once per 30 seconds.
It has to keep track of all that hit it in that interval.
Sort of. Switching of targets happens immediately. Those AIMS_AGGRESSOR_SWITCHED_TARGET messages are only used to do some bookkeeping of bounties as result of a switch and to generate the messages: "[thanks-for-assist]". So potentially there could be several of those thank-you messages at update time, but for thargoids those messages are suppressed.
Switeck wrote:
This may be distantly related?:
https://bb.oolite.space/viewtopic.php?p=136789#p136789
[ai.error.stackOverflow]: ***** ERROR: AI stack overflow for <ShipEntity 0xe80eed0>{"Prinz-Class Zerstoerer (Erinain)"} in feudal-challengerhomeAI.plist: FLEE -- stack:
No its different. In feudal states it is an AI stack overflow as result of putting to many AIs on top of each other. Normally indication of an programming error in the AI. In this case it is an overflow of the pending-messages. That I never saw before. The chance of an overflow is very small because duplicate messages are ignored. Only in the case of AIMS_AGGRESSOR_SWITCHED_TARGET will every different combination of ships lead to an unique messages. That could lead (and apparently does) lead to many unique messages when to many ships are involved. To make it foolproof it probably needs a full rewrite. Probably the easiest fix for now is to not add more messages when an overflow is detected. And maybe increasing the size of the stack as a first patch.
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Re: Thargoids added as groups crash game.

Post by Switeck »

What if the delay in the Update:
UPDATE = (scanForNonThargoid, "pauseAI: 30.0");
...were reduced to 10 seconds?
Would that help or have no or little effect?
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Re: Thargoids added as groups crash game.

Post by Kaks »

Apart from the obvious you mean? ;)

Instead of a Thargoid attacking a target for 30 seconds before being distracted by another target it would only take 10 seconds for the Thargoid to be distracted, making Thargoid attacks more random, i.e. more ineffective... :P

I've got visions of ADD Thargoids already: what where we attacking? Don't remember - wait, shoot that one! Great!
Wait, what were we attacking? Not sure - hey, that looks like a target, fire on that!
Etc, etc...
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Thargoids added as groups crash game.

Post by Eric Walch »

And also all those overflow messages don't generate the crash itself. The very last entry in your log is different than all the others. It is also generated in a different place in the code. Although it is related to the pending messages overflow, I don't immediately see how this message is generated. Al least the text: "***** Handling Non-fatal" should become "***** Handling fatal" judging to the following crash. :P
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Re: Thargoids added as groups crash game.

Post by Switeck »

Yeah Eric, I was wondering about that non-fatal error message. I took it to mean: "Well, the game didn't completely crash...I can at least report the cause of the error and I'm now closing the program since it's not going to run right." The really fatal crashes tend to bomb without there being a message, maybe because they shot the messenger first? :lol:

As you have graciously and politely pointed out, my assumptions are often hilariously way wrong. I try to make learning fun.

The earlier error messages (the pending messages overflow) are the signs of one VERY confused Thargoid warship. Probably not sure about its gender (mothership role versus the Thargons) or its orientation (for aiming its laser) or which special interest group (enemies) it needs to attack next.
Kaks wrote:
Apart from the obvious you mean? ;)

Instead of a Thargoid attacking a target for 30 seconds before being distracted by another target it would only take 10 seconds for the Thargoid to be distracted, making Thargoid attacks more random, i.e. more ineffective... :P
I meant less likely to induce a crash.

No doubt that would probably make Thargoids change targets more often.
BUT...
I just looked at the pirateAI.plist ...in particular its "ATTACK_SHIP" section, especially this:
"ATTACKED" = (setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP");

It would seem that pirates will stay on one target only as long as their update pause is, because the moment they get hit by something else they change targets and attack that. And I couldn't find their update pause, so my guess is they would change targets almost instantly? That seems a worse case of ADD than Thargoid warships have!

route1patrolAI.plist also has something similar:
ATTACKED = (setTargetToPrimaryAggressor, groupAttackTarget);

route1traderAI.plist bravely runs away?:
ATTACKED = ("setAITo: traderInterceptAI.plist", fightOrFleeHostiles);
At least that one doesn't seem to me to imply an instant change in behavior.
Post Reply