CaffeineMC / sodium-fabric

A Fabric mod designed to improve frame rates and reduce micro-stutter
Other
4.58k stars 771 forks source link

Game crashes at startup with GetFileVersionInfoSizeW failed, error=127 #2550

Open Prezriw opened 2 weeks ago

Prezriw commented 2 weeks ago

Bug Description

When I start minecraft, sodium crashes with the following error.

A mod crashed on startup! net.fabricmc.loader.impl.FormattedException: java.lang.RuntimeException: Could not execute entrypoint stage 'preLaunch' due to errors, provided by 'sodium'! at net.fabricmc.loader.impl.FormattedException.ofLocalized(FormattedException.java:63) at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:162) at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:68) at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) Caused by: java.lang.RuntimeException: Could not execute entrypoint stage 'preLaunch' due to errors, provided by 'sodium'! at net.fabricmc.loader.impl.FabricLoaderImpl.lambda$invokeEntrypoints$2(FabricLoaderImpl.java:388) at net.fabricmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:33) at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:386) at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:160) ... 2 more Caused by: java.lang.RuntimeException: GetFileVersionInfoSizeW failed, error=127 at me.jellysquid.mods.sodium.client.platform.windows.api.version.Version.getModuleFileVersion(Version.java:63) at me.jellysquid.mods.sodium.client.platform.windows.api.d3dkmt.D3DKMT.queryDriverVersion(D3DKMT.java:127) at me.jellysquid.mods.sodium.client.platform.windows.api.d3dkmt.D3DKMT.getAdapterInfo(D3DKMT.java:95) at me.jellysquid.mods.sodium.client.platform.windows.api.d3dkmt.D3DKMT.queryAdapters(D3DKMT.java:58) at me.jellysquid.mods.sodium.client.platform.windows.api.d3dkmt.D3DKMT.findGraphicsAdapters(D3DKMT.java:44) at me.jellysquid.mods.sodium.client.compatibility.environment.probe.GraphicsAdapterProbe.findAdapters$Windows(GraphicsAdapterProbe.java:48) at me.jellysquid.mods.sodium.client.compatibility.environment.probe.GraphicsAdapterProbe.findAdapters(GraphicsAdapterProbe.java:25) at me.jellysquid.mods.sodium.client.SodiumPreLaunch.onPreLaunch(SodiumPreLaunch.java:11) at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:384) ... 3 more

Reproduction Steps

I Start Mincraft through Modrinth App. with fabric loader 0.15.11, and only 2 mods, Fabric API 0.100.1+1.21 and Sodium MC1.21-0.5.7

Log File

latest.log

Crash Report

no crash report generated

jellysquid3 commented 2 weeks ago

Can you please provide information on what operating system and hardware/drivers you're using? There's nothing here to diagnose the issue. Error 127 is ERROR_PROC_NOT_FOUND which really shouldn't happen for the GetFileVersionInfoSizeW function, since that's available from Windows 2000 onward.

Prezriw commented 2 weeks ago

Hi Jelly,

I have windows 10 Pro 64 bit build 19045 on a Gigabyte P85-D3 Mainboard, i3-4160 CPU, 32GB Memory, Nvidia Geforce GTX 1650 with driver 555.99.

I hope this help

jellysquid3 commented 1 week ago

Can you see if this build fixes the problem? If not, please attach a new log file.

kerrschtein commented 1 week ago

that seems to fix it for me!

Prezriw commented 1 week ago

[MODERATOR EDIT: Uploaded log file to GitHub Gist.]

Log file: https://gist.github.com/jellysquid3/e62befe7bfa471074294c18d7675f0f3

jellysquid3 commented 1 week ago

It seems to load the version information for the NVIDIA driver without issue, but the Intel driver (ig75icd64.dll) fails. What's more troubling is that we don't get a full path to the driver file, which is probably why querying the version information does not work.

So I guess we'd have to follow DLL search paths to see where the Intel driver is being loaded from...

jellysquid3 commented 1 week ago

@Prezriw I've written a workaround to deal with the Intel graphics drivers being weird. Please try this build and upload a log file if it does not work.

Prezriw commented 1 week ago

latest.log

jellysquid3 commented 1 week ago

Not sure. Seems that it can't find the OpenGL ICD in %SYSTEMROOT%/System32 either, or my code is wrong. I'll need to look at it more closely once I have access to my regular computer again.

Prezriw commented 1 week ago

thank you very much

Strong03 commented 1 week ago

also having the same issue with sodium and fabric not loading properly would love a fix for this as nothing has worked yet Thanks in advance!

blunderbust commented 1 week ago

Ive also had this issue, using AMD 7900 xt gpu using latest amd drivers.

chirrupted commented 1 week ago

also having this issue. RTX 3050 Ti with latest drivers

jellysquid3 commented 1 week ago

Please, make absolute certain the exact error you're seeing is:

Caused by: java.lang.RuntimeException: GetFileVersionInfoSizeW failed, error=127

If you are getting this error, see this comment and run the build which is attached. Then, upload your log file (as an attachment) so that we can look into what's going on.

blunderbust commented 1 week ago

I went back to verify, and no I do not have this exact error. I had started to follow this issue when it was more generic as I was having immediate crashes when using sodium 5.10, and saw gpu lines in the log. here is my log (just running 5.10, not special build):

latest.log

If this is unrelated I can start a separate issue.

jellysquid3 commented 1 week ago

@blunderbust Your issue is unrelated. You have the wrong versions of LWJGL installed. See #2561.

blunderbust commented 1 week ago

yes, correcting my version of LWJGL fixed it. I apologize for cluttering up this issue. Thanks for the help!

ZedDevStuff commented 5 days ago

So i have no idea if it was related or not but i changed my LWJGL version to 3.3.3 and it started correctly. I noticed a message before the crash talking about an unsupported jni version saying it could cause crashes, so i updated LWJGL and it worked. I updated my instance from 1.20.1 so it might not be a problem to anyone else but if you can update LWJGL, try that

Prezriw commented 4 days ago

I have disabled my intel video card in my bios, and sodium is working with ver. mc1.21-059

so it seems that the problem might be with the Intel video.

Thank you Jelly.