UE4SS-RE / RE-UE4SS

Injectable LUA scripting system, SDK generator, live property editor and other dumping utilities for UE4/5 games
http://docs.ue4ss.com/
MIT License
1.26k stars 164 forks source link

[BUG - Experiemental] Abiotic Factor: BPModLoaderMod crashes the game if one of my mods simply exists #646

Open igromanru opened 3 weeks ago

igromanru commented 3 weeks ago

Branch or Release Tried with Experimental zDEV release and even build myself the latest commit 570c770634639499cb248525b1e6cefe3ee0e361 . EDIT2: It happens with the release v3.0.1 (zDEV) as well but more random.

Game and Engine Version Game: Abiotic Factor Engine: 5.3.2 Game version: Hotfix 0.9.0.11307 (Steam)

Describe the bug The crash only happens when BPModLoaderMod is enabled (BPModLoaderMod : 1 in mods.txt) and one of my mods is in the Mods directory. (yes, just in the directory, not even enabled in any way)

All Configs and crash dumps Here are all my configurations: Extra Mod: MyPlayground.zip mods.txt UE4SS.log UE4SS-settings.ini crash_2024_09_02_10_57_46.zip

To Reproduce Steps to reproduce the behavior:

  1. Install latest Experimental (zDEV) release or build from main branch
  2. Use default configs or provided by me above
  3. Boot the game up into the main menu to see that everything works
  4. Close the game and put MyPlayground mod as it is in the Mods directory
  5. Start the game and it should crash right away

Desktop (please complete the following information):

igromanru commented 5 days ago

Do you want to hear a funny thing that I just discovered? My changes in #650 somehow fixes the crash. I've no idea why, can't find in BPModLoaderMod anything really that could cause it, beside

local function LoadModsManual()
    LoadMods(UEHelpers.GetWorld())
end

In the current UEHelpers version GetPlayerController throws an error in main menu, but LoadModsManual() should only get called through Insert key anyway.

RegisterKeyBind(Key.INS, LoadModsManual)

¯\_(ツ)_/¯