Reloaded-Project / Reloaded-II

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

[Bug: An unrelated bug in ZMenu caused crashes after around an hour of gameplay. Fixed.] #253

Closed Juzo0 closed 7 months ago

Juzo0 commented 1 year ago

After I update to the 1.25 Reloaded version, the game sometimes just stops randomly and I don't get to retrieve any filelog. It can happen after 5 min or one hour of gameplay

To Reproduce Steps to reproduce the behaviour: I launch reloaded and the game runs fine I play for some times and for some reasons, the game stops functionning I go back to the reloaded screen mods

I downloaded the Microsoft runtime 8.0.0 RC manually (both the x64 and 86 version) and every mod is up to date

Sewer56 commented 1 year ago

Can you extract the files of 1.2.4 (last version) manually over your existing Reloaded copy and verify it's not caused by another factor?

Juzo0 commented 1 year ago

Thank you for the answer

Can you tell me where i can find these files please ?

Sewer56 commented 1 year ago

In the releases section: https://github.com/Reloaded-Project/Reloaded-II/releases

Here's the last release https://github.com/Reloaded-Project/Reloaded-II/releases/tag/1.24.3

Extract Release.zip over your existing Reloaded folder.

Juzo0 commented 1 year ago

Thank you

I just did it and will try a few minutes of gameplay and then come back with hopefully a positive result

Btw reloaded just notified me again of the new update version. Can I ignore it for the moment without having troubles with my mods ?

Sewer56 commented 1 year ago

Yeah you can ignore it.

Juzo0 commented 1 year ago

From what i played it seems the problem is solved

However I just realised this Reloaded version is made for the microsoft runtime 7.0.0, is it okay if i already installed the 8.0.0 version ?

Sewer56 commented 1 year ago

Yeah it'll use the right one don't worry.

Juzo0 commented 1 year ago

Alright thank you once again for the answers

I hope I won't find any more problems and will wait for another version of reloaded

Sewer56 commented 1 year ago

The only thing that changed in 1.25 is the Runtime.

There's a low level mod (FileEmulationFramework) that can technically break with any runtime upgrade, that needs porting away from C#/.NET. That said it's a situation where it either doesn't work or it works. If it dies down the road causing a deadlock, that's just really weird.

Either way, there shouldn't really be any feature upgrades loader wise for a very, very long time as I work on the replacement. So you should be fine using 1.24 as long as needed.

Next major planned upgrade is Reloaded3, a year from now. Hopefully by then, FEF is also ported to Rust

Juzo0 commented 1 year ago

Good evening,

I'm writing this post to inform you that unfortunately the bug is still present despite having installed reloaded 1.24

It happened twice today during a long cut scene where you can't save

My idea is maybe my laptop is getting too hot and it needs to shut down the game to prevent overheat but it would be strange because I never had this problem before installing the 1.25 version of reloaded.

Do you have any more suggestions I could try ?

Sewer56 commented 1 year ago

Maybe it's just caused by your specific mod combination

Juzo0 commented 1 year ago

The last mod I downloaded was the Nikke outfit and it didn't notice a comptatibility issue with others mods but I also have the long hair ann mod and I know mods that change appearances can create some inner conflits in the game, do you think I should disable of one them and see ?

Sewer56 commented 1 year ago

If you can consistently replicate during a cutscene, do try messing around.

Juzo0 commented 1 year ago

Okay I will try and see how it turns out

Btw do you think the bug can be caused by 2 mods that transform the skills set of the party ? (I have one mod for arsene only and another one for the rest of the party)

Sewer56 commented 1 year ago

I wouldn't know as I haven't worked with the internals of this game.

Juzo0 commented 1 year ago

Okay thanks for all the answers I will try and see the results

If nothing works I might just delete completely reloaded 2 and reinstall everything from the 1.24 version

have a good day

Juzo0 commented 1 year ago

Hello

I'm dropping this because I think I found the cause of my issue based on this previous post [https://github.com/Reloaded-Project/Reloaded-II/issues/173] : somehow my persona essentials mod didn't have itself nor the various based mods (CRI files system, library reloaded memory or file emulation framework) as a mod dependencies.

