mordentral / AdvancedSessionsPlugin

Advanced Sessions Plugin for UE4
https://www.vreue4.com
MIT License
585 stars 138 forks source link

Crash when the plugin is enabled in UE 5.4 packaged builds #97

Open StefanLundmark opened 5 days ago

StefanLundmark commented 5 days ago

My packaged Unreal project crashes on startup when the plugin is enabled.

This is the callstack of the crash:

    Game-Win64-Debug.exe!__delayLoadHelper2(const ImgDelayDescr * pidd, __int64(*)() * ppfnIATEntry) Line 312   C++
    Game-Win64-Debug.exe!CCallback<USteamNotificationsSubsystem::cSteamEventsStore,GameOverlayActivated_t,0>::Register(USteamNotificationsSubsystem::cSteamEventsStore * pObj, void(USteamNotificationsSubsystem::cSteamEventsStore::*)(GameOverlayActivated_t *) func) Line 163    C++
    Game-Win64-Debug.exe!CCallback<USteamNotificationsSubsystem::cSteamEventsStore,GameOverlayActivated_t,0>::CCallback<USteamNotificationsSubsystem::cSteamEventsStore,GameOverlayActivated_t,0>(USteamNotificationsSubsystem::cSteamEventsStore * pObj, void(USteamNotificationsSubsystem::cSteamEventsStore::*)(GameOverlayActivated_t *) func) Line 148 C++
    Game-Win64-Debug.exe!USteamNotificationsSubsystem::USteamNotificationsSubsystem() Line 32   C++
    Game-Win64-Debug.exe!InternalConstructor<USteamNotificationsSubsystem>(const FObjectInitializer & X) Line 3559  C++
    Game-Win64-Debug.exe!UClass::CreateDefaultObject() Line 4586    C++
    Game-Win64-Debug.exe!UClass::InternalCreateDefaultObjectWrapper() Line 5191 C++
    Game-Win64-Debug.exe!UClass::GetDefaultObject(bool bCreateIfNeeded) Line 3242   C++
    Game-Win64-Debug.exe!UObjectLoadAllCompiledInDefaultProperties(TArray<UClass *,TSizedDefaultAllocator<32>> & OutAllNewClasses) Line 810 C++
    Game-Win64-Debug.exe!ProcessNewlyLoadedUObjects(FName Package, bool bCanProcessNewlyLoadedObjects) Line 894 C++
    Game-Win64-Debug.exe!FEngineLoop::PreInitPostStartupScreen(const wchar_t * CmdLine) Line 3804   C++
    Game-Win64-Debug.exe!FEngineLoop::PreInit(const wchar_t * CmdLine) Line 4483    C++
    Game-Win64-Debug.exe!EnginePreInit(const wchar_t * CmdLine) Line 41 C++
    Game-Win64-Debug.exe!GuardedMain(const wchar_t * CmdLine) Line 136  C++
    Game-Win64-Debug.exe!LaunchWindowsStartup(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow, const wchar_t * CmdLine) Line 247  C++
    Game-Win64-Debug.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * pCmdLine, int nCmdShow) Line 298    C++

Things I've tried:

It seems the top call in the callstack points at some kind of dynamic library not being found?

I'm not sure what else to do. I'm on the latest version of the plugin from GitHub.

mordentral commented 5 days ago

Yeah some people have this issue where it doesn't bind to the DLLs, however its using the engines implementation not something custom of mine and it works for the vast majority of users. I've never been able to reproduce it on any of my systems to track down what the engine structure is doing here or if its a weird load time issue.

I have considered just ripping out that event binding all together.

StefanLundmark commented 5 days ago

I understand. Well, not much you can do if you can't reproduce it reliably.

Thanks for confirming, Joshua!

StefanLundmark commented 5 days ago

I moved steam_api64.dll from its ThirdParty location in the packaged game, to where the game executable is. And now everything works. I don't understand but maybe this will help someone.