View Issue Details

IDProjectCategoryLast Update
0020034AI War 2Bug - GameplayAug 30, 2018 11:45 am
ReporterHeartHunter7 Assigned ToChris_McElligottPark  
Severitymajor 
Status resolvedResolutionfixed 
Product Version0.762 Spreadshot 
Fixed in Version0.764 Mercenary Surge 
Summary0020034: Dark spire notification bug.
Description-(minus) 176 second. How it can be?
TagsNo tags attached.

Activities

HeartHunter7

Aug 29, 2018 12:40 pm

reporter  

20180829194000_1.jpg (291,061 bytes)
spire bug.save (3,792,229 bytes)
spire bug.savemet (40 bytes)

BadgerBadger

Aug 29, 2018 3:10 pm

manager   ~0048508

Last edited: Aug 29, 2018 4:53 pm

Was there anything else weird going on in your game? Other factions having unexpectedly idle units?

As soon as I load your game the vengeance strike triggers instantly. This makes me think that something was preventing DoPerSecondLogic in your save.

The basic logic here looks like this.
When a Vengeance Strike is getting close, we give a notification saying "Vengeance strike at time X". Then in the PerSimStep we run
if (time >= X)
   Launch vengeance strike and update X to when the next vengeance strike should be.

What happened though is that the Vengeance Strike time came and went, but the PerSimStep code that would have launched the Vengeance Strike never ran. But as soon as I loaded it, it did run.

HeartHunter7

Aug 29, 2018 5:20 pm

reporter   ~0048530

When i was loading the game, this bug is dissapair. When i played, this timer was more and more -(minus)170, -171,-172, ever -250. No idea.
"Was there anything else weird going on in your game? Other factions having unexpectedly idle units?" I never seen other factions, becouse i was not fighting with them, so i cant tell.

HeartHunter7

Aug 29, 2018 5:22 pm

reporter  

20180830002142_1.jpg (373,726 bytes)

Chris_McElligottPark

Aug 29, 2018 8:44 pm

administrator   ~0048565

Can you upload the logs from inside the PlayerData folder? ArcenDebugLog.txt and ErrorsReportedByEngine.txt and similar, if there are any others. It may be that a background thread hit an exception and flat-out died, so this might not be as dire as right now Badger and I are suspecting.

HeartHunter7

Aug 30, 2018 6:53 am

reporter  

ArcenDebugLog.txt (1,159,688 bytes)
ErrorsReportedByEngine.txt (8,813 bytes)   
8/13/2018 11:22:23 PM (0.758) Mem: 2,174,156,800 Mode: Host Plat:WindowsPlayer
-----------------------------------ErrorsReportedByEngine-----------------------------------
-----------
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Stack Trace: System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <f826c2584fc94ec19a48a6576640bdc5>:0)
System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <f826c2584fc94ec19a48a6576640bdc5>:0)
Arcen.AIW2.ExternalVisualization.SquadVisualizer.GetRandomShipThatCanFire () (at <cea3d8bbf8db410eae38b0de58bacb1a>:0)
Arcen.AIW2.ExternalVisualization.ShotVisualizer.TryWiringUpShotToTarget (System.Single DeltaTime, Arcen.AIW2.Core.GameEntity TargetSquad) (at <cea3d8bbf8db410eae38b0de58bacb1a>:0)
Arcen.AIW2.ExternalVisualization.ShotVisualizer.DoShotMovement (System.Boolean DrawDebugData) (at <cea3d8bbf8db410eae38b0de58bacb1a>:0)
Arcen.AIW2.ExternalVisualization.BattlefieldVisualSingleton.HandleShotUpdates () (at <cea3d8bbf8db410eae38b0de58bacb1a>:0)
Arcen.AIW2.ExternalVisualization.BattlefieldVisualSingleton.RunPlanetUpdateTree () (at <cea3d8bbf8db410eae38b0de58bacb1a>:0)
Arcen.AIW2.ExternalVisualization.BattlefieldVisualSingleton.RunUpdate () (at <cea3d8bbf8db410eae38b0de58bacb1a>:0)
ArcenMainGameVisuals.Update () (at <ecf94ce1133449a796462ab165ab5877>:0)



