toolbox4minecraft / amidst

Advanced Minecraft Interface and Data/Structure Tracking
GNU General Public License v3.0
2.15k stars 240 forks source link

MinecraftInterfaceCreationException exception in 4.6 #896

Open AnrDaemon opened 4 years ago

AnrDaemon commented 4 years ago

I'm trying to run freshly downloaded 4.6 JAR, but to no avail.

2020-09-12 00:43:04.961 [info] There are no updates available.
2020-09-12 00:43:11.905 [info] using minecraft launcher profile 'MC 1.7.10' with versionId '1.7.10'
2020-09-12 00:43:11.909 [info] Loading libraries.
2020-09-12 00:43:11.919 [info] Found library com.mojang:netty:1.6 at file:/C:/Users/anrdaemon/AppData/Roaming/.minecraft/libraries/com/mojang/netty/1.6/netty-1.6.jar
2020-09-12 00:43:11.92 [info] Found library com.mojang:realms:1.3.5 at file:/C:/Users/anrdaemon/AppData/Roaming/.minecraft/libraries/com/mojang/realms/1.3.5/realms-1.3.5.jar
2020-09-12 00:43:11.922 [info] Found library org.apache.commons:commons-compress:1.8.1 at file:/C:/Users/anrdaemon/AppData/Roaming/.minecraft/libraries/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.jar
2020-09-12 00:43:11.924 [info] Found library org.apache.httpcomponents:httpclient:4.3.3 at file:/C:/Users/anrdaemon/AppData/Roaming/.minecraft/libraries/org/apache/httpcomponents/httpclient/4.3.3/httpclient-4.3.3.jar
2020-09-12 00:43:11.926 [info] Found library commons-logging:commons-logging:1.1.3 at file:/C:/Users/anrdaemon/AppData/Roaming/.minecraft/libraries/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar
2020-09-12 00:43:11.928 [info] Found library org.apache.httpcomponents:httpcore:4.3.2 at file:/C:/Users/anrdaemon/AppData/Roaming/.minecraft/libraries/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar
2020-09-12 00:43:11.93 [info] Found library java3d:vecmath:1.3.1 at file:/C:/Users/anrdaemon/AppData/Roaming/.minecraft/libraries/java3d/vecmath/1.3.1/vecmath-1.3.1.jar
2020-09-12 00:43:11.931 [info] Found library net.sf.trove4j:trove4j:3.0.3 at file:/C:/Users/anrdaemon/AppData/Roaming/.minecraft/libraries/net/sf/trove4j/trove4j/3.0.3/trove4j-3.0.3.jar
2020-09-12 00:43:11.932 [info] Found library com.ibm.icu:icu4j-core-mojang:51.2 at file:/C:/Users/anrdaemon/AppData/Roaming/.minecraft/libraries/com/ibm/icu/icu4j-core-mojang/51.2/icu4j-core-mojang-51.2.jar
2020-09-12 00:43:11.933 [info] Found library net.sf.jopt-simple:jopt-simple:4.5 at file:/C:/Users/anrdaemon/AppData/Roaming/.minecraft/libraries/net/sf/jopt-simple/jopt-simple/4.5/jopt-simple-4.5.jar
2020-09-12 00:43:11.934 [info] Found library com.paulscode:codecjorbis:20101023 at file:/C:/Users/anrdaemon/AppData/Roaming/.minecraft/libraries/com/paulscode/codecjorbis/20101023/codecjorbis-20101023.jar
2020-09-12 00:43:11.935 [info] Found library com.paulscode:codecwav:20101023 at file:/C:/Users/anrdaemon/AppData/Roaming/.minecraft/libraries/com/paulscode/codecwav/20101023/codecwav-20101023.jar
2020-09-12 00:43:11.935 [info] Found library com.paulscode:libraryjavasound:20101123 at file:/C:/Users/anrdaemon/AppData/Roaming/.minecraft/libraries/com/paulscode/libraryjavasound/20101123/libraryjavasound-20101123.jar
2020-09-12 00:43:11.936 [info] Found library com.paulscode:librarylwjglopenal:20100824 at file:/C:/Users/anrdaemon/AppData/Roaming/.minecraft/libraries/com/paulscode/librarylwjglopenal/20100824/librarylwjglopenal-20100824.jar
2020-09-12 00:43:11.937 [info] Found library com.paulscode:soundsystem:20120107 at file:/C:/Users/anrdaemon/AppData/Roaming/.minecraft/libraries/com/paulscode/soundsystem/20120107/soundsystem-20120107.jar
2020-09-12 00:43:11.938 [info] Found library io.netty:netty-all:4.0.10.Final at file:/C:/Users/anrdaemon/AppData/Roaming/.minecraft/libraries/io/netty/netty-all/4.0.10.Final/netty-all-4.0.10.Final.jar
2020-09-12 00:43:11.938 [info] Found library com.google.guava:guava:15.0 at file:/C:/Users/anrdaemon/AppData/Roaming/.minecraft/libraries/com/google/guava/guava/15.0/guava-15.0.jar
2020-09-12 00:43:11.939 [info] Found library org.apache.commons:commons-lang3:3.1 at file:/C:/Users/anrdaemon/AppData/Roaming/.minecraft/libraries/org/apache/commons/commons-lang3/3.1/commons-lang3-3.1.jar
2020-09-12 00:43:11.94 [info] Found library commons-io:commons-io:2.4 at file:/C:/Users/anrdaemon/AppData/Roaming/.minecraft/libraries/commons-io/commons-io/2.4/commons-io-2.4.jar
2020-09-12 00:43:11.941 [info] Found library commons-codec:commons-codec:1.9 at file:/C:/Users/anrdaemon/AppData/Roaming/.minecraft/libraries/commons-codec/commons-codec/1.9/commons-codec-1.9.jar
2020-09-12 00:43:11.941 [info] Found library net.java.jinput:jinput:2.0.5 at file:/C:/Users/anrdaemon/AppData/Roaming/.minecraft/libraries/net/java/jinput/jinput/2.0.5/jinput-2.0.5.jar
2020-09-12 00:43:11.942 [info] Found library net.java.jutils:jutils:1.0.0 at file:/C:/Users/anrdaemon/AppData/Roaming/.minecraft/libraries/net/java/jutils/jutils/1.0.0/jutils-1.0.0.jar
2020-09-12 00:43:11.943 [info] Found library com.google.code.gson:gson:2.2.4 at file:/C:/Users/anrdaemon/AppData/Roaming/.minecraft/libraries/com/google/code/gson/gson/2.2.4/gson-2.2.4.jar
2020-09-12 00:43:11.944 [info] Found library com.mojang:authlib:1.5.21 at file:/C:/Users/anrdaemon/AppData/Roaming/.minecraft/libraries/com/mojang/authlib/1.5.21/authlib-1.5.21.jar
2020-09-12 00:43:11.945 [info] Found library org.apache.logging.log4j:log4j-api:2.0-beta9 at file:/C:/Users/anrdaemon/AppData/Roaming/.minecraft/libraries/org/apache/logging/log4j/log4j-api/2.0-beta9/log4j-api-2.0-beta9.jar
2020-09-12 00:43:11.945 [info] Found library org.apache.logging.log4j:log4j-core:2.0-beta9 at file:/C:/Users/anrdaemon/AppData/Roaming/.minecraft/libraries/org/apache/logging/log4j/log4j-core/2.0-beta9/log4j-core-2.0-beta9.jar
2020-09-12 00:43:11.946 [info] Found library org.lwjgl.lwjgl:lwjgl:2.9.1 at file:/C:/Users/anrdaemon/AppData/Roaming/.minecraft/libraries/org/lwjgl/lwjgl/lwjgl/2.9.1/lwjgl-2.9.1.jar
2020-09-12 00:43:11.947 [info] Found library org.lwjgl.lwjgl:lwjgl_util:2.9.1 at file:/C:/Users/anrdaemon/AppData/Roaming/.minecraft/libraries/org/lwjgl/lwjgl/lwjgl_util/2.9.1/lwjgl_util-2.9.1.jar
2020-09-12 00:43:11.948 [info] Found library org.lwjgl.lwjgl:lwjgl-platform:2.9.1 at file:/C:/Users/anrdaemon/AppData/Roaming/.minecraft/libraries/org/lwjgl/lwjgl/lwjgl-platform/2.9.1/lwjgl-platform-2.9.1-natives-windows.jar
2020-09-12 00:43:11.948 [info] Found library net.java.jinput:jinput-platform:2.0.5 at file:/C:/Users/anrdaemon/AppData/Roaming/.minecraft/libraries/net/java/jinput/jinput-platform/2.0.5/jinput-platform-2.0.5-natives-windows.jar
2020-09-12 00:43:11.949 [info] Found library tv.twitch:twitch:5.16 at file:/C:/Users/anrdaemon/AppData/Roaming/.minecraft/libraries/tv/twitch/twitch/5.16/twitch-5.16.jar
2020-09-12 00:43:11.95 [info] Found library tv.twitch:twitch-platform:5.16 at file:/C:/Users/anrdaemon/AppData/Roaming/.minecraft/libraries/tv/twitch/twitch-platform/5.16/twitch-platform-5.16-natives-windows-32.jar
2020-09-12 00:43:11.951 [info] Found library tv.twitch:twitch-external-platform:4.5 at file:/C:/Users/anrdaemon/AppData/Roaming/.minecraft/libraries/tv/twitch/twitch-external-platform/4.5/twitch-external-platform-4.5-natives-windows-32.jar
2020-09-12 00:43:11.951 [info] Finished loading libraries.
2020-09-12 00:43:12.022 [info] Recognised Minecraft Version 1.7.10 with the magic string "riqinckb[Lmt;oi[J[[Jns".
2020-09-12 00:43:12.031 [info] Reading 1.7.10.jar
2020-09-12 00:43:12.038 [error] amidst.mojangapi.minecraftinterface.MinecraftInterfaceCreationException: unable to create local minecraft interface
    at amidst.mojangapi.minecraftinterface.MinecraftInterfaces.fromLocalProfile(MinecraftInterfaces.java:46)
    at amidst.mojangapi.RunningLauncherProfile.from(RunningLauncherProfile.java:26)
    at amidst.mojangapi.LauncherProfileRunner.run(LauncherProfileRunner.java:22)
    at amidst.gui.profileselect.LocalProfileComponent.tryLoad(LocalProfileComponent.java:142)
    at amidst.threading.WorkerExecutor.lambda$run$9(WorkerExecutor.java:71)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: amidst.clazz.real.JarFileParsingException: Error extracting jar data.
    at amidst.clazz.real.RealClasses.readRealClassesFromJarFile(RealClasses.java:37)
    at amidst.clazz.real.RealClasses.fromJarFile(RealClasses.java:24)
    at amidst.clazz.Classes.createSymbolicClassMap(Classes.java:35)
    at amidst.mojangapi.minecraftinterface.MinecraftInterfaces.fromLocalProfile(MinecraftInterfaces.java:36)
    ... 7 more
