Jump to content

Execution failed for Task "decompileMC" Java heap space + Unable daemon process


Recommended Posts

Posted

Hey guys,

 

I wanted to start programming a mod for Minecraft viá Java.

I followed the instruction and downloaded Java JDK 7, Eclipse & Forge.

 

Everything went fine, but when I opened CMD in the Forge Folder and typed :

"gradlew setupDecompWorkspace" it gave me an error after 3-4 minutes.

 

The error said : "decompileMc FAILED;

FAILURE: Build failed with an exception.

* What went wrong: Execution failed for task ':decompileMC'.

> Java heap space"

 

After google'ing a couple of minutes I found some ways to solve this problem.

Next I wrote "gradlew -Dorg.gradle.jvmargs=-Xmx3072m setupDecompWorkspace"

 

I got 16gb workspace so this shouldn't be a big problem, right ?

Now the "Java heap space"-error was solved, but a new error occured.

The new error said : "unable to start the daemon process"

 

So I googled for a solution for this problem.

It said I should go to C:\Users\MyUser and delete the .gradle folder. I followed the instruction but it gave me the same error over and over,

no matter how much heap space I gave Java or how often I tried to start the decompileMc new there were always the same 2 errors.

 

Any idea, what I could do ?

 

Thanks for your help and sorry for the bad english.

 

 

Furkos

Posted

I have the same problem.

 

(my results)

 

 

This set of MCP mappings was designed for MC 1.8.8. Use at your own peril.This set of MCP mappings was designed for MC 1.8.8. Use at your own peril.

 

#################################################

        ForgeGradle 2.1-SNAPSHOT-9fb7522       

  https://github.com/MinecraftForge/ForgeGradle 

#################################################

              Powered by MCP unknown             

            http://modcoderpack.com           

        by: Searge, ProfMobius, Fesh0r,       

        R4wk, ZeuX, IngisKahn, bspkrs         

#################################################

:deobfCompileDummyTask

:deobfProvidedDummyTask

:getVersionJson

:extractUserdev UP-TO-DATE

:extractDependencyATs SKIPPED

:extractMcpData SKIPPED

:extractMcpMappings

:genSrgs SKIPPED

:downloadClient SKIPPED

:downloadServer SKIPPED

:splitServerJar SKIPPED

:mergeJars SKIPPED

:deobfMcSRG SKIPPED

:decompileMc FAILED

 

FAILURE: Build failed with an exception.

 

* What went wrong:

Execution failed for task ':decompileMc'.

> GC overhead limit exceeded

 

* Try:

Run with --info or --debug option to get more log output.

 

* Exception is:

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':decompileMc'.

at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)

at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)

at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)

at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)

at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)

at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)

at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)

at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)

at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)

at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)

at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)

at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:62)

at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)

at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25)

at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)

at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)

at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)

at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)

at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)

at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)

at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)

at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)

at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:155)

at org.gradle.internal.Factories$1.create(Factories.java:22)

at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)

at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:52)

at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:152)

at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:33)

at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:100)

at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:94)

at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)

at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:62)

at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:94)

at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:83)

at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:94)

at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)

at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)

at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:43)

at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28)

at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:77)

at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:47)

at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:51)

at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:28)

at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43)

at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:170)

at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)

at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)

at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)

at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)

at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)

at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)

at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)

at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)

at org.gradle.launcher.Main.doAction(Main.java:33)

at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)

at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)

at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)

at org.gradle.launcher.GradleMain.main(GradleMain.java:23)

at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)

at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127)

at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)

Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded

at org.jetbrains.java.decompiler.struct.StructMember.readAttributes(StructMember.java:50)

at org.jetbrains.java.decompiler.struct.StructMethod.readAttribute(StructMethod.java:105)

at org.jetbrains.java.decompiler.struct.StructMember.readAttributes(StructMember.java:57)

at org.jetbrains.java.decompiler.struct.StructMethod.<init>(StructMethod.java:78)

at org.jetbrains.java.decompiler.struct.StructClass.<init>(StructClass.java:116)

at org.jetbrains.java.decompiler.struct.StructClass.<init>(StructClass.java:75)

at org.jetbrains.java.decompiler.struct.StructContext.addArchive(StructContext.java:167)

at org.jetbrains.java.decompiler.struct.StructContext.addSpace(StructContext.java:100)

at org.jetbrains.java.decompiler.struct.StructContext.addSpace(StructContext.java:78)

at org.jetbrains.java.decompiler.main.decompiler.BaseDecompiler.addSpace(BaseDecompiler.java:36)

at net.minecraftforge.gradle.tasks.ApplyFernFlowerTask.applyFernFlower(ApplyFernFlowerTask.java:98)

at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)

at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:226)

at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:219)

at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:208)

at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:585)

at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:568)

at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)

at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)

at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)

at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)

at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)

at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)

at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)

at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)

at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)

at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)

at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)

 

 

BUILD FAILED

 