8/16/2018 12:46:27 AM (0.758) Mem: 943,382,528 Mode: Host Plat:WindowsPlayer
-----------------------------------ErrorsReportedByEngine-----------------------------------
-----------
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Stack Trace: System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <f826c2584fc94ec19a48a6576640bdc5>:0)
System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <f826c2584fc94ec19a48a6576640bdc5>:0)
Arcen.AIW2.ExternalVisualization.SquadVisualizer.GetRandomShipThatCanFire () (at <cea3d8bbf8db410eae38b0de58bacb1a>:0)
Arcen.AIW2.ExternalVisualization.ShotVisualizer.TryWiringUpShotToTarget (System.Single DeltaTime, Arcen.AIW2.Core.GameEntity TargetSquad) (at <cea3d8bbf8db410eae38b0de58bacb1a>:0)
Arcen.AIW2.ExternalVisualization.ShotVisualizer.DoShotMovement (System.Boolean DrawDebugData) (at <cea3d8bbf8db410eae38b0de58bacb1a>:0)
Arcen.AIW2.ExternalVisualization.BattlefieldVisualSingleton.HandleShotUpdates () (at <cea3d8bbf8db410eae38b0de58bacb1a>:0)
Arcen.AIW2.ExternalVisualization.BattlefieldVisualSingleton.RunPlanetUpdateTree () (at <cea3d8bbf8db410eae38b0de58bacb1a>:0)
Arcen.AIW2.ExternalVisualization.BattlefieldVisualSingleton.RunUpdate () (at <cea3d8bbf8db410eae38b0de58bacb1a>:0)
ArcenMainGameVisuals.Update () (at <ecf94ce1133449a796462ab165ab5877>:0)



8/27/2018 2:04:32 AM (0.760) Mem: 449,839,104 Mode: Host Plat:WindowsPlayer
-----------------------------------ErrorsReportedByEngine-----------------------------------
-----------
NullReferenceException: Object reference not set to an instance of an object
Stack Trace: Arcen.AIW2.External.MinorFactionObjectivesGenerator.GenerateDysonSphereObjectives () (at <5754df64ddcf45bca9b0fe27f8a9d5b4>:0)
Arcen.AIW2.External.MinorFactionObjectivesGenerator.CheckForMinorFactionObjectives () (at <5754df64ddcf45bca9b0fe27f8a9d5b4>:0)
Arcen.AIW2.External.CoreObjectiveGenerator.Generate (Arcen.AIW2.Core.ArcenSimContext Context) (at <5754df64ddcf45bca9b0fe27f8a9d5b4>:0)
Arcen.AIW2.Core.ObjectiveGeneratorTable.RegenerateAllObjectives (Arcen.AIW2.Core.ArcenSimContext Context) (at <b71e79e8e1b640a3b4dfb1291aa01086>:0)
Arcen.AIW2.Core.Engine_AIW2.PerSecondNonSimUpdates () (at <b71e79e8e1b640a3b4dfb1291aa01086>:0)
Arcen.AIW2.Core.Engine_AIW2.OnUpdate () (at <b71e79e8e1b640a3b4dfb1291aa01086>:0)
Arcen.Universal.Engine_Universal.OnUpdateFromMainThread () (at <f9a4af1269cd477d862cbff9133e2c2f>:0)
ArcenGameController.Update () (at <842479ce6add45908b4aec5159717064>:0)



