Reloaded-Project / Reloaded-II

Universal .NET Core Powered Modding Framework for any Native Game X86, X64.
GNU General Public License v3.0
615 stars 83 forks source link

Bug: Game crashes when singular mod is enabled despite lack of changes between previous launches. #363

Closed BonQerss closed 4 months ago

BonQerss commented 7 months ago

Describe the Bug Game crashing due to singular mod despite lack of changes between testing.

To Reproduce Steps to reproduce the behaviour:

  1. Go to (https://github.com/BonQerss/p3ppc.expandedsubmenu)
  2. Click on Code and Download Zip
  3. Build the mod in Visual Studio
  4. Launch game with mod enabled in Reloaded

Expected Behaviour Game launching with no issues and able to be tested.

Screenshots 2024-04-18 17.44.28 ~ P3P.txt

Additional Context Had this happen with another mod that I hadn't even edited on this new computer / hadn't touched in over 3 weeks.

BonQerss commented 7 months ago

Cache has been cleared 6 times, I have restarted my computer, I have rebuilt the DLL contained inside 4 times, I have rolled back all changes to back when it was working, I have redeployed ASI loader and launched from Steam, Nothing has fixed it.

https://youtu.be/tEQ46K1VBDM Unlisted video showing what happens as well as the two logs from when I launched it. 2024-04-18 17.51.21 ~ P3P.txt 2024-04-18 17.51.31 ~ P3P.txt

Sewer56 commented 7 months ago

Log says

[10:44:28] [Reloaded] [LoaderAPI] Warning: GetController<IReloadedHooks> returned null.

Your install of Reloaded.SharedLib.Hooks is booked. Either due to AV, or due to a bad download.


Sorry for delayed response. I usually get to these in 5 minutes, but I don't have a working PC right now. Am working on room

BonQerss commented 7 months ago

Redownloaded it and it did not fix it.....,.

Sewer56 commented 7 months ago

Throw me a new log after redownload

BonQerss commented 7 months ago

2024-04-18 19.02.42 ~ P3P.txt

Sewer56 commented 7 months ago

According to log, still borked

[12:02:43] [Reloaded] Loading: BF Emulator for File Emulation Framework
[12:02:43] [Reloaded] - AppId   : reloaded.universal.fileemulationframework.bf
[12:02:43] [Reloaded] - Location: C:\Users\airin\Downloads\Release\Mods\reloaded.universal.fileemulationframework.bf\ModConfig.json
[12:02:43] [Reloaded] [LoaderAPI] Warning: GetController<IReloadedHooks> returned null.

Alternatively, it could happen if hooks were removed as a direct or transitive dependency of your mods, although unlikely.

BonQerss commented 7 months ago

maybe i just redownloaded wrong. i just need to delete the old one and then launch and it should redownload, yeah?

Sewer56 commented 7 months ago

Yeah. That usually works.

BonQerss commented 7 months ago

still crashes. 2024-04-18 20.03.50 ~ P3P.txt

just wanna mention that that error has been present in pretty much all of my logs, going back to before this issue. 2024-04-04 15.13.52 ~ P3P.txt

Sewer56 commented 7 months ago

Hmm, how strange. And sort of a miracle stuff worked before.

I'll delegate this to @AnimatedSwine37 (so sorry for doing this). I'm still setting up my desk and don't have a working PC right now.

AnimatedSwine37 commented 7 months ago

No worries I'll try and have a look tonight or on the weekend.

AnimatedSwine37 commented 7 months ago

We investigated this in a post in the Persona Modding discord server and found out the problem is unrelated to the missing hooks controller and was a bug with PAK Emulator.

I've made a pr over on the File Emulation Framework repo with a fix for that.

The seemingly random nature of the crashes was due to them being caused by accessing allocated memory. If you were lucky the memory the file is loaded into could already be allocated so you wouldn't crash.