Jump to content

Recommended Posts

Posted
Memory: 886877880 bytes (845 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)

JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M

 

Minecraft is only configured to use 1 GB. Do you have the

_JAVA_OPTIONS

environment variable set?

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted

FFS, why do we keep seeing this?

 

        if(ID == mod.guiIDMoriumWorkbench)
        {
            return ID == mod.guiIDMoriumWorkbench //...

 

You already checked the ID, why are you checking it again?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

I have tried everything for what to put there. I just don't know what to put there, because it gives an error for every thing I put there except that what you see there right now.

Posted

What you should have is

 

        if(ID == mod.guiIDMoriumWorkbench)
        {
            return ContainerMoriumWorkbench(player.inventory, world, x, y, z);
        }

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

It underlines and gives an error on: ContainerMoriumWorkbench AND GuiMoriumWorkbench. It wants me to create a method for both but of course that won't do anything, it just needs to import is what I would think.

 

package com.tristanvo.mod.gui;

 

import com.tristanvo.mod.mod;

 

import cpw.mods.fml.common.network.IGuiHandler;

import net.minecraft.entity.player.EntityPlayer;

import net.minecraft.entity.player.InventoryPlayer;

import net.minecraft.tileentity.TileEntity;

import net.minecraft.world.World;

 

public class GuiHandler implements IGuiHandler {

 

@Override

public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {

TileEntity entity = world.getTileEntity(x, y, z);

 

if(ID == mod.guiIDMoriumWorkbench)

{

return ContainerMoriumWorkbench(player.inventory, world, x, y, z);

}

}

@Override

public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {

TileEntity entity = world.getTileEntity(x, y, z);

 

if(ID == mod.guiIDMoriumWorkbench)

{

return GuiMoriumWorkbench(player.inventory, world, x, y, z);

}

}

}

Posted

oh, sorry, I must have snipped out the "new" keyword by accident.  You should have been able to fix that on your own.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Thanks, it doesn't give any error anymore. I could've know indeed haha. But it's still crashing when I'm opening the Gui. It says I'm running out of memory but I never ran out of memory before on Minecraft. So it's still not really fixed. Can you help? :)

Posted

It still crashes and freezes when I open my GUI...

 

If it's running out of memory, I suspect you still have 1 GB assigned; probably from the

_JAVA_OPTIONS

environment variable.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted

First how do I assign more RAM to Minecraft in eclipse then? And secondly, why would it run out of memory when opening a GUI. Why a crash when opening my custom GUI and not when opening the standard crafting table GUI?

Posted

First how do I assign more RAM to Minecraft in eclipse then? And secondly, why would it run out of memory when opening a GUI. Why a crash when opening my custom GUI and not when opening the standard crafting table GUI?

 

The default amount of memory (1.75 GB on my machine) should be fine, but something's limiting the memory to 1 GB with a JVM argument. This is most likely the run configuration in your IDE or an environment variable. If it's the former, delete the JVM arguments. If it's the latter, delete the environment variable.

 

I'm not sure exactly why only your GUI is crashing, perhaps it just uses more memory than the vanilla GUI.

 

I've just noticed that the crash report you linked in the OP doesn't mention your GUI (or any GUI) at all. Could you post the most recent crash report?

 

Edit: Added a missing word.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted

Try set an exception breakpoint for

OutOfMemoryError

in your IDE's debugger and step through the stack frames. Does anything stand out?

 

Upload your FML log (logs/fml-client-latest.log) to Gist/Pastebin and link it here, it may also contain some useful information.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted

Breakpoints are part of your IDE's debugger, I suggest you read up on how to use it.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted

Post the new FML log.

 

Search the Internet for "how to set breakpoints <your IDE here>", there should be plenty of results.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted

It definitely looks like a memory leak now, there's no way Minecraft should be running out of memory with 8 GB available.

 

IDE stands for Integrated Development Environment, you could have looked this up yourself. Eclipse and IntelliJ IDEA are the two IDEs supported by Forge/ForgeGradle.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted

Normally you'd set a breakpoint in a method related to your issue so you could step through it and see what's going on.

 

In this case, set an exception breakpoint rather than a line breakpoint so execution is paused when an

OutOfMemoryError

is thrown.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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