Total time: 6 mins 23.678 secs

 

Posted

Give gradle more ram just like you would any other java process, or edit the gradlew.bat file to force it every time.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted

 

create a plain text file,

name it

gradle.properties

inside this file write

org.gradle.jvmargs=-Xmx2048M

 

this will set the memory limit to 2G

 

save it and drop it inside the forge folder, there next to the build.gradle file from your mod

 

that solve this problem for my, but I still stuck whith other two problems,  may you run into them in short

 

  • 7 months later...
Posted

Sorry for the necro, but I have some additional information that people who find this via Google, like me, could find useful:

 

For me it wouldn't let me set the memory flag higher than 1GB, because it used my 32-bit Java Runtime as default.

Therefore, the content of my gradle.properties file needed to be:

org.gradle.java.home = C:/Program Files/Java/jdk1.8.0_101
org.gradle.jvmargs = -Xmx2g

 

I actually needed more than 2 GB of memory for my particular Gradle daemon though.

I walk amongst titans.

  • 2 years later...
Posted (edited)

Sorry for necroposting but I know a lot of people get this error while setting up 

gradlew setupDecompWorkspace

Firstly I'd suggest you to follow ForgeDocs and use intelliJ to create your mods. Follow the whole documentation page and if you still get the " :decompileMC  Ran out of Java heapspace " (on step 5 in docs) error. All you have to do is to click on Gradle on the righthandside in intelliJ Idea and click on Gradle settings (gear icon) and set the Gradle VM arguments to 

-Xmx1400M

Check below for pictures explaining the process.unknown.png

 

Make sure you have at least  2 gigs on RAM allocated to JVM. You can check whether its fine or not by going to 

Start Menu> Search Configure Java and open it> In the Java tab click on View> Set the Runtime Parameters to -Xmx3G or -Xmx2G based on how much RAM you have on your computer, 2G should be also fine.

unknown.png

And now go to intelliJ and in the Local Terminal just type in

gradlew setupDecompWorkspace

Allow it ~5 to 15 minutes to setup the workspace and you should be good to go! :)

Happy coding!

Edited by WaningMatrix
Posted

Please don't necropost, and no saying "sorry for" does not excuse you.

Please don't set the Xmx in your ide or on your system every (modern) Forge MDK ships with a gradle.properties that sets this for you.

If you are using an MDK that is old enough to not have this then know that you will not receive support on this forum.

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Hi everyone, I'm currently developing a Forge 1.21 mod for Minecraft and I want to display a custom HUD overlay for a minigame. My goal: When the game starts, all players should see an item/block icon (from the base game, not a custom texture) plus its name/text in the HUD – similar to how the bossbar overlay works. The HUD should appear centered above the hotbar (or at a similar prominent spot), and update dynamically (icon and name change as the target item changes). What I've tried: I looked at many online tutorials and several GitHub repos (e.g. SeasonHUD, MiniHUD), but most of them use NeoForge or Forge versions <1.20 that provide the IGuiOverlay API (e.g. implements IGuiOverlay, RegisterGuiOverlaysEvent). In Forge 1.21, it seems that neither IGuiOverlay nor RegisterGuiOverlaysEvent exist anymore – at least, I can't import them and they are missing from the docs and code completion. I tried using RenderLevelStageEvent as a workaround but it is probably not intended for custom HUDs. I am not using NeoForge, and switching the project to NeoForge is currently not an option for me. I tried to look at the original minecraft source code to see how elements like hearts, hotbar etc are drawn on the screen but I am too new to Minecraft modding to understand. What I'm looking for: What is the correct way to add a custom HUD element (icon + text) in Forge 1.21, given that the previous overlay API is missing? Is there a new recommended event, callback, or method in Forge 1.21 for custom HUD overlays, or is everyone just using a workaround? Is there a minimal open-source example repo for Forge 1.21 that demonstrates a working HUD overlay without relying on NeoForge or deprecated Forge APIs? My ideal solution: Centered HUD element with an in-game item/block icon (from the base game's assets, e.g. a diamond or any ItemStack / Item) and its name as text, with a transparent background rectangle. It should be visible to the players when the mini game is running. Easy to update the item (e.g. static variable or other method), so it can change dynamically during the game. Any help, code snippets, or up-to-date references would be really appreciated! If this is simply not possible right now in Forge 1.21, it would also help to know that for sure. Thank you very much in advance!
    • The simple answer is there is not an easy way. You would need to know how to program in Java, as well as at least some familiarity with how Forge works so you could port the differences. You would also need the sourcecode for the original mod, and permission from the author to modify it, if they did not use some sort of open source license. So it's not impossible, but it would take some effort, but doing so would open up a whole new world of possibilities for you!
    • Does it still crash if you remove holdmyitems? Looks like that mod doesn't work on a server as far as I can tell from the error.  
    • Crashes the server when trying to start. Error code -1. Log  
  • Topics

  • Who's Online (See full list)

    • There are no registered users currently online
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.