njthomson / SrvSurvey

A new to help Commanders in planet based opperations
GNU General Public License v3.0
38 stars 1 forks source link

NullReferenceException "Object reference not set to an instance of an object." at 21/02/2024 18:57:48 +11:00 #67

Closed ariscop closed 9 months ago

ariscop commented 9 months ago

What happened?

Dropping from orbit to a guardian site when elite dangerous crashed

Not sure if elite crashed srvsurvey, or the other way around

Version

1.1.0.44

Exception message

Object reference not set to an instance of an object.

Exception stack

at SrvSurvey.game.SystemStatus.get_showPlotter() at SrvSurvey.Main.updateAllControls(Nullable`1 newMode) at SrvSurvey.Main.Game_modeChanged(GameMode newMode, Boolean force) at SrvSurvey.game.Game.setCurrentBody(String bodyName) at SrvSurvey.game.Game.initializeFromJournal(LoadGame loadEntry) at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid2[T0,T1](CallSite site, T0 arg0, T1 arg1) at SrvSurvey.game.Game.Journals_onJournalEntry(JournalEntry entry, Int32 index)

Relevant log output

{"part":1,"Odyssey":true,"gameversion":"4.0.0.1701","build":"r299332/r0 ","timestamp":"2024-02-21T07:52:05Z","event":"Fileheader"}
18:52:52: Loaded data from: C:\Users\Andrew\AppData\Roaming\SrvSurvey\SrvSurvey\1.1.0.0\guardian\F1935497\Col 173 Sector OE-P d6-11 C 2-ruins-1.json
18:52:52: Game.initSystemData: complete 'Col 173 Sector OE-P d6-11' (388652583259), bodyCount: 27
18:52:52: setCurrentBody by name: Col 173 Sector OE-P d6-11 C 2
18:52:52: Exception processing event 'LoadGame':
System.NullReferenceException: Object reference not set to an instance of an object.
   at SrvSurvey.game.SystemStatus.get_showPlotter()
   at SrvSurvey.Main.updateAllControls(Nullable`1 newMode)
   at SrvSurvey.Main.Game_modeChanged(GameMode newMode, Boolean force)
   at SrvSurvey.game.Game.setCurrentBody(String bodyName)
   at SrvSurvey.game.Game.initializeFromJournal(LoadGame loadEntry)
   at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid2[T0,T1](CallSite site, T0 arg0, T1 arg1)
   at SrvSurvey.game.Game.Journals_onJournalEntry(JournalEntry entry, Int32 index)
18:53:00: Mode change MainMenu => Flying
18:53:02: CargoFile updated: 14 items in: Ship
  ancientrelic: 2
  ancientcasket: 2
  ancienttablet: 2
  ancientorb: 2
  ancienturn: 2
  ancienttotem: 2
  drones: 2
18:53:02: CargoFile updated: 14 items in: Ship
  ancientrelic: 2
  ancientcasket: 2
  ancienttablet: 2
  ancientorb: 2
  ancienturn: 2
  ancienttotem: 2
  drones: 2
18:53:03: Mode change Flying => ExternalPanel
18:53:05: Mode change ExternalPanel => Flying
18:53:22: Mode change Flying => SuperCruising
18:54:14: Mode change SuperCruising => GlideMode
18:54:40: Mode change GlideMode => Flying
18:54:46: Close enough, creating  systemSite: '$Ancient:#index=1;' on 'Col 173 Sector OE-P d6-11 C 2' 
18:54:46: Loaded data from: C:\Users\Andrew\AppData\Roaming\SrvSurvey\SrvSurvey\1.1.0.0\guardian\F1935497\Col 173 Sector OE-P d6-11 C 2-ruins-1.json
njthomson commented 9 months ago

Thanks for sharing @ariscop - this is definitely the game making SrvSurvey crash. (It's hard to test such cases 😄)

I'll add something to shield cases like this in the next build.

njthomson commented 9 months ago

This is fixed in the next build.

njthomson commented 9 months ago

Fixed as of build 1.1.0.50 https://github.com/njthomson/SrvSurvey/releases/tag/1.1.0.50