Jump to content

Catching engine exception


Recommended Posts

I am trying to update the FMRS mod for 1.2.

It's my first time with KSP and Unity, so be gentle.

I have updated the deprecated methods, and it works fine for me. But there's one guy, who has game crashes when reverting the flight with the plugin. The mod itself essentially creates game saves, one for each controllable stage and gives the ability to load them, while injecting the vehicle states into the main save. It seems that the crash happens after loading the scene. I am not familiar with unity scene system, to be sure though. 

The linked thread contains some relevant info and this is the relevant part of the output log:

Spoiler

 


#### FMRS: enter scene_change_handler(GameScenes input_scene) FLIGHT
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
FMRS.FMRS_Core:scene_change_handler(GameScenes)
EventData`1:Fire(GameScenes)
HighLogic:LoadScene(GameScenes)
FlightDriver:StartAndFocusVessel(Game, Int32)
FMRS.FMRS_Core:jump_to_vessel(Guid, Boolean)
FMRS.FMRS_Core:MainGUI(Int32)
UnityEngine.LayoutedWindow:DoWindow(Int32) (at C:\buildslave\unity\build\Runtime\IMGUI\Managed\GUILayout.cs:485)
UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, GUISkin, Int32, Single, Single, GUIStyle) (at C:\buildslave\unity\build\Runtime\IMGUI\Managed\GUI.cs:1896)
 
(Filename: C:/buildslave/unity/build/Runtime/IMGUI/Managed/GUILayout.cs Line: 485)

#### FMRS: scene_change_handler
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
FMRS.FMRS_Core:scene_change_handler(GameScenes)
EventData`1:Fire(GameScenes)
HighLogic:LoadScene(GameScenes)
FlightDriver:StartAndFocusVessel(Game, Int32)
FMRS.FMRS_Core:jump_to_vessel(Guid, Boolean)
FMRS.FMRS_Core:MainGUI(Int32)
UnityEngine.LayoutedWindow:DoWindow(Int32) (at C:\buildslave\unity\build\Runtime\IMGUI\Managed\GUILayout.cs:485)
UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, GUISkin, Int32, Single, Single, GUIStyle) (at C:\buildslave\unity\build\Runtime\IMGUI\Managed\GUI.cs:1896)
 
(Filename: C:/buildslave/unity/build/Runtime/IMGUI/Managed/GUILayout.cs Line: 485)

#### FMRS: leave scene_change_handler(GameScenes input_scene)
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
FMRS.FMRS_Core:scene_change_handler(GameScenes)
EventData`1:Fire(GameScenes)
HighLogic:LoadScene(GameScenes)
FlightDriver:StartAndFocusVessel(Game, Int32)
FMRS.FMRS_Core:jump_to_vessel(Guid, Boolean)
FMRS.FMRS_Core:MainGUI(Int32)
UnityEngine.LayoutedWindow:DoWindow(Int32) (at C:\buildslave\unity\build\Runtime\IMGUI\Managed\GUILayout.cs:485)
UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, GUISkin, Int32, Single, Single, GUIStyle) (at C:\buildslave\unity\build\Runtime\IMGUI\Managed\GUI.cs:1896)
 
(Filename: C:/buildslave/unity/build/Runtime/IMGUI/Managed/GUILayout.cs Line: 485)

[UIMasterController]: HideUI
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
KSP.UI.UIMasterController:HideUI()
LoadingBufferMask:Show()
LoadingBufferMask:OnSceneChange(GameScenes)
EventData`1:Fire(GameScenes)
HighLogic:LoadScene(GameScenes)
FlightDriver:StartAndFocusVessel(Game, Int32)
FMRS.FMRS_Core:jump_to_vessel(Guid, Boolean)
FMRS.FMRS_Core:MainGUI(Int32)
UnityEngine.LayoutedWindow:DoWindow(Int32) (at C:\buildslave\unity\build\Runtime\IMGUI\Managed\GUILayout.cs:485)
UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, GUISkin, Int32, Single, Single, GUIStyle) (at C:\buildslave\unity\build\Runtime\IMGUI\Managed\GUI.cs:1896)
 
(Filename: C:/buildslave/unity/build/Runtime/IMGUI/Managed/GUILayout.cs Line: 485)

[HighLogic]: =========================== Scene Change : From FLIGHT to FLIGHT =====================
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogWarning(Object)
HighLogic:LoadScene(GameScenes)
FlightDriver:StartAndFocusVessel(Game, Int32)
FMRS.FMRS_Core:jump_to_vessel(Guid, Boolean)
FMRS.FMRS_Core:MainGUI(Int32)
UnityEngine.LayoutedWindow:DoWindow(Int32) (at C:\buildslave\unity\build\Runtime\IMGUI\Managed\GUILayout.cs:485)
UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, GUISkin, Int32, Single, Single, GUIStyle) (at C:\buildslave\unity\build\Runtime\IMGUI\Managed\GUI.cs:1896)
 
(Filename: C:/buildslave/unity/build/Runtime/IMGUI/Managed/GUILayout.cs Line: 485)

#### FMRS: leaving jump_to_vessel(Guid vessel_id)
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
FMRS.FMRS_Core:jump_to_vessel(Guid, Boolean)
FMRS.FMRS_Core:MainGUI(Int32)
UnityEngine.LayoutedWindow:DoWindow(Int32) (at C:\buildslave\unity\build\Runtime\IMGUI\Managed\GUILayout.cs:485)
UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, GUISkin, Int32, Single, Single, GUIStyle) (at C:\buildslave\unity\build\Runtime\IMGUI\Managed\GUI.cs:1896)
 
(Filename: C:/buildslave/unity/build/Runtime/IMGUI/Managed/GUILayout.cs Line: 485)

Crash!!!
SymInit: Symbol-SearchPath: '.;C:\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program;C:\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program;C:\WINDOWS;C:\WINDOWS\system32;SRV*C:\websymbols*http://msdl.microsoft.com/download/symbols;', symOptions: 530, UserName: 'Sven'
OS-Version: 10.0.14393 () 0x100-0x1
Unloading 9 Unused Serialized files (Serialized files now loaded: 0)
C:\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program\KSP_x64_Dbg.exe:KSP_x64_Dbg.exe (00007FF6005D0000), size: 25534464 (result: 0), SymType: '-exported-', PDB: 'C:\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program\KSP_x64_Dbg.exe', fileVersion: 5.4.0.23386
C:\WINDOWS\SYSTEM32\ntdll.dll:ntdll.dll (00007FFE82AC0000), size: 1904640 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\ntdll.dll', fileVersion: 10.0.14393.206
[...]

========== OUTPUTING STACK TRACE ==================

RtlLookupFunctionEntry returned NULL function. Aborting stack walk.<Missing stacktrace information>

========== END OF STACKTRACE ===========

**** Crash! ****

I tried wrap all the methods in the the flight scene class with try blocks and to log the exceptions, but it didn't do. 

Link to comment
Share on other sites

That's not an exception, that's a Unity crash. Hiding exception won't help with that (and it seldom helps). If it crashes then it is most likely the mod has changed some objects states in a bad way

Link to comment
Share on other sites

I don't know of any problem with the overlay. The user could launch the game manually without steam to check if it works better without the overlay (the steam build is the same as the other one)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...