Jump to content

Version 2.16 - Crash during missions - Laser or TU related


JamesWa

Recommended Posts

Hi All,

Posting a bug I've encountered, managed to get a stacktrace by enabling logging on log4net and outputting VStudio

It seems that if TUs reaches 100+ (I have one character at 102 TUs and another at 100 TUs). I've managed to replicate this by having them both using laser weapons after researching laser ammo renewal. If I use anything other than Laser in mission the crash doesn't occur.

I managed to get this down to Xenonauts.GroundCombat.Abilities.RegenerateAmmoAbility - but only going by the header I can't tell if this is related to Laser as TU seems to be called just before RegenerateAmmoAbility is called and I can't step into (no breakpoints). Although if I hold TU and force it lower, it seems to work OK. Or if I go for NULL value on TU it seems to go over 99 (100) as it seems to count 0. My best guess the number is rolling over in some way on the new round with 100+ being bigger than 99 causing the lockup.

Output:

(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

Disposing: 0 animation(s), 4 screen(s)

NullReferenceException: [INITIAL CRASH] - A fatal error occurred during Update[] - Object reference not set to an instance of an object
     Context:  
 - Object reference not set to an instance of an object
  at Artitas.Entity.DeltaShots (Single valueDelta) [0x00000] in <filename unknown>:0 
  at Xenonauts.GroundCombat.Abilities.RegenerateAmmoAbility.<Create>m__3 (Common.RPG.AbilityState state, IEventEffect`1 effect, Common.FSM.Systems.PhaseStepReport`2 report) [0x00000] in <filename unknown>:0 
  at Common.RPG.DelegateEventEffect`2[Common.RPG.AbilityState,Common.FSM.Systems.PhaseStepReport`2[Xenonauts.GroundCombat.GCPhases+RoundEnd,Common.FSM.Systems.Steps+Begin]].Apply (Common.RPG.AbilityState state, IEvent event) [0x00000] in <filename unknown>:0 
  at Common.RPG.AbilityState.ExecuteEventEffects (IEvent event) [0x00000] in <filename unknown>:0 
  at Common.RPG.AbilityState.Execute (IEvent event) [0x00000] in <filename unknown>:0 
  at Common.RPG.AbilitySystem.DelegateToAbilities (IEvent trigger) [0x00000] in <filename unknown>:0 
  at Common.RPG.AbilitySystem.Handle (IEvent trigger) [0x00000] in <filename unknown>:0 
  at Artitas.DebugProcessStrategy.ProcessEvent (IEvent queuedEvent) [0x00000] in <filename unknown>:0 
  at Artitas.World.HandleEvent[IPhaseStepReport] (IPhaseStepReport event) [0x00000] in <filename unknown>:0 
  at Common.FSM.Systems.PhasedFSMSystem`2[TPhase,TComponent].ProcessStep (Transition transition, System.Object[] parameters) [0x00000] in <filename unknown>:0 
  at Stateless.StateMachine`2+StateRepresentation+<AddEntryAction>c__AnonStorey1[Common.FSM.Systems.IStep,Common.FSM.Systems.PhaseStepTrigger].<>m__0 (IStep state, Transition t, System.Object[] args) [0x00000] in <filename unknown>:0 
  at Stateless.StateMachine`2+StateRepresentation[Common.FSM.Systems.IStep,Common.FSM.Systems.PhaseStepTrigger].ExecuteEntryActions (Transition transition, System.Object[] entryArgs) [0x00000] in <filename unknown>:0 
  at Stateless.StateMachine`2+StateRepresentation[Common.FSM.Systems.IStep,Common.FSM.Systems.PhaseStepTrigger].Enter (Transition transition, System.Object[] entryArgs) [0x00000] in <filename unknown>:0 
  at Stateless.StateMachine`2[Common.FSM.Systems.IStep,Common.FSM.Systems.PhaseStepTrigger].InternalFire (PhaseStepTrigger trigger, System.Object[] args) [0x00000] in <filename unknown>:0 
  at Common.FSM.Systems.PhasedFSMSystem`2[TPhase,TComponent].HandleNextStep () [0x00000] in <filename unknown>:0 
  at Common.FSM.Systems.PhasedFSMSystem`2[TPhase,TComponent].HandleDeltaTimeUpdate (Artitas.Events.DeltaTimeEvent report) [0x00000] in <filename unknown>:0 
  at (wrapper delegate-invoke) System.Action`2<Xenonauts.GroundCombat.GroundCombatLogicSystem, Artitas.Events.DeltaTimeEvent>:invoke_void__this___GroundCombatLogicSystem_DeltaTimeEvent (Xenonauts.GroundCombat.GroundCombatLogicSystem,Artitas.Events.DeltaTimeEvent)
  at Artitas.Core.Utils.ExpressionUtil+<ActionFromMethodInfoFactory>c__AnonStorey1`4[Artitas.Systems.EventSystem,Artitas.Events.DeltaTimeEvent,Xenonauts.GroundCombat.GroundCombatLogicSystem,Artitas.IEvent].<>m__0 (Artitas.Systems.EventSystem target, IEvent param) [0x00000] in <filename unknown>:0 
  at Artitas.Systems.EventSystem.HandleSubscribers (IEvent event) [0x00000] in <filename unknown>:0 
  at Artitas.Systems.EventSystem.Handle (IEvent event) [0x00000] in <filename unknown>:0 
  at Artitas.DebugProcessStrategy.ProcessEvent (IEvent queuedEvent) [0x00000] in <filename unknown>:0 
  at Artitas.DefaultProcessStrategy.Process () [0x00000] in <filename unknown>:0 
  at Artitas.DebugProcessStrategy.Process () [0x00000] in <filename unknown>:0 
  at Artitas.World.Process () [0x00000] in <filename unknown>:0 
  at Common.Screens.DataStructures.WorldManagedScreen`2[Xenonauts.GameScreens,Common.Screens.DataStructures.IScreenParameters].Update (Single deltaTime) [0x00000] in <filename unknown>:0 
  at Common.Screens.ScreenManager`1[Xenonauts.GameScreens].Update (Single deltaTime) [0x00000] in <filename unknown>:0 
  at Xenonauts.XenonautsMain.Update () [0x00000] in <filename unknown>:0 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
Common.Logging.UnityLogAppender:Append(LoggingEvent)
log4net.Appender.AppenderSkeleton:DoAppend(LoggingEvent)
log4net.Util.AppenderAttachedImpl:AppendLoopOnAppenders(LoggingEvent)
log4net.Repository.Hierarchy.Logger:CallAppenders(LoggingEvent)
log4net.Repository.Hierarchy.Logger:ForcedLog(Type, Level, Object, Exception)
log4net.Repository.Hierarchy.Logger:Log(Type, Level, Object, Exception)
log4net.Core.LogImpl:Fatal(Object, Exception)
Xenonauts.XenonautsMain:OnApplicationQuit()
 
(Filename:  Line: -1)

Setting up 8 worker threads for Enlighten.
  Thread -> id: 300c -> priority: 1 
  Thread -> id: 2394 -> priority: 1 
  Thread -> id: 3104 -> priority: 1 
  Thread -> id: 2584 -> priority: 1 
  Thread -> id: 1fc4 -> priority: 1 
  Thread -> id: 33d8 -> priority: 1 
  Thread -> id: 2a88 -> priority: 1 
  Thread -> id: 37a0 -> priority: 1 

Link to comment
Share on other sites

Huh, I believe I may have encountered this one before, but it went away after I did a clean install.

In my instance, it was crashing after taking a turn right before going back to my control. I had had a look at the log the game generated, and it was also saying that within the update function there was a null object it was trying to update.

Link to comment
Share on other sites

2 hours ago, JamesWa said:

Hi All,

Posting a bug I've encountered, managed to get a stacktrace by enabling logging on log4net and outputting VStudio

It seems that if TUs reaches 100+ (I have one character at 102 TUs and another at 100 TUs). I've managed to replicate this by having them both using laser weapons after researching laser ammo renewal. If I use anything other than Laser in mission the crash doesn't occur.

I managed to get this down to Xenonauts.GroundCombat.Abilities.RegenerateAmmoAbility - but only going by the header I can't tell if this is related to Laser as TU seems to be called just before RegenerateAmmoAbility is called and I can't step into (no breakpoints). Although if I hold TU and force it lower, it seems to work OK. Or if I go for NULL value on TU it seems to go over 99 (100) as it seems to count 0. My best guess the number is rolling over in some way on the new round with 100+ being bigger than 99 causing the lockup.

Output:

(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

Disposing: 0 animation(s), 4 screen(s)

NullReferenceException: [INITIAL CRASH] - A fatal error occurred during Update[] - Object reference not set to an instance of an object
     Context:  
 - Object reference not set to an instance of an object
  at Artitas.Entity.DeltaShots (Single valueDelta) [0x00000] in <filename unknown>:0 
  at Xenonauts.GroundCombat.Abilities.RegenerateAmmoAbility.<Create>m__3 (Common.RPG.AbilityState state, IEventEffect`1 effect, Common.FSM.Systems.PhaseStepReport`2 report) [0x00000] in <filename unknown>:0 
  at Common.RPG.DelegateEventEffect`2[Common.RPG.AbilityState,Common.FSM.Systems.PhaseStepReport`2[Xenonauts.GroundCombat.GCPhases+RoundEnd,Common.FSM.Systems.Steps+Begin]].Apply (Common.RPG.AbilityState state, IEvent event) [0x00000] in <filename unknown>:0 
  at Common.RPG.AbilityState.ExecuteEventEffects (IEvent event) [0x00000] in <filename unknown>:0 
  at Common.RPG.AbilityState.Execute (IEvent event) [0x00000] in <filename unknown>:0 
  at Common.RPG.AbilitySystem.DelegateToAbilities (IEvent trigger) [0x00000] in <filename unknown>:0 
  at Common.RPG.AbilitySystem.Handle (IEvent trigger) [0x00000] in <filename unknown>:0 
  at Artitas.DebugProcessStrategy.ProcessEvent (IEvent queuedEvent) [0x00000] in <filename unknown>:0 
  at Artitas.World.HandleEvent[IPhaseStepReport] (IPhaseStepReport event) [0x00000] in <filename unknown>:0 
  at Common.FSM.Systems.PhasedFSMSystem`2[TPhase,TComponent].ProcessStep (Transition transition, System.Object[] parameters) [0x00000] in <filename unknown>:0 
  at Stateless.StateMachine`2+StateRepresentation+<AddEntryAction>c__AnonStorey1[Common.FSM.Systems.IStep,Common.FSM.Systems.PhaseStepTrigger].<>m__0 (IStep state, Transition t, System.Object[] args) [0x00000] in <filename unknown>:0 
  at Stateless.StateMachine`2+StateRepresentation[Common.FSM.Systems.IStep,Common.FSM.Systems.PhaseStepTrigger].ExecuteEntryActions (Transition transition, System.Object[] entryArgs) [0x00000] in <filename unknown>:0 
  at Stateless.StateMachine`2+StateRepresentation[Common.FSM.Systems.IStep,Common.FSM.Systems.PhaseStepTrigger].Enter (Transition transition, System.Object[] entryArgs) [0x00000] in <filename unknown>:0 
  at Stateless.StateMachine`2[Common.FSM.Systems.IStep,Common.FSM.Systems.PhaseStepTrigger].InternalFire (PhaseStepTrigger trigger, System.Object[] args) [0x00000] in <filename unknown>:0 
  at Common.FSM.Systems.PhasedFSMSystem`2[TPhase,TComponent].HandleNextStep () [0x00000] in <filename unknown>:0 
  at Common.FSM.Systems.PhasedFSMSystem`2[TPhase,TComponent].HandleDeltaTimeUpdate (Artitas.Events.DeltaTimeEvent report) [0x00000] in <filename unknown>:0 
  at (wrapper delegate-invoke) System.Action`2<Xenonauts.GroundCombat.GroundCombatLogicSystem, Artitas.Events.DeltaTimeEvent>:invoke_void__this___GroundCombatLogicSystem_DeltaTimeEvent (Xenonauts.GroundCombat.GroundCombatLogicSystem,Artitas.Events.DeltaTimeEvent)
  at Artitas.Core.Utils.ExpressionUtil+<ActionFromMethodInfoFactory>c__AnonStorey1`4[Artitas.Systems.EventSystem,Artitas.Events.DeltaTimeEvent,Xenonauts.GroundCombat.GroundCombatLogicSystem,Artitas.IEvent].<>m__0 (Artitas.Systems.EventSystem target, IEvent param) [0x00000] in <filename unknown>:0 
  at Artitas.Systems.EventSystem.HandleSubscribers (IEvent event) [0x00000] in <filename unknown>:0 
  at Artitas.Systems.EventSystem.Handle (IEvent event) [0x00000] in <filename unknown>:0 
  at Artitas.DebugProcessStrategy.ProcessEvent (IEvent queuedEvent) [0x00000] in <filename unknown>:0 
  at Artitas.DefaultProcessStrategy.Process () [0x00000] in <filename unknown>:0 
  at Artitas.DebugProcessStrategy.Process () [0x00000] in <filename unknown>:0 
  at Artitas.World.Process () [0x00000] in <filename unknown>:0 
  at Common.Screens.DataStructures.WorldManagedScreen`2[Xenonauts.GameScreens,Common.Screens.DataStructures.IScreenParameters].Update (Single deltaTime) [0x00000] in <filename unknown>:0 
  at Common.Screens.ScreenManager`1[Xenonauts.GameScreens].Update (Single deltaTime) [0x00000] in <filename unknown>:0 
  at Xenonauts.XenonautsMain.Update () [0x00000] in <filename unknown>:0 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
Common.Logging.UnityLogAppender:Append(LoggingEvent)
log4net.Appender.AppenderSkeleton:DoAppend(LoggingEvent)
log4net.Util.AppenderAttachedImpl:AppendLoopOnAppenders(LoggingEvent)
log4net.Repository.Hierarchy.Logger:CallAppenders(LoggingEvent)
log4net.Repository.Hierarchy.Logger:ForcedLog(Type, Level, Object, Exception)
log4net.Repository.Hierarchy.Logger:Log(Type, Level, Object, Exception)
log4net.Core.LogImpl:Fatal(Object, Exception)
Xenonauts.XenonautsMain:OnApplicationQuit()
 
(Filename:  Line: -1)

Setting up 8 worker threads for Enlighten.
  Thread -> id: 300c -> priority: 1 
  Thread -> id: 2394 -> priority: 1 
  Thread -> id: 3104 -> priority: 1 
  Thread -> id: 2584 -> priority: 1 
  Thread -> id: 1fc4 -> priority: 1 
  Thread -> id: 33d8 -> priority: 1 
  Thread -> id: 2a88 -> priority: 1 
  Thread -> id: 37a0 -> priority: 1 


Thanks for the bug report, and going through the trouble of getting a stacktrace!

The bug does seem related to laser (specifically advanced laser as only that category of weapons regenerate ammo), do you have the save file for this campaign? If you're playing on experimental the game will also write on the output.log file on runtime so that would also be of great help to us!

The .json save file is located at Documents/My Games/Xenonauts 2/Saves, the output.log file is located in Xenonauts2/Logs (same directory as Saves), if you could upload your save file here we'd appreciate that a lot!

Link to comment
Share on other sites

28 minutes ago, Avaren said:

Huh, I believe I may have encountered this one before, but it went away after I did a clean install.

In my instance, it was crashing after taking a turn right before going back to my control. I had had a look at the log the game generated, and it was also saying that within the update function there was a null object it was trying to update.

If you got a crash on groundcombat, we'd like to take a look at your save and output.log file too, thanks!

Link to comment
Share on other sites

13 hours ago, Kouki said:

If you got a crash on groundcombat, we'd like to take a look at your save and output.log file too, thanks!

Please note that before doing a clean install I was constantly getting a crash on this part (Iron-Man so couldn't progress).
I thought it was prob something to do with my files when the clean install fixed it.

Luckily, I found the log. (The save I had copied with the intention of sharing before I managed to get past it)

output.log iron_man-416.json

Link to comment
Share on other sites

On 12/9/2023 at 4:33 AM, Avaren said:

Please note that before doing a clean install I was constantly getting a crash on this part (Iron-Man so couldn't progress).
I thought it was prob something to do with my files when the clean install fixed it.

Luckily, I found the log. (The save I had copied with the intention of sharing before I managed to get past it)

output.log 3.16 MB · 1 download iron_man-416.json 2.87 MB · 1 download

Thanks, when does the crash exactly happen? I tried loading the save and ending the turn and it doesn't seem to crash on my end

Link to comment
Share on other sites

3 hours ago, Kouki said:

Thanks, when does the crash exactly happen? I tried loading the save and ending the turn and it doesn't seem to crash on my end

When it was doing it, the crash would happen (as far as I can tell) just before it would pass control back to the player (after the enemy and friendly npc turns).
However, as I said the bug disappeared after I did a clean install and I couldn't reproduce it again, which was why I didn't report it.

EDIT: the now attached file was saved to the same location as the output log file and was "last modified" four minutes before said output file, so should be from one of my attempts to get past the turn.

resolve_layers.log

Edited by Avaren
Adding more info
Link to comment
Share on other sites

4 hours ago, Avaren said:

When it was doing it, the crash would happen (as far as I can tell) just before it would pass control back to the player (after the enemy and friendly npc turns).
However, as I said the bug disappeared after I did a clean install and I couldn't reproduce it again, which was why I didn't report it.

EDIT: the now attached file was saved to the same location as the output log file and was "last modified" four minutes before said output file, so should be from one of my attempts to get past the turn.

resolve_layers.log 8.53 MB · 0 downloads

Thanks. I think we've identified the crash now - it's linked to reloading an advanced laser weapon. We're working on a fix.

(The "resolve_layers" file isn't something we need though, that's something that we use when a map isn't loading for some reason. The saves and the output.log are the critical things we need!)

Link to comment
Share on other sites

58 minutes ago, Chris said:

Thanks. I think we've identified the crash now - it's linked to reloading an advanced laser weapon. We're working on a fix.

(The "resolve_layers" file isn't something we need though, that's something that we use when a map isn't loading for some reason. The saves and the output.log are the critical things we need!)

I just put it in there because I saw it was generated around the same time.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...