Reloaded-Project / Reloaded-II

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

[Granblue Relink: User is stuck after loader successfully loads in its entirety] #323

Closed basterzero closed 4 months ago

basterzero commented 9 months ago

I've been stuck in this window for a long time, what should I do to fix it? Screenshot (724)

Sewer56 commented 9 months ago

I seriously need to buy this game and see what happens here. This is strange.

Reflection4Real commented 9 months ago

I also have the same problem

Sewer56 commented 9 months ago

Would you be able to provide more information about your system? I bought this game but have trouble replicating this.

This is also strange, in that I've never seen the modloader fully initialize before, but the end user be stuck.

Things that come to mind:

etc. Anything that would be useful in trying to replicate your setup.

basterzero commented 9 months ago

What information do you need to help? I'll go get it.

Sewer56 commented 9 months ago

Anything that

Would you be able to provide more information about your system? I bought this game but have trouble replicating this.

This is also strange, in that I've never seen the modloader fully initialize before, but the end user be stuck.

Things that come to mind:

* Anything that can overlay/read/alter game visuals (e.g. ReShade, Special K, Video Capture Software)

  * This includes anything that renders ontop of the game such as 'Nahimic Audio Driver' which comes preinstalled on some prebuilt/OEM machines.

etc. Anything that would be useful in trying to replicate your setup.

Anything that falls under the above @basterzero

Keinechanw commented 9 months ago

im having the same problem now. I was able to use reloaded before and it has the same problem now. I did not add any new mods and it will only startup when all my mods turned off(but the mods are still on). This might happen because I updated the reloaded app, or maybe I forced quit once.

basterzero commented 9 months ago

I forgot about this one. What is it? Screenshot (729)

Sewer56 commented 9 months ago

Normally this is printed while loading a code mod. Hmm, actually. Wait, is something trying to be loaded after Steam DRM Bypass?

What's your enabled mod list?

Keinechanw commented 9 months ago

Enabled mod list doesnt matter. Game won't start even if I only enable the GBFR mod manager.

Sewer56 commented 9 months ago

Enabled mod list doesnt matter. Game won't start even if I only enable the GBFR mod manager.

My concern was maybe there was a deadlock in the mod itself, causing it to get stuck on boot; since I only print when mods actually finish loading, not when they start.

Does it happen without any mods enabled at all?

Keinechanw commented 9 months ago

It won't happen without any mod. However, all my mods are loaded even I disabled all of them.

Sewer56 commented 9 months ago

Is the problem specific to GBFR ModManager mod then?

Try loading something generic like 'Reloaded File Monitor', I presume that works OK?

Keinechanw commented 9 months ago

it works OK

Sewer56 commented 9 months ago

I'll look in ModManager mod source code then, to see if anything stands out. Gimme a while, I gotta finish up some unrelated work

Keinechanw commented 9 months ago

Actully it doesn't work as expected. if I activate reloaded file moniter in the game page, the command window pops up and exit in 1 sec then the game won't boot. However, If I activate the reloaded file moniter in the manage mods page, in the game page the enable/disable box for reload file moniter is a filled red box(I assume that means enabled), and the game boot normally

Sewer56 commented 9 months ago

Hmm, weird, gimme a while, I'll be back later. Will build some debug versions of mods.

basterzero commented 9 months ago

I have reloaded the monitor file. What happens is that when it reaches this screen, it bounces back to the program. Screenshot (732) And I tried to remove GBFR Manager, it appears that it can run the game normally, but it cannot run the mods.

Sewer56 commented 9 months ago

I have reloaded the monitor file. What happens is that when it reaches this screen, it bounces back to the program. Screenshot (732) And I tried to remove GBFR Manager, it appears that it can run the game normally, but it cannot run the mods.

Are you saying that it runs correctly in this situation then?

basterzero commented 9 months ago

Yes, exactly what you say.

KurochaK commented 8 months ago

Unfortunately, I just run into the same problem and I wonder if there is already a solution now. screenshot1 I successfully run the game with mods in it at first but failed on the second attempt. I am just stuck in this window and it cannot run the game again. I can manually start the game with these mods in it even if I disabled all of them, which is just the same situation as above. I'm not very good at English, and I'm sorry if I can't describe this situation clearly.

Sewer56 commented 8 months ago