8/28/2018 10:54:01 PM (0.761) Mem: 314,294,272 Mode: Host Plat:WindowsPlayer
-----------------------------------ErrorsReportedByEngine-----------------------------------
-----------
NullReferenceException: Object reference not set to an instance of an object
Stack Trace: Arcen.AIW2.External.MinorFactionObjectivesGenerator.GenerateDysonSphereObjectives () (at <126bb15f4e914b599c46d19d1b0e91c7>:0)
Arcen.AIW2.External.MinorFactionObjectivesGenerator.CheckForMinorFactionObjectives () (at <126bb15f4e914b599c46d19d1b0e91c7>:0)
Arcen.AIW2.External.CoreObjectiveGenerator.Generate (Arcen.AIW2.Core.ArcenSimContext Context) (at <126bb15f4e914b599c46d19d1b0e91c7>:0)
Arcen.AIW2.Core.ObjectiveGeneratorTable.RegenerateAllObjectives (Arcen.AIW2.Core.ArcenSimContext Context) (at <e16e8b1139c2447b9c2066f8ab75566d>:0)
Arcen.AIW2.Core.Engine_AIW2.PerSecondNonSimUpdates () (at <e16e8b1139c2447b9c2066f8ab75566d>:0)
Arcen.AIW2.Core.Engine_AIW2.OnUpdate () (at <e16e8b1139c2447b9c2066f8ab75566d>:0)
Arcen.Universal.Engine_Universal.OnUpdateFromMainThread () (at <f9a4af1269cd477d862cbff9133e2c2f>:0)
ArcenGameController.Update () (at <842479ce6add45908b4aec5159717064>:0)



8/29/2018 2:38:36 AM (0.761) Mem: 344,981,504 Mode: Host Plat:WindowsPlayer
-----------------------------------ErrorsReportedByEngine-----------------------------------
-----------
NullReferenceException: Object reference not set to an instance of an object
Stack Trace: Arcen.AIW2.External.MinorFactionObjectivesGenerator.GenerateDysonSphereObjectives () (at <126bb15f4e914b599c46d19d1b0e91c7>:0)
Arcen.AIW2.External.MinorFactionObjectivesGenerator.CheckForMinorFactionObjectives () (at <126bb15f4e914b599c46d19d1b0e91c7>:0)
Arcen.AIW2.External.CoreObjectiveGenerator.Generate (Arcen.AIW2.Core.ArcenSimContext Context) (at <126bb15f4e914b599c46d19d1b0e91c7>:0)
Arcen.AIW2.Core.ObjectiveGeneratorTable.RegenerateAllObjectives (Arcen.AIW2.Core.ArcenSimContext Context) (at <e16e8b1139c2447b9c2066f8ab75566d>:0)
Arcen.AIW2.Core.Engine_AIW2.PerSecondNonSimUpdates () (at <e16e8b1139c2447b9c2066f8ab75566d>:0)
Arcen.AIW2.Core.Engine_AIW2.OnUpdate () (at <e16e8b1139c2447b9c2066f8ab75566d>:0)
Arcen.Universal.Engine_Universal.OnUpdateFromMainThread () (at <f9a4af1269cd477d862cbff9133e2c2f>:0)
ArcenGameController.Update () (at <842479ce6add45908b4aec5159717064>:0)



8/29/2018 5:01:43 PM (0.762) Mem: 495,915,008 Mode: Host Plat:WindowsPlayer
-----------------------------------ErrorsReportedByEngine-----------------------------------
-----------
NullReferenceException: Object reference not set to an instance of an object
Stack Trace: Arcen.AIW2.External.MinorFactionObjectivesGenerator.GenerateDysonSphereObjectives () (at <7207c5b11e9a4e9cafba4715ac530ee2>:0)
Arcen.AIW2.External.MinorFactionObjectivesGenerator.CheckForMinorFactionObjectives () (at <7207c5b11e9a4e9cafba4715ac530ee2>:0)
Arcen.AIW2.External.CoreObjectiveGenerator.Generate (Arcen.AIW2.Core.ArcenSimContext Context) (at <7207c5b11e9a4e9cafba4715ac530ee2>:0)
Arcen.AIW2.Core.ObjectiveGeneratorTable.RegenerateAllObjectives (Arcen.AIW2.Core.ArcenSimContext Context) (at <2da4acd4ed2245d69d97df9346163c64>:0)
Arcen.AIW2.Core.Engine_AIW2.PerSecondNonSimUpdates () (at <2da4acd4ed2245d69d97df9346163c64>:0)
Arcen.AIW2.Core.Engine_AIW2.OnUpdate () (at <2da4acd4ed2245d69d97df9346163c64>:0)
Arcen.Universal.Engine_Universal.OnUpdateFromMainThread () (at <4ad3f95e566948d79f3f508c8be56fe2>:0)
ArcenGameController.Update () (at <842479ce6add45908b4aec5159717064>:0)



