Hello,
I am trying to make a steam callback that will Pause the game when the Steam Game Overlay becomes activated.
So, Far, I have managed to get the Steam Callback working, and it fires an event in Blueprints that pauses the game. However, a few ms after, the game crashes. Here is the Output Log.
[2017.02.27-04.16.14:296][282]LogLoad: Took 0.403313 seconds to LoadMap(/Game/MusicShoot/Maps/TestPianoBP)
[2017.02.27-04.16.14:889][282]LogBlu: Component Initialized
[2017.02.27-04.16.14:889][282]LogBlu: Loading URL: about:blank
[2017.02.27-04.18.56:569][378]LogSteamworks: Overlay is ACTIVE
[2017.02.27-04.18.56:569][378]LogSteamworks: Calling Event OnSteamOverlayIsActive
[2017.02.27-04.18.56:569][378]LogSteamworks: Music Should be paused now
[2017.02.27-04.18.56:569][378]LogSteamworks: Overlay is ACTIVE
[2017.02.27-04.18.56:569][378]LogSteamworks: Calling Event OnSteamOverlayIsActive
[2017.02.27-04.18.56:569][378]LogBlueprintUserMessages: [Default__BP_MusicalRangeInstance_C] Steam Overlay Event Triggertrue
[2017.02.27-04.18.56:569][378]LogScript:Warning: Accessed None trying to read property ShootTrackPlayer
BP_MusicalRangeInstance_C /Game/MusicShoot/Blueprints/BP_MusicalRangeInstance.Default__BP_MusicalRangeInstance_C
Function /Game/MusicShoot/Blueprints/BP_MusicalRangeInstance.BP_MusicalRangeInstance_C:ExecuteUbergraph_BP_MusicalRangeInstance:0108
[2017.02.27-04.18.56:569][378]LogSteamworks: Music Should be paused now
[2017.02.27-04.18.56:569][378]LogSteamworks: Overlay is ACTIVE
[2017.02.27-04.18.56:569][378]LogSteamworks: Calling Event OnSteamOverlayIsActive
[2017.02.27-04.18.56:569][378]LogBlueprintUserMessages: [BP_MusicalRangeInstance_C_0] Steam Overlay Event Triggertrue
[2017.02.27-04.18.56:569][378]LogOutputDevice:Warning:
Script Stack:
BP_ShootTrackPlayer_C.ExecuteUbergraph_BP_ShootTrackPlayer
BP_ShootTrackPlayer_C.PauseSongWav
BP_ShootTrackPlayer_C.ExecuteUbergraph_BP_ShootTrackPlayer
BP_ShootTrackPlayer_C.PauseSong
BP_ShootTrackPlayer_C.ExecuteUbergraph_BP_ShootTrackPlayer
BP_ShootTrackPlayer_C.SteamTriggerPause
BP_MusicalRangeInstance_C.ExecuteUbergraph_BP_MusicalRangeInstance
BP_MusicalRangeInstance_C.OnSteamOverlayIsActive
[2017.02.27-04.18.56:628][378]LogWindows: Windows GetLastError: The operation completed successfully. (0)
[2017.02.27-04.18.58:500][381]LogThreadingWindows:Error: Runnable thread OnlineAsyncTaskThreadSteam DefaultInstance crashed.
[2017.02.27-04.18.58:500][381]LogWindows:Error: === Critical error: ===
[2017.02.27-04.18.58:500][381]LogWindows:Error:
[2017.02.27-04.18.58:500][381]LogWindows:Error: Assertion failed: IsInGameThread() [File:d:\unrealengine\unrealengine4-14\engine\source\runtime\engine\public\EngineUtils.h] [Line: 176]
[2017.02.27-04.18.58:500][381]LogWindows:Error:
[2017.02.27-04.18.58:500][381]LogWindows:Error:
[2017.02.27-04.18.58:500][381]LogWindows:Error:
[2017.02.27-04.18.58:500][381]LogWindows:Error: KERNELBASE.dll
[2017.02.27-04.18.58:500][381]LogWindows:Error: MusicalRange.exe
[2017.02.27-04.18.58:500][381]LogWindows:Error: MusicalRange.exe
...
[2017.02.27-04.18.58:520][381]LogWindows:Error: MusicalRange.exe
[2017.02.27-04.18.58:520][381]LogWindows: Windows GetLastError: The operation completed successfully. (0)
[2017.02.27-04.18.58:520][381]LogWindows:Error: alRange.exe
[2017.02.27-04.18.58:520][381]LogWindows:Error: HandleError re-entered.
[2017.02.27-04.18.58:520][381]LogWindows: FPlatformMisc::RequestExit(1)
[2017.02.27-04.18.58:520][381]LogWindows:Error:
[2017.02.27-04.18.58:531][381]LogThreadingWindows:Error: Runnable thread RenderThread 4 crashed.
[2017.02.27-04.18.58:531][381]LogWindows:Error: HandleError re-entered.
[2017.02.27-04.18.58:531][381]Log file closed, 02/26/17 22:18:58
From the logs, I can confirm that the steam callback is calling the event to pause the game
[2017.02.27-04.18.56:569][378]LogSteamworks: Calling Event OnSteamOverlayIsActive
And that the blueprint is firing the Pause Event with the bool variable of True (IsActive)
[2017.02.27-04.18.56:569][378]LogBlueprintUserMessages: [Default__BP_MusicalRangeInstance_C] Steam Overlay Event Triggertrue
But I donāt understand why āRunnable thread OnlineAsyncTaskThreadSteam DefaultInstance crashed.ā is crashing just a few milliseconds after.
I have been going at this problem for over a week and a half, and I feel like I am so close now. Just this little issue.
Let me know if you need any more info that I may provide.