I just checked everything on the list and tried to play for some times and it seems to do fine ATM so I hope you can close this topic.

Thanks again for your time Sewer

Sewer56 commented 1 year ago

Have fun :P

Juzo0 commented 1 year ago

Well I guess it didn't last for long

Checking every mod dependency for the persona essential mod didn't help much so I just deleted reloaded and only use the Zmenu for some tweaks in-game.

I'm a bit sad cuz reloaded worked fine in the beginning but I can't find the thing that causes this issue and it's really unplayable when each moment is a risk to lose your files.

I'll try to download again when reloaded 3 comes out, thank you for your time sewer and sorry for the long post

Sewer56 commented 1 year ago

Give someone your mod list in Persona Modding: https://discord.gg/naoto Maybe someone in there has an idea.

Juzo0 commented 1 year ago

I will thank you

If you still have some time I had an issue with a mod (battle music randomizer) and I didn't understand the meaning of the log, can you look at it and maybe give me an idea of what I'm doing wrong ?

Thanks

[23:26:43] [Reloaded] Create Loader | Time: 36ms [23:26:43] [Reloaded] Loaded: reloaded.sharedlib.hooks in 5ms [23:26:43] [Reloaded] Current Process Location: C:\Program Files (x86)\Steam\steamapps\common\P5R\P5R.exe [23:26:43] [Reloaded] Loaded: Reloaded.Memory.SigScan.ReloadedII in 5ms [23:26:43] Starting FileEmulationFramework [23:26:43] [R-II SteamHook] SteamAPI_RestartAppIfNecessary hooked successfully. [23:26:43] [Reloaded] Loaded: reloaded.universal.fileemulationframework in 121ms [23:26:43] [R-II SteamHook] SteamAPI_IsSteamRunning hooked successfully. [23:26:43] Starting AWB.Stream.Emulator [23:26:43] [Reloaded] Loaded: reloaded.universal.fileemulationframework.awb in 13ms [23:26:43] [R-II SteamHook] Found Steam Library Entry with Id 1687950. Dropping steam_appid.txt. [23:26:43] [Reloaded] Setting Up Hooks (Async) | Time: 156ms [23:26:43] [Reloaded] Loaded: crifs.v2.hook in 36ms [23:26:43] [Reloaded] Loaded: CriFs.V2.Hook.Awb in 5ms [23:26:43] [Reloaded] [LoaderAPI] Warning: GetController returned null. [23:26:43] Starting BF.File.Emulator [23:26:43] [Reloaded] Loaded: reloaded.universal.fileemulationframework.bf in 279ms [23:26:43] Starting PAK.Stream.Emulator [23:26:43] [Reloaded] Loaded: reloaded.universal.fileemulationframework.pak in 10ms [23:26:43] [Reloaded] Loaded: p5rpc.modloader in 22ms [23:26:43] [Reloaded] [LoaderAPI] Warning: GetController returned null. [23:26:43] BGM Randomizer v2.0.0 by YveltalGriffin Press Alt to open menu! Loaded p5rbgm.cfg! [Reloaded] [LoaderAPI] Warning: GetController returned null. [23:26:43] Error while starting mod: p5rpc.music.battlemusicrandomizer [23:26:43] [Reloaded] Failed to Load Reloaded-II. Object reference not set to an instance of an object. at BattleMusicRandomizer.Mod..ctor(ModContext context) in G:\P5R-Battle-Music-Randomizer\P5R-Battle-Music-Randomizer\Mod.cs:line 144 at BattleMusicRandomizer.Template.Startup.StartEx(IModLoaderV1 loaderApi, IModConfigV1 modConfig) in G:\P5R-Battle-Music-Randomizer\P5R-Battle-Music-Randomizer\Template\Startup.cs:line 67 at Reloaded.Mod.Loader.Mods.Structs.ModInstance.Start(IModLoader loader) at Reloaded.Mod.Loader.Mods.PluginManager.StartMod(ModInstance instance) at Reloaded.Mod.Loader.Mods.PluginManager.LoadMods(List1 modPaths) at Reloaded.Mod.Loader.Loader.LoadModsWithDependencies(IEnumerable1 modsToLoad, List`1 allMods) at Reloaded.Mod.Loader.Loader.LoadForAppConfig(IApplicationConfig applicationConfig) at Reloaded.Mod.Loader.EntryPoint.LoadMods(IReloadedHooks hooks) at Reloaded.Mod.Loader.EntryPoint.<>c__DisplayClass14_0.b_1() at Reloaded.Mod.Loader.EntryPoint.ExecuteTimed(String text, Action action) at Reloaded.Mod.Loader.EntryPoint.SetupLoader2(EntryPointParameters parameters) at Reloaded.Mod.Loader.EntryPoint.SetupLoader(EntryPointParameters parameters) A log is available at: C:\Users\Xuan\AppData\Roaming\Reloaded-Mod-Loader-II\Logs\2023-09-19 21.26.43 ~ P5R.txt

Sewer56 commented 1 year ago

Assuming it leads to this line of code here: https://github.com/mackieks/P5R-Battle-Music-Randomizer/blob/e8b3a7ae6e2e688e90e486dfbf9acd9075e2b6e1/Mod.cs#L144C16-L144C16

Then I'm guessing startup signature scanner is borked. Other mods rely on this too, so I'm not sure how any mod works if this is borked.

What you can try to do, is delete Reloaded.Memory.SigScan.ReloadedII folder in your Mods folder, and let Reloaded re-download it. Otherwise try re-downloading BGM Randomizer

Juzo0 commented 1 year ago

Okay I will test and see

Btw do I need to check those two unused mods (AWB emulator and CRi filesystem) or can I let them uncheck ? image

Sewer56 commented 1 year ago

Reloaded will automatically enable dependencies as needed; there's no need to explicitly enable them.

Edit: The error above could technically also happen is you explicitly removed a dependency from BGM Randomizer's Dependency List.

Juzo0 commented 1 year ago

After reinstalling the mod, it turns out fine but the main problem remains : the possibility for the game to crash without warning

There's nothing on the log files that could point the cause and it can occur after 10 min or 1 hour of gameplay, and I don't believe the mods I use are the reasons of it.

Earlier I tried playing with only persona essential mod and the BGM randomizer and the game still crashed after some times so yeah

Anyway thanks for the explainations and sorry to be a bother but this issue is making me a bit frustrated cuz I can't seem to play my favorite game with good mods

Sewer56 commented 1 year ago

Don't worry, all is good. Does it still happen if you just run Essentials? (No other mods)

Maybe some sort of unknown conflict with other external mods (e.g. ZMenu), right now it's unclear.

Juzo0 commented 1 year ago

As for now I can't tell because the biggest challenge is to know when the crash will happen, like I said it can come after 10 min (just fighting some shadows) or 1 hour at the end of a boss fight

But I will test tomorrow with only essentials mod on and see if the game crashes or not

Sewer56 commented 1 year ago

Apparently this is common for some people now (when I asked the community about it), yet nobody told me for a straight year. Probably either to do with File Emulators, or CRI Hook, I do not yet know.

I guess this will need investigation. I'll ask around and find out what I can over the weekend.

Juzo0 commented 1 year ago

Ah wow that was unexpected because yes I haven’t seen people reporting this problem on bananagames topics but I guess it’s better late than never

when you said “ run only with essentials” does it also mean without the zmenu script ?

Sewer56 commented 1 year ago

Don't worry about it, have fun gaming for now. I'll ask around in community and look into it.

Juzo0 commented 1 year ago

Okay I’ll try but honestly I’m a bit tempted to leave the game in its actual state because playing with the fear of crashing and losing all of my progress doesn’t feel appealing ngl

I guess I’ll wait for an update from you or just disable the zmenu and see how it turns out

AnimatedSwine37 commented 1 year ago

You should be able to get a crash dump from the game that may help with finding the cause.

In %APPDATA%\SEGA\P5R\Steam\xxxxx\db\reports there should be a bunch of .dmp files, could you send the latest one? (The xxxxx is your steam id)

Juzo0 commented 1 year ago

I’ll look for it tomorrow I’m beat sorry but thank for the idea I’ll post crash dump file if I find it

Juzo0 commented 1 year ago

Hello to every one of you

there's the file you requested but this is the only one in the folder so I hope it's the right one.

Have a good day and I hope you will be able to come out with a solution or at least a better understanding of the problem

reports.zip

Juzo0 commented 1 year ago

PS : I had to compress the folder because github told me it doesn't support dmp file sorry

Sewer56 commented 1 year ago

Can you run:

See what results you get. The crashdumps exported by the game aren't very detailed (they contain bare essentials), but it's dying somewhere in ZMenu according to the dump.

Juzo0 commented 1 year ago

I just deleted every file connected to Zmenu and the persona 5 script hook that is required for it and until now, the game seems to work fine (with reloaded and every mod on). Also I tried earlier to play with only the Zmenu mod and the game seemed ok.

The thing is I installed Zmenu because a mod [https://gamebanana.com/mods/420675] suggested it in order to be fully functionnal : "Personas are added as DLC slots, and you can either use something Zmenu or Mod Menu to get them for free, or pay for them in a vanilla friendly way. This also means you can install on a new playthrough with no issues! It also doesn't effect your fusions, so feel free to use online fusion calculators! "

If the cause of the game crashing is the Zmenu or the P5ScriptHook then I won't use them anymore as long as reloaded and the mods there are working

Sewer56 commented 1 year ago

Well, ideally it'd be in everyone's best interest to find the exact combination that causes this and report them to the ZMenu author ( @zolika1351 ), so they can see where in their code it crashes (ZMenu is not open source, so I can't do that myself).

[ @zolika1351 , can you make a release build for them so you have symbols/.pdb(s) to cross reference the crash with your code? ]


Anyway, if/when there's a custom build available, try the following.

https://helpx.adobe.com/uk/xd/kb/how-to-generate-crash-dump-on-windows-machine.html

  1. Enable full crash dumps using the guide above (up to and including step 4).
  2. Run the game and play until it crashes.
  3. Extract crash dump from %LOCALAPPDATA%\CrashDumps (you can paste this path in explorer).

This crash dump should be more detailed than the one made by the game, and more helpful. Upload that crash dump as needed.

Juzo0 commented 1 year ago

I just followed the steps you told me to so should I install Zmenu back again and try to create a crash ?

Sewer56 commented 1 year ago

Wait around for @Zolika1351 to show up; I don't know if they have the debug symbols for their last release.

Juzo0 commented 1 year ago

Alright but at least I can just play the game with just reloaded and see if it still crashes ? Or should I just stay on stand by ?

Sewer56 commented 1 year ago

Sure, you can play with just Reloaded for now, or just ZMenu, whatever works for you.

Juzo0 commented 1 year ago

Okay at worst I'll see in the near future if the game happens to crash again and if not then I won't use mods that require Zmenu to work

Thanks again for the time Sewer

Sewer56 commented 1 year ago

No sweat :P

Juzo0 commented 1 year ago

I just noticed something I may not did before when installing Zmenu : it says to extract P5ScriptHook.dll into the game folder as well, thing I didn't before (I just extracted the P5Script 7z file into the game folder).

Now I did extract the correct file, I was wondering what should I do with these two JSON files that were with the P5Script hook folder : do I move them into the game folder, delete them or let them be in the P5Script folder ?

image

Sewer56 commented 1 year ago

I'm guessing you found a version repacked for Reloaded by someone. You can just get rid of these JSONs. If you want to install by dropping into game folder, you won't need them.

Juzo0 commented 1 year ago

Alright then I’m starting a new try with both Zmenu (correctly installed hopefullly) and reloaded on and I’ll see if a crash occurs or not

brb and thanks again

Juzo0 commented 1 year ago

Hey I'm back with some news, after around 2h of gameplays it turns out the crash happened again and I found more dmp files (one in the report > dl files of P5R and more in the CrashDumps folder created earlier)

The thing is those new dmp files are actually old (they come from july or august) so I don't know if they can help but I put them here anyway

Nevermind Github tells me the zip file is too big (48mb) and the limit is 25 so I can only send the dmp file from the report folder sorry

reports.zip

Sewer56 commented 1 year ago

ZMenu had an update to address what might have been the culprit. Go nab a newer version from the author's site.

Juzo0 commented 1 year ago

Thanks for the update I'll check it out later and see how it turns out with reloaded and if any crashes happen again