8/30/2018 12:20:40 AM (0.762) Mem: 368,369,664 Mode: Host Plat:WindowsPlayer
-----------------------------------ErrorsReportedByEngine-----------------------------------
-----------
NullReferenceException: Object reference not set to an instance of an object
Stack Trace: Arcen.AIW2.External.MinorFactionObjectivesGenerator.GenerateDysonSphereObjectives () (at <7207c5b11e9a4e9cafba4715ac530ee2>:0)
Arcen.AIW2.External.MinorFactionObjectivesGenerator.CheckForMinorFactionObjectives () (at <7207c5b11e9a4e9cafba4715ac530ee2>:0)
Arcen.AIW2.External.CoreObjectiveGenerator.Generate (Arcen.AIW2.Core.ArcenSimContext Context) (at <7207c5b11e9a4e9cafba4715ac530ee2>:0)
Arcen.AIW2.Core.ObjectiveGeneratorTable.RegenerateAllObjectives (Arcen.AIW2.Core.ArcenSimContext Context) (at <2da4acd4ed2245d69d97df9346163c64>:0)
Arcen.AIW2.Core.Engine_AIW2.PerSecondNonSimUpdates () (at <2da4acd4ed2245d69d97df9346163c64>:0)
Arcen.AIW2.Core.Engine_AIW2.OnUpdate () (at <2da4acd4ed2245d69d97df9346163c64>:0)
Arcen.Universal.Engine_Universal.OnUpdateFromMainThread () (at <4ad3f95e566948d79f3f508c8be56fe2>:0)
ArcenGameController.Update () (at <842479ce6add45908b4aec5159717064>:0)



ErrorsReportedByEngine.txt (8,813 bytes)   

BadgerBadger

Aug 30, 2018 9:19 am

manager   ~0048582

