[6.0] Index 0 out of bounds for length 0 in reobfJar

Open
#937 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java
Domain
build-system

Research direction

Reproduce the failure with the linked MultiLoader template by running the Forge module's build and inspecting the reobfJar task. Start with net.minecraftforge.gradle.userdev.tasks.RenameJarInPlace.java and the srgutils loading calls shown in the stack trace. Done means the template build completes without the IndexOutOfBoundsException.

Written by the indexing model from the issue text.

Description

FG6

When using this multiloader template, ForgeGradle is running into an odd exception in reobfJar during build. I've tried experimenting with removing certain parts of the template, but couldn't pinpoint what exactly is causing the issue.

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':forge:reobfJar'.
        ...
Caused by: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
        ...
        at net.minecraftforge.srgutils.InternalUtils.loadNamed(InternalUtils.java:39)
        at net.minecraftforge.srgutils.InternalUtils.load(InternalUtils.java:28)
        at net.minecraftforge.srgutils.IMappingFile.load(IMappingFile.java:27)
        at net.minecraftforge.srgutils.IMappingFile.load(IMappingFile.java:22)
        at net.minecraftforge.gradle.userdev.tasks.RenameJarInPlace.apply(RenameJarInPlace.java:66)

Full Stacktrace

Dominant language
Java
Stars
574
Forks
450
Avg merge
16h 20m
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MinecraftForge/ForgeGradle

All issues in MinecraftForge/ForgeGradle

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.