I could probably try debugging it myself but I'd suggest asking the current project maintainer ( @Nenkai ) in case this is a common situation / known problem.

It seems that utility manager is stuck deadlocked on boot.

Nenkai commented 7 months ago

I've seen this problem very rarely from various people, but never personally I'm not sure. There should be enough error messages during and after initialization, which aren't being fired at all

Maybe it is stuck during the loader's logic somewhere, but I wouldn't know where without an exact setup to reproduce

Sewer56 commented 7 months ago

I've seen this problem very rarely from various people, but never personally I'm not sure. There should be enough error messages during and after initialization, which aren't being fired at all

Maybe it is stuck during the loader's logic somewhere, but I wouldn't know where without an exact setup to reproduce

I'd usually try doing the following:

If nothing else, just add log lines all over the place and grab someone who's affected by the issue. Should make things easier.

Nenkai commented 7 months ago

Apologies for the very delayed reply,

As far as I know we are not using any async code here but i've added further logging in the newest version to at least know whether the loader's entrypoint is even being hit - every errornous phase should've already been logged before this though, maybe third party lib code deadlocking, hard to tell.

Thanks for the suggestions!

Vinzelles commented 6 months ago

I am facing the same issue but with a slight difference. When I click "Launch Application" through the Reload program panel, it will stuck here forever.

image

But if I start the game directly from steam, the Reload terminal will appear and finish the loading stage without any exception, and then every mod works normally.

Sewer56 commented 6 months ago

[Should I try to reproduce and fix this myself? I did buy the game from my own pocket to fixu another issue a while back.]

Nenkai commented 6 months ago

This is not being printed, so the mod's entrypoint is not being hit.

You'll have an hard time trying to reproduce it, however it seems that this deadlock only appears on OS'es using different text encodings? Most of the people having this issue have been from China. Perhaps it is related, but I am not sure.

Sewer56 commented 6 months ago

It's strange. .NET itself uses UTF-16, and I've had success before running mods out of paths that have non-ANSI characters. Heck, in their log the hooks library seems to have loaded just fine.

The actual entry point is StartEx https://github.com/WistfulHopes/gbfrelink.utility.manager/blob/a8daf145bf29b0db923750e2a6660c824bd1be25/gbfrelink.utility.manager/Template/Startup.cs#L53 , maybe we can try logging something inside there?

Just log on every major step.

Edit: These days I daily drive Linux, but I am tempted to boot into Windows, set my language to Chinese and put Reloaded inside a non-ANSI folder.

Sewer56 commented 6 months ago

granblue_fantasy_relink_g3BDMdL4hv

I tried to get something to happen by moving everything into folders using non-ANSI paths and using a non-ANSI locale, but I couldn't reproduce it.

Nenkai commented 6 months ago

The latest version of the manager now has a log at StartEx. If anyone who still has this issue could report if that's it's at least printed, it'd be appreciated

For the past few weeks I haven't seen anyone reporting issues at all at least.

nukieberry commented 5 months ago

The latest version of the manager now has a log at StartEx. If anyone who still has this issue could report if that's it's at least printed, it'd be appreciated

For the past few weeks I haven't seen anyone reporting issues at all at least.

I'm still having the same issue. It stuck after showing following message. [GBFRelinkManager] StartEx [Reloaded] Loading: Granblue Fantasy Relink Mod Manager [Reloaded] - AppId : gbfrelink.utility.manager [Reloaded] - Location: D:\Reloaded\Mods\gbfrelink.utility.manager\ModConfig.json Where is the log file you mentioned?

Sewer56 commented 5 months ago

@nukieberry by 'log' they meant a print out to the log file. It's the one you see at the top of your log snippet.

Sewer56 commented 5 months ago

In any case. This doesn't seem to make any sense. Between this printout and what should be the next one, only the config file should be accessed. It's really strange that a deadlock happens here; I've never seen that happen before.

nukieberry commented 5 months ago

It worked fine after game version 1.3.1. Deadlock happened when I upgraded Reloaded from 1.27.8 to 1.27.10 and added a few new mods yesterday. Same as people mentioned above, the game can only boot up when all mods are crossed out in Reloaded, and it still has the old mods taking effect whatsoever. I'm trying a clean reinstallation now.