Caused by: java.nio.file.NoSuchFileException: C:\Users\anrdaemon\AppData\Roaming\.minecraft\versions\1.7.10\1.7.10.jar
    at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
    at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
    at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
    at sun.nio.fs.WindowsLinkSupport.getFinalPath(Unknown Source)
    at sun.nio.fs.WindowsLinkSupport.getRealPath(Unknown Source)
    at sun.nio.fs.WindowsPath.toRealPath(Unknown Source)
    at sun.nio.fs.WindowsPath.toRealPath(Unknown Source)
    at com.sun.nio.zipfs.ZipFileSystemProvider.newFileSystem(ZipFileSystemProvider.java:111)
    at java.nio.file.FileSystems.newFileSystem(Unknown Source)
    at java.nio.file.FileSystems.newFileSystem(Unknown Source)
    at amidst.parsing.URIUtils.openZipFile(URIUtils.java:60)
    at amidst.clazz.real.RealClasses.readRealClassesFromJarFile(RealClasses.java:34)
    ... 10 more

The file exists, and is a regular 1.7.10 binary. The 4.4 version runs fine with the same profile. 4.5/4.6 crashes as shown.

burgerindividual commented 4 years ago

Are you sure that you aren't running amidst in a zip file or something similar? If you're completely certain that the jar exists in the right path, then I'll take a look at the code and see if there's anything wrong with it.

