NullPointerException at ExternalResourceMetaData.getSha1() at SourceRemapper
See original GitHub issueMinecraft version: any (especially 1.16.5 & 1.17.x)
Loom: from 0.5 to 0.9
Java: Oracle JDK 16.0.1 or AdoptOpenJDK 16.0.1.9
Gradle: 7.0.2 Binary from wrapper
build.gradle: Ubuntu Pastebin
settings.gradle:
pluginManagement {
repositories {
maven {
name = 'Fabric'
url = 'https://maven.fabricmc.net/'
}
gradlePluginPortal()
}
}
buildscript.dependencies {
classpath 'net.fabricmc:tiny-remapper:0.4.2'
}
StackTrace: Ubuntu Pastebin
I’ve tried in multiple devices, but I cannot understand why it crashes.
This repo also have this bug: https://github.com/Featurehouse/sweet_potato-source
How to trigger: use IntelliJ IDEA’s Gradle Sync.
Issue Analytics
- State:
- Created 2 years ago
- Comments:33 (19 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This appears to be a bug in gradle’s native code here:
https://github.com/gradle/native-platform/blob/cfe37a669f31f4b5b8b252462a0b221e054b4a19/native-platform/src/main/cpp/win.cpp#L135-L142
This is becuase on a FAT file stystem GetFileInformationByHandleEx fails with error ERROR_INVALID_PARAMETER.
I have a found a few examples of other projects working around this:
https://github.com/golang/go/commit/e4535772ca3f11084ee5fa4d4bd3a542e143b80f https://github.com/coreutils/gnulib/blob/master/lib/stat-w32.c#L218-L219
I was also able to reproduce this by building a minimal c++ test case based off the gradle code.
I will look into making a bug report and a pull request to gradle to fix this issue once I have had a chance to look over it a bit more at a sensible time of day. For now the workaround is to not use FAT file systems.
Big thanks to @teddyxlandlee for figuring out it was based on the file system as this unlocked the key to being able to get a debugger in there, and I would have never been able to find it without that information.
Update: All of my tests were processed on my exFAT USB disk. No problems on NTFS. No problems with non-Fabric gradle projects. Is
Tiny Remapperor Gradle itself incompatible with exFAT file system?Let me try to use FabricMC/TinyRemapper to remap jars on my USB disk.On my USB disk, I tried this:
java -jar tiny-remapper-0.4.2-fat.jar minecraft-1.16.5-merged.jar minecraft-1.16.5-intermediary.jar 1.16.5.tiny official intermediary
and succeeded withFinished after 9953.32 ms.
.So this may be an issue between Gradle (or loom itself) and exFAT file system