View Issue Details
|ID||Project||Category||Date Submitted||Last Update|
|0023319||AI War 2||[All Projects] Crash/Exception||Jun 19, 2020 11:39 am||Jun 22, 2020 4:41 pm|
|Reporter||Lord Of Nothing||Assigned To||x4000Bughunter|
|Product Version||Beta 2.076 Hotfix|
|Fixed in Version||Beta 2.077 No More Shot Errors|
|Summary||0023319: Repeating Div/0 exception, hunter fleet. (Modded game)|
|Description||Just had a regularly repeating div/0 exception in my current game. Modded, but it shouldn't affect this and I haven't touched the mod in a while.|
The save is after the first few error in the debug log, but if you let it run more occur, one per 10 seconds. It started a minute or two after I finished hacking the nanocaust- don't know if that's related.
Modified file attached so save can be loaded if necessary.
|Tags||No tags attached.|
Re-attached files as they failed to upload again.
Regular div0 exceptions.save (1,611,813 bytes)
TSR_Ships_LON_MoreSpire.xml (30,520 bytes)
Regular div0 exceptions.savemet (93 bytes)
ArcenDebugLog.txt (327,354 bytes)
Can you upload the ArcenDebugLog.txt?
Edit: your post and my post crossed
||Should be there. (I did notice that unfortunately, the shot position save errors have overwritten the first occurrences, but the later ones are there and they seemed the same.)|
Badger, this is interesting:
6/19/2020 4:36:40 PM BUG: somehow this ai faction has no allies, not even including itself
6/19/2020 4:36:45 PM BUG: somehow this ai faction has no allies, not even including itself
And then the real error:
Error in thread for execution context 'executionContext'
Attempted to divide by zero.
===STACK FRAMES (with file info)===
FILE METHOD IL_OFFSET NATIVE_OFFSET LINE_NUMBER COLUMN_NUMBER
op_Division 1 29 0 0
DoPerSecondLogic_Stage3Main_OnMainThreadAndPartOfSim 603 2250 0 0
<DoWorldSecondLogic_FromSimBGThread>b__2 1 55 0 0
DoForFactions 18 107 0 0
DoWorldSecondLogic_FromSimBGThread 102 738 0 0
DoWorld_Second_PerSecondLogic 101 386 0 0
DoWorldStepLogic_FromSimBGThread 116 322 0 0
Execute 186 487 0 0
===RAW STACK TRACE===
at Arcen.Universal.FInt.op_Division (Arcen.Universal.FInt one, System.Int32 divisor) [0x00001] in <057c6a5f32ef4ffa9278647b79242e97>:0
at Arcen.AIW2.External.SpecialFaction_HunterFleet.DoPerSecondLogic_Stage3Main_OnMainThreadAndPartOfSim (Arcen.AIW2.Core.Faction faction, Arcen.AIW2.Core.ArcenSimContext Context) [0x0025b] in <02609a0ec8704a1d85964f32552ec6f4>:0
at Arcen.AIW2.External.EntitySimLogicImplementation+<>c__DisplayClass58_0.<DoWorldSecondLogic_FromSimBGThread>b__2 (Arcen.AIW2.Core.Faction faction) [0x00001] in <02609a0ec8704a1d85964f32552ec6f4>:0
at Arcen.AIW2.Core.World_AIW2.DoForFactions (Arcen.AIW2.Core.Faction+ProcessorDelegate Processor) [0x00012] in <e7f8181a0165440496ef827dd433b4dd>:0
at Arcen.AIW2.External.EntitySimLogicImplementation.DoWorldSecondLogic_FromSimBGThread (Arcen.AIW2.Core.ArcenSimContext Context) [0x00066] in <02609a0ec8704a1d85964f32552ec6f4>:0
at Arcen.AIW2.External.EntitySimLogicImplementation.DoWorld_Second_PerSecondLogic (Arcen.AIW2.Core.ArcenSimContext Context) [0x00065] in <02609a0ec8704a1d85964f32552ec6f4>:0
at Arcen.AIW2.External.EntitySimLogicImplementation.DoWorldStepLogic_FromSimBGThread (Arcen.AIW2.Core.ArcenSimContext Context) [0x00074] in <02609a0ec8704a1d85964f32552ec6f4>:0
at Arcen.AIW2.External.SimExecution.Execute () [0x000ba] in <02609a0ec8704a1d85964f32552ec6f4>:0
This fixes nothing, but is a start:
* Split the hunter fleet stag 3 logic into several separate sub-methods so that we can more easily see where something is going wrong if there are exceptions that pop up.
||Just to let you know: The "BUG: somehow this ai faction has no allies, not even including itself" has been firing regularly for quite some time - I could see quite a lot of it on the debug log when I first looked at it when the first div/0 occurred, before the other stuff overwrote it.|
||I can duplicate the error, after setting up the mod so I can load this save.|
I have fixed the divide by zero exception, BUT there is a core thing wrong with this save with the hunter fleet having no allies, as noted above a bit. It looks like this was started on an older version of the game where we had the allegiance bugs, so I don't think there is anything for Badger to fix after all. This shouldn't happen in a freshly started campaign.
* Fixed a bug in the hunter fleet where if there were no allied AI factions it would get a divide by zero exception every 10 seconds or so.
** This should never be a case that actually happens, but that's a separate matter.
Would you mind if I distribute your mod as part of the game, but off by default? It's a very straightforward mod, and one that others may enjoy, and it should serve as a good example of how other modders could have their mods distributed this same way. It's a new feature I'm just adding in this version. If you make any updates or changes, that would be up to you and we'd just update the version that goes out with the game. But rather than hunting up your mod and installing it, people could just click on an option in the settings to turn it on.
Perfectly fine if the answer is no.
||I would not mind that at all, it would be absolutely fine with me. :)|
||I'm 95+% sure the version uploaded in this report here is my final version, but this definitely is: https://forums.arcengames.com/ai-war-ii-modding/spire-railgun-shop/|
||Sweet! This will be the first mod that is included by off-by-default, then!|
|Jun 19, 2020 11:39 am||Lord Of Nothing||New Issue|
|Jun 19, 2020 11:39 am||Lord Of Nothing||File Added: Regular div0 exceptions.save|
|Jun 19, 2020 11:39 am||Lord Of Nothing||File Added: Regular div0 exceptions.savemet|
|Jun 19, 2020 11:39 am||Lord Of Nothing||File Added: ArcenDebugLog.txt|
|Jun 19, 2020 11:39 am||Lord Of Nothing||File Added: TSR_Ships_LON_MoreSpire.xml|
|Jun 19, 2020 11:39 am||Lord Of Nothing||Note Added: 0057378|
|Jun 19, 2020 11:40 am||BadgerBadger||Note Added: 0057379|
|Jun 19, 2020 11:55 am||Lord Of Nothing||Note Added: 0057380|
|Jun 19, 2020 12:24 pm||x4000Bughunter||Note Added: 0057381|
|Jun 19, 2020 12:25 pm||x4000Bughunter||Note Added: 0057382|
|Jun 19, 2020 12:30 pm||x4000Bughunter||Note Added: 0057383|
|Jun 19, 2020 12:31 pm||Lord Of Nothing||Note Added: 0057384|
|Jun 19, 2020 12:33 pm||BadgerBadger||Note Edited: 0057379||View Revisions|
|Jun 19, 2020 12:42 pm||x4000Bughunter||Note Added: 0057385|
|Jun 19, 2020 12:48 pm||x4000Bughunter||Assigned To||=> BadgerBadger|
|Jun 19, 2020 12:48 pm||x4000Bughunter||Status||new => assigned|
|Jun 19, 2020 12:51 pm||x4000Bughunter||Assigned To||BadgerBadger => x4000Bughunter|
|Jun 19, 2020 12:51 pm||x4000Bughunter||Status||assigned => resolved|
|Jun 19, 2020 12:51 pm||x4000Bughunter||Resolution||open => fixed|
|Jun 19, 2020 12:51 pm||x4000Bughunter||Fixed in Version||=> Beta 2.077 No More Shot Errors|
|Jun 19, 2020 12:51 pm||x4000Bughunter||Note Added: 0057386|
|Jun 22, 2020 3:46 pm||x4000Bughunter||Note Added: 0057416|
|Jun 22, 2020 4:29 pm||Lord Of Nothing||Note Added: 0057417|
|Jun 22, 2020 4:31 pm||Lord Of Nothing||Note Added: 0057418|
|Jun 22, 2020 4:41 pm||x4000Bughunter||Note Added: 0057419|