loading a saved game fail

Fixed Saves & Loading
seracinic [discord] · 2 years ago

After the new patch, I'm getting the following error on loading a saved game.

The game failed to initialize. Please file a bug report if this issue persists.

System.NullReferenceException: Object reference not set to an instance of an object
at Mafi.Core.Terrain.TerrainManager.IsOcean (Mafi.Tile2iIndex index) [0x0000c]
at Mafi.Unity.Camera.OrbitalCameraModel.recomputePivotHeight () [0x00048]
at Mafi.Unity.Camera.OrbitalCameraModel.SetMode (Mafi.Unity.Camera.CameraMode mode) [0x000cf]
at Mafi.Unity.Camera.OrbitalCameraModel.Initialize () [0x00000]
at Mafi.Unity.Camera.CameraController+<>c__DisplayClass28_0.<.ctor>b__0 () [0x00000]
at Mafi.Core.GameLoop.IGameLoopEventsExtensions+<makeEnumerator>d__3.MoveNext () [0x00013]
at Mafi.Core.GameLoop.GameLoopEvents+<InvokeRendererInitializeState>d__66.MoveNext () [0x000d3]
at Mafi.Core.GameLoop.GameRunner+<Initialize>d__104.MoveNext () [0x0039f]
at Mafi.Core.Game.GameBuilder+<initializeGame>d__6.MoveNext () [0x00127]
at Mafi.Core.Game.GameBuilder+<BuildLoadedGameTimeSliced>d__3.MoveNext () [0x0037a]
at Mafi.Unity.GamePlayScene+<loadGame>d__21.MoveNext () [0x00296]
at Mafi.Unity.GamePlayScene+<Initialize>d__18.MoveNext () [0x000a5]
at Mafi.Unity.Main+<unloadAndStartNewScene>d__70.MoveNext () [0x000fc]
at Mafi.Unity.Main.stepSceneInitialization () [0x000dc]

Captain Marek Captain Marek · 2 years ago

Can you please share the save file?

Captain Marek Captain Marek · 2 years ago

That's so strange, that save loads fine for me. What game version do you run?

xelanamyt [discord] · 2 years ago

Latest version. However I just closed the game and tried again and it worked! Looking through the log it could be the Map Cache? Here is my log file attached.

1 attachment only for registered users
Captain Marek Captain Marek · 2 years ago

Thanks for the log, it's really strange why it's failing to resolve Mafi.DependencyResolver. I tried loading it without map cache and with it and both paths work for me.

So this failed for you on the first load but second load succeeded?

Was that right after starting a game?

xelanamyt [discord] · 2 years ago

I tried it several times when I first opened the game (along with several other saves from this map). I closed the game and once I reopened it, the game loaded and has been running fine for the past 20 minutes.

Captain Marek Captain Marek · 2 years ago

An attempted fix was published in the experimental branch in v0.6.4b. Please let us know if this fix worked for you.

xelanamyt [discord] · 2 years ago

I saw this has been released in the main version now. I haven't actually seen the issue since I reported it above. Is there anything I could try to test the issue?

Captain Marek Captain Marek · 2 years ago

I was actually never able to reproduce this issue, so I don't know what was causing it, but the patch should help. If you ever encounter this again, please file another report. Thanks!

Closed as ✅ Fixed

6 Showing 1–10 of 10