StoneLineDevTeam / UMod

GMod replacement project - Sandbox game based on Unreal Engine
BSD 4-Clause "Original" or "Old" License
16 stars 9 forks source link

PIE crash when using UModGameMode #18

Open Yuri6037 opened 7 years ago

Yuri6037 commented 7 years ago

EDIT 19/08/2016 : Partialy fixed issue : preventing PIE and displaying nice Slate message box to avoid editor crash.

For those who wants more info, like why it is crashing : I'll try to explian briefely what happens. So when you initialize UMod as a standalone Game, then the GameInstance Init function is ran. That function initializes the LuaEngine. However when running UMod in PIE the Editor tries to load GameInstance but when PIE ends the Shutdown method is not called causing LuaEngine allocation to never be deallocated, causing when a lot of sessions have been played, memory leak. That is not the only problem : When you run Unreal Editor only the UUnrealEdEngine class is loaded not the UModGameEngine causing then UModAssetsManager to not exist in PIE, result is impossible for dedicated server to resolve assets and impossible for EntityBase to resolve model path.