Sewer56 commented 5 months ago

Deadlock happened when I upgraded Reloaded from 1.27.8 to 1.27.10

There's no changes in the loader between those versions. It's a bugfix in launcher and improved accessibility in launcher for people with impaired eyesight.

and it still has the old mods taking effect whatsoever.

I've actually brought this up to @WistfulHopes in the past. You really shouldn't be modifying any game files from Reloaded mods, it's a big no-no.

Instead hook NtCreateFile to redirect the file to your own, or hook whatever part of game code opens the file. either-or.


If anything I'm confused why the log stopped there. The mod isn't doing anything substantial other than loading a config file. Yet, it freezes up.

Sewer56 commented 5 months ago

gbfrelink.utility.manager.zip @nukieberry

I built a copy with some more print statements myself. Curious what it prints.

nukieberry commented 5 months ago

gbfrelink.utility.manager.zip @nukieberry

I built a copy with some more print statements myself. Curious what it prints.

I didn't manually modify any files in Reloaded or game folder. But hold on, relevant or not, I did drag a newer version of a mod into Reloaded. Two entries with same name appeared in the mod list for a while until I restarted Reloaded. I shall try this build once installation completed.

nukieberry commented 5 months ago

gbfrelink.utility.manager.zip @nukieberry I built a copy with some more print statements myself. Curious what it prints.

I didn't manually modify any files in Reloaded or game folder. But hold on, relevant or not, I did drag a newer version of a mod into Reloaded. Two entries with same name appeared in the mod list for a while until I restarted Reloaded. I shall try this build once installation completed.

image

Clean reinstallation of game and Reloaded. Added back the mods. Click Launch to get the mod manager. Replaced files in Mods/gbfrelink.utility.manager/. Launch Application clicked again. This is what I get at this point.

Update: It does not change after putting these two back.

image

Sewer56 commented 5 months ago

By all accounts it's probably softlocking trying to read config file. Wow, I've never really seen that before.

I'm probably gonna fall asleep by the time I next touch my PC, so I'll ping @Nenkai in case they feel like debugging.

If not, I'll try debugging this with you hopefully when I wake up.

Sewer56 commented 5 months ago

@nukieberry

Here, see what this logs. gbfrelink.utility.manager.zip

(I couldn't sleep 😅)

nukieberry commented 5 months ago

image

Sewer56 commented 5 months ago

gbfrelink.utility.manager.zip

@nukieberry I wonder if it's getting stuck reading config somehow. Here, try this one; I put log statements pretty much everywhere else at this point.

nukieberry commented 5 months ago

image BTW there's no config.json in the folder.

Sewer56 commented 5 months ago

If I disable config live update, does it then work?

gbfrelink.utility.manager.zip

Normally this shouldn't lock up, I'm not sure why it gets deadlocked, as I've never seen that happen before.

According to log, no other code is running in the background; unless you have some ASI Loader plugin sitting in your game folder unaccounted for.

nukieberry commented 5 months ago

image

Sewer56 commented 5 months ago

I somehow get the feeling that yours is being prevented from reading any files whatsoever. I'm not really sure what to say about that, other than maybe trying to run as Admin and checking antivirus logs out of curiosity.

None of this seems to be making much sense, it just locks up trying to access any file on disk seemingly. And it's not in the mod's code, but in runtime or OS.

nukieberry commented 5 months ago

image I've double checked it is running as admin. However this message pops up on the first run after a reboot. But it doesn't seem to block anything. The folder itself is not read-only either. Weird.

Sewer56 commented 5 months ago

I've got no idea myself honestly, it's just strange. It's not even to do with being read-only. It's even being prevented from reading in the first place.

As if blocked by some kernel module, like an anticheat, an antivirus, or something of the kind.

nukieberry commented 5 months ago

If I'm not confused, it can at lease read AppConfig.json, otherwise the mod list should be empty. But not for files in Mods folder. Can you test what specific file, or all files, it cannot access?

Sewer56 commented 5 months ago

The weird part is the mod started loading, so the loader itself can access files just fine. After all, it needs to load and parse all of the ModConfig.json files.

But the moment Relink Mod Manager tries to touch any file, everything stalls.

I'd be curious to see what happens if you load another completely unrelated mod though, something non-game specific, for example Reloaded File Monitor.