nipkownix / re4_tweaks

Fixes and tweaks for the "UHD" port of Resident Evil 4
zlib License
343 stars 32 forks source link

Crash at game startup (Windows 11, Ryzen 5 5600X, Geforce RTX 2070 Super) #296

Closed LSMetag closed 2 years ago

LSMetag commented 2 years ago

Validation

Describe your issue here (drag+drop ZIP to attach it)

Hello,

I just installed RE4HD 1.1 (with updated RE4_Tweaks) and I have a CTD at start. I just have time to see the message telling to hit F1 to configure. There is no crash anymore if I remove dinput8.dll so I think it's related to re4_tweaks.

I am running the game in French, using a french keyboard (I tested US Keyboard too but same)

I put the dump in attachment.

Hope it will help.

Thanks

bio4.exe.20220729024709.zip

felipecrs commented 2 years ago

I'm facing the same issue.

emoose commented 2 years ago

Seems to be crashing inside aligned_malloc memory allocation func, while trying to load one of the texture .pack files, I guess Hap_AllocMem is returning 0 for some reason.

Maybe issue with not enough free RAM... could you try making sure everything besides game/Steam is closed and see if the problem persists with dinput8 in place?

If there's no luck there, maybe worth testing if an earlier re4_tweaks release helps at all, https://github.com/nipkownix/re4_tweaks/releases/tag/1.7.6 might work better (could have some minor issues with font sizes though, but mostly just curious if you can actually get into the game with that release)

felipecrs commented 2 years ago

Just to you know, I have this issue even with 32GB of RAM (with 70% free before opening the game).

I haven't tested earlier versions yet, although I remember re4_tweaks worked well when I first installed the HD Project 1.0.

LSMetag commented 2 years ago

I managed to solve the issue.

Somehow (with ALT-F4 on errors popups + get focus again with the main blank window) I managed to get to main menu and I saw I had to install the 4gb patch.

Even with RE4_Tweaks, you have to install the 4gb patch, otherwise game won't start.

N.B : If you let the "Crashdumps" folder; you still get the errors I posted. When removed, no more crashs. There may be a "workaround" in the tool ^^

felipecrs commented 2 years ago

Oh, that's true. I haven't installed the 4GB patch indeed.

But I remember in past versions it would prompt me to install it at the first initialization, wasn't it supposed to be like that?

nipkownix commented 2 years ago

re4_tweaks is able to install the 4gb patch for you, but the game should be at least stable before the prompt appears. Hmm. Didn't think not having the 4gb patch would cause a crash before even reaching the main menu.

We might have to move the 4gb patch stuff to run before the game does.

LSMetag commented 2 years ago

Oh, that's true. I haven't installed the 4GB patch indeed.

But I remember in past versions it would prompt me to install it at the first initialization, wasn't it supposed to be like that?

Yes but game crashes before being able to prompt ^^

emoose commented 2 years ago

Ah darn, was thinking it could be 4GB related but figured it would have prompted you already, glad you were able to figure it out 😅

HDProject was at least able to get to main-menu without 4GB before but I guess texture changes in 1.1 are stopping that now, maybe a simple MessageBox prompt when the DLL is first loaded in would work better.

In case anyone else is having the same issue, for now you should be able to use the tool from https://ntcore.com/?page_id=371 to 4GB patch your bio4.exe.

E: hmm, trying to look into it now, got it working with MessageBox but some reason EXE relaunch doesn't work properly, ShellExecute just hangs without returning any status code, might be something to do with COM not being inited yet. E2: oh damn, might be because it's still running inside DllMain at that point... not really sure how to get around that, never had to deal with loader lock related stuff before. Maybe hooking games WinMain func so we can do LAA check before it runs would work instead, or maybe we already have some hook near the beginning of game execution...

LSMetag commented 2 years ago

Yeah. A CRC check on the .exe file, and patching if no match (might be updated if the game updates), and then showing a popup or a text giving the info 4gb patch has been installed.

According that crashes still occur if you let the crashdump directory, game is quite unstable.