There are a decent number of actual bugs/things that need investigation in this log. Nothing that obviously suggests threading issues (they all seem to be issues in the Vis-related stuff rather than Sim-related stuff.

-----------
NullReferenceException: Object reference not set to an instance of an object
Stack Trace: Arcen.AIW2.External.MinorFactionObjectivesGenerator.GenerateDysonSphereObjectives () (at <126bb15f4e914b599c46d19d1b0e91c7>:0)
Arcen.AIW2.External.MinorFactionObjectivesGenerator.CheckForMinorFactionObjectives () (at <126bb15f4e914b599c46d19d1b0e91c7>:0)
Arcen.AIW2.External.CoreObjectiveGenerator.Generate (Arcen.AIW2.Core.ArcenSimContext Context) (at <126bb15f4e914b599c46d19d1b0e91c7>:0)
Arcen.AIW2.Core.ObjectiveGeneratorTable.RegenerateAllObjectives (Arcen.AIW2.Core.ArcenSimContext Context) (at <e16e8b1139c2447b9c2066f8ab75566d>:0)
Arcen.AIW2.Core.Engine_AIW2.PerSecondNonSimUpdates () (at <e16e8b1139c2447b9c2066f8ab75566d>:0)
Arcen.AIW2.Core.Engine_AIW2.OnUpdate () (at <e16e8b1139c2447b9c2066f8ab75566d>:0)
Arcen.Universal.Engine_Universal.OnUpdateFromMainThread () (at <f9a4af1269cd477d862cbff9133e2c2f>:0)
ArcenGameController.Update () (at <842479ce6add45908b4aec5159717064>:0)

also

8/28/2018 11:03:26 PM data.PerPlanet[42] is null
8/28/2018 11:04:04 PM data.PerPlanet[42] is null
8/28/2018 11:04:12 PM data.PerPlanet[42] is null
8/28/2018 11:04:20 PM data.PerPlanet[42] is null
8/28/2018 11:04:23 PM data.PerPlanet[42] is null
8/28/2018 11:04:31 PM data.PerPlanet[42] is null
8/28/2018 11:04:33 PM data.PerPlanet[42] is null
8/28/2018 11:04:37 PM data.PerPlanet[42] is null
8/28/2018 11:04:38 PM data.PerPlanet[42] is null
8/28/2018 11:04:41 PM data.PerPlanet[42] is null
8/28/2018 11:04:45 PM data.PerPlanet[42] is null
8/28/2018 11:11:02 PM data.PerPlanet[42] is null

Exception in entity tooltip text generation at stage 5000:System.InvalidCastException: Specified cast is not valid.
  at Arcen.AIW2.External.HarvesterDescriptionAppender.AddToDescriptionBuffer (Arcen.AIW2.Core.GameEntity RelatedEntityOrNull, Arcen.AIW2.Core.GameEntityTypeData RelatedEntityTypeData, Arcen.Universal.ArcenDoubleCharacterBuffer Buffer) [0x00029] in <126bb15f4e914b599c46d19d1b0e91c7>:0
  at Arcen.AIW2.External.Window_InGameHoverEntityInfo.GetTextForEntity (Arcen.Universal.ArcenDoubleCharacterBuffer buffer, Arcen.AIW2.Core.GameEntity EntityBase, Arcen.AIW2.Core.GameEntityTypeData TypeDataBase, System.Boolean IsFromSidebar, System.Boolean IsForEmbeddingInAnotherEntity) [0x03dcd] in <126bb15f4e914b599c46d19d1b0e91c7>:0


8/29/2018 2:17:52 PM Welcome to the D18 Swirl generator

8/29/2018 2:26:48 PM Planet Istvan add an additional 20 from controlling. fromWarpGate 5 fromCommandStation 15

Chris_McElligottPark

Aug 30, 2018 10:15 am

administrator   ~0048590

This log is a treasure trove!

The one from GenerateDysonSphereObjectives is something that I fixed in build 0.763. It was an array that can wind up having stale data in it after being in one game and then loading into another (same one or otherwise).

The GameCommand_ModderCommand.Execute issue I fixed in 0.762, I think, and it could have easily stalled the sim. But that may have been from an older session than this report.

These are newer, but fixed it today thanks to this report log:
--------------------------------------------------------

* Fixed a nullref that could happen in the nanocaust notification display.

* Put in better protection and notification for a nullref that could happen in GenerateDysonSphereObjectives.

* There is now a better check in findAIKing in the nanocaust function where it will throw a visible error if it can't find an AI king and the game is still going on. If the game is already won, then it just says nothing because that's A-OK.

* There is now a better check in findAIKing in the nanocaust function where it will throw a visible error if it can't find an AI king and the game is still going on. If the game is already won, then it just says nothing because that's A-OK.
** Similar logic is now in place for dead humans.

* If the player has lost and there is no human king planet, the nanocaust now properly routes randomly.

* The "BUG: nanocaustInfectedPlanet, the planet passed in is null somehow" now will give line numbers if it gets triggered, since it is potentially a problem.
** That said, several cases that could lead to that branch have now been fixed, as they mostly revolved around valid missing targets and needing to find a random target.

* It appears that the warning "Could not unlock ship line: [whatever] because it was already unlocked!" was being triggered because of duplicate claim calls to ARS units. That should now be fixed so that it doesn't throw the spurious error.

* A protection has been put in place to prevent ShipsDying from getting the same ship in it twice in the vis layer. This may not have even been a concern, but because of "MINOR BUG: ship killed is already on Dying list" popping up, it was worth looking at.
** "BUG: ship killed is not part of target squad." is still on the loose, though, but quite rare.

* The big scary message of "During placement: Command station already here and placing command station!" is now replaced by a log-style message on the side, instead, like other non-bug-based error messages during placement.

And I am still going through the log.

Chris_McElligottPark

Aug 30, 2018 10:40 am

administrator   ~0048591

Okay... I'm going to mark this ticket as solved, because there were so very many errors coming from this log via the minor factions that I can't help but think that the secondary threads may have been in an invalid state. When these sort of exceptions happen, it's hard to know what the state of the game is going to be until the whole program is restarted, so I'm not inclined to think that background threads are misbehaving at this time. If we see similar evidence again, but in an absence of strange errors in the log, then we'll definitely be on to something.

As it is, I think the modder command null thing might have made the entire sim halt, but it might have been one of the others, too.

Here are the last fixes from this:

* Put in better logic that will show us what is really going on when you try to hover over a macrophage harvester whose special faction doesn't have the proper implementation type: it will say what the faction and implementation type actually is as an error in the tooltip, now.
** This was the "System.InvalidCastException: Specified cast is not valid" in Arcen.AIW2.External.HarvesterDescriptionAppender.

* Fixed the "data.PerPlanet[X] is null" error from the Dark Spire, which was essentially a race condition and something that we could work around easily once we knew it was there.
** This may have been something that interfered with background thread execution, but it's hard to be sure. Most likely it was not.

* Fixed the "BUG: Harvester on [X] has null hdata" issue, which has a less-clear cause but probably was also a race condition of some sort.
** At any rate, simply lazy-initializing this data is harmless and solves the problem, since there is no important data in MacrophagePerHarvesterData that can't be initialized at the time it is needed.

Thank you SO much, HeartHunter7!

HeartHunter7

Aug 30, 2018 11:45 am

reporter   ~0048597

lol, you are welcome.

Issue History

Date Modified Username Field Change
Aug 29, 2018 12:40 pm HeartHunter7 New Issue
Aug 29, 2018 12:40 pm HeartHunter7 File Added: 20180829194000_1.jpg
Aug 29, 2018 12:40 pm HeartHunter7 File Added: spire bug.save
Aug 29, 2018 12:40 pm HeartHunter7 File Added: spire bug.savemet
Aug 29, 2018 1:16 pm BadgerBadger Assigned To => BadgerBadger
Aug 29, 2018 1:16 pm BadgerBadger Status new => assigned
Aug 29, 2018 3:10 pm BadgerBadger Note Added: 0048508
Aug 29, 2018 4:48 pm BadgerBadger Note Edited: 0048508
Aug 29, 2018 4:53 pm BadgerBadger Note Edited: 0048508
Aug 29, 2018 5:20 pm HeartHunter7 Note Added: 0048530
Aug 29, 2018 5:22 pm HeartHunter7 File Added: 20180830002142_1.jpg
Aug 29, 2018 8:44 pm Chris_McElligottPark Note Added: 0048565
Aug 30, 2018 6:53 am HeartHunter7 File Added: ArcenDebugLog.txt
Aug 30, 2018 6:53 am HeartHunter7 File Added: ErrorsReportedByEngine.txt
Aug 30, 2018 9:19 am BadgerBadger Note Added: 0048582
Aug 30, 2018 10:15 am Chris_McElligottPark Note Added: 0048590
Aug 30, 2018 10:40 am Chris_McElligottPark Assigned To BadgerBadger => Chris_McElligottPark
Aug 30, 2018 10:40 am Chris_McElligottPark Status assigned => resolved
Aug 30, 2018 10:40 am Chris_McElligottPark Resolution open => fixed
Aug 30, 2018 10:40 am Chris_McElligottPark Fixed in Version => 0.764 Mercenary Surge
Aug 30, 2018 10:40 am Chris_McElligottPark Note Added: 0048591
Aug 30, 2018 11:45 am HeartHunter7 Note Added: 0048597