AnrDaemon commented 4 years ago

100% sure. :)

image

AnrDaemon commented 4 years ago

I'll be glad to help you collect more info, if you can help me through it.

burgerindividual commented 4 years ago

The only thing that I can think of is that the directory isn't being parsed correctly. You're 100% certain that the exact directory exists?

AnrDaemon commented 4 years ago

It's the same directory that 3.7 and 4.4 opening just fine.

AnrDaemon commented 3 years ago

Any news? Or any more data I can provide?

AnrDaemon commented 3 years ago

Do you need any more data? I have to use 4.4 for the time being. :(

AnrDaemon commented 3 years ago

4.4.log 4.6.log

Indeed, all files are where they are. What did you do the the loading process, that it suddenly unable to read files?

burgerindividual commented 3 years ago

Do versions other than 1.7.10 work?

burgerindividual commented 3 years ago

What did you do the the loading process, that it suddenly unable to read files?

From 4.4 to 4.6 we switched all of the code to use the Path object rather than the File object. This could possibly cause some issues, but it's very strange because typically Path has better compatibility. With the adoption of Path, we couldn't use the ZipFile class anymore. We switched to using the much more finicky ZipFileSystem, which required us to convert the Path to a URI before we can locate the jar. I found multiple bug reports for the JDK stating that there may be an issue with Java when converting the URI back to a Path. I made a PR (#951) that should fix this bug, but I'm not entirely sure because I have no way of testing it. If you want, I can make a build of the program that you can use to test if the PR actually fixed it or not.

AnrDaemon commented 3 years ago

Yes please. Or I could walk you through creation of a similar directory setup to reproduce the issue, if you have Windows system to test. (VM preferable)

AnrDaemon commented 3 years ago

Do versions other than 1.7.10 work?

Given that they haven't fixed native launcher yet… I haven't tried, honestly.

AnrDaemon commented 3 years ago

@burgerguy ping?

burgerindividual commented 3 years ago

Sorry about that, here's a build of that branch that the PR is under.

MD5 Hash: d2691fe794e6e2be2f95a858010c2df9 VirusTotal: https://www.virustotal.com/gui/file/34986e5dfeb84b71ecfa33d68c0e78c73c72988797ecd4ae7f6c7589e2727d82/

Let me know if it works. If it doesn't, you can post the crash log here so we can see if it's any different.

AnrDaemon commented 3 years ago

Sorry for email spam. I will reboot and retest again more thoroughly. I have an idea of what was changed.

AnrDaemon commented 3 years ago

Yes. I had to remove my directory setup because of that MC launcher bug, and it fixed AMIDST as well.

The short version is that Java freak out if realpath resolution end up in UNC volume name. I can write a long version, but I don't think it's warranted given I can't revert setup easily. (Moving profile directory is not easy.)