Jump to content

[SOLVED] [1.5.2] When enabling my mod Minecraft crashes { ... }


Recommended Posts

Posted

I'm currently trying to make a mod that uses ComputerCraft as dependency, and I followed a thread on the computercraft forums on how to set that up ( have a deobfuscated jar, referenced in the project, and located at mcp/libs )

 

The mod is currently just a main mod file, a block file which gets a custom creative tab and texture, and a client/commonproxy, and the main mod file registers the blocks and creates the creative tab.

 

This is what happens with what I tried:

 

  • When running minecraft from Eclipse with the 'run' function, and my mod disabled ( commenting out @mod and @networkmod ) minecraft launches fine and I can walk around in my world
  • When running minecraft again from eclipse / 'run', with my mod enabled, minecraft launches, and the Gui works, but when trying to open my world, it crashes with this error:

 

2013-07-25 17:46:25 [iNFO] [sTDERR] java.lang.OutOfMemoryError: Java heap space

2013-07-25 17:46:25 [iNFO] [sTDERR] at java.util.Arrays.copyOf(Unknown Source)

2013-07-25 17:46:25 [iNFO] [sTDERR] at java.util.ArrayList.grow(Unknown Source)

2013-07-25 17:46:25 [iNFO] [sTDERR] at java.util.ArrayList.ensureCapacityInternal(Unknown Source)

2013-07-25 17:46:25 [iNFO] [sTDERR] at java.util.ArrayList.add(Unknown Source)

2013-07-25 17:46:25 [iNFO] [sTDERR] at net.minecraft.util.AABBPool.getAABB(AABBPool.java:51)

2013-07-25 17:46:25 [iNFO] [sTDERR] at net.minecraft.block.Block.getCollisionBoundingBoxFromPool(Block.java:593)

2013-07-25 17:46:25 [iNFO] [sTDERR] at net.minecraft.block.Block.addCollisionBoxesToList(Block.java:559)

2013-07-25 17:46:25 [iNFO] [sTDERR] at net.minecraft.world.World.getCollidingBoundingBoxes(World.java:1686)

2013-07-25 17:46:25 [iNFO] [sTDERR] at net.minecraft.entity.player.EntityPlayerMP.<init>(EntityPlayerMP.java:178)

2013-07-25 17:46:25 [iNFO] [sTDERR] at net.minecraft.server.management.ServerConfigurationManager.createPlayerForUser(ServerConfigurationManager.java:383)

2013-07-25 17:46:25 [iNFO] [sTDERR] at net.minecraft.server.integrated.IntegratedServerListenThread.networkTick(IntegratedServerListenThread.java:91)

2013-07-25 17:46:25 [iNFO] [sTDERR] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:677)

2013-07-25 17:46:25 [iNFO] [sTDERR] at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:573)

2013-07-25 17:46:25 [iNFO] [sTDERR] at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:127)

2013-07-25 17:46:25 [iNFO] [sTDERR] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:470)

2013-07-25 17:46:25 [iNFO] [sTDERR] at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)

2013-07-25 17:46:25 [sEVERE] [Minecraft-Server] Encountered an unexpected exception OutOfMemoryError

java.lang.OutOfMemoryError: Java heap space

at java.util.Arrays.copyOf(Unknown Source)

at java.util.ArrayList.grow(Unknown Source)

at java.util.ArrayList.ensureCapacityInternal(Unknown Source)

at java.util.ArrayList.add(Unknown Source)

at net.minecraft.util.AABBPool.getAABB(AABBPool.java:51)

at net.minecraft.block.Block.getCollisionBoundingBoxFromPool(Block.java:593)

at net.minecraft.block.Block.addCollisionBoxesToList(Block.java:559)

at net.minecraft.world.World.getCollidingBoundingBoxes(World.java:1686)

at net.minecraft.entity.player.EntityPlayerMP.<init>(EntityPlayerMP.java:178)

at net.minecraft.server.management.ServerConfigurationManager.createPlayerForUser(ServerConfigurationManager.java:383)

at net.minecraft.server.integrated.IntegratedServerListenThread.networkTick(IntegratedServerListenThread.java:91)

at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:677)

at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:573)

at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:127)

at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:470)

at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)

 

I can't really figure out what the problem is, as in the errors my mod isn't mentioned anywhere ( it's called net.nbtforcc.MainMod, and so on )

I'm getting the feeling I've caused some sort of loop that doesn't stop, and overfloods an Array ( because that is being mentioned in the errors ) because the first time I tried, I didn't close my minecraft for a long time, and after a while I had 10Gb of used memory ( seen from taskmanager ).

 

If anyone has an idea of what could be going on you could really help me out.

 

Source: https://github.com/WouterG/NBTforCC

Posted

well you knwo exactly whats going on.

 

java.lang.OutOfMemoryError: Java heap space

thats basicly the JVM saying

 

WOOOO MAN TOO MUCH SHIT HAPPENING

 

are you creating like 100 000 000 000 000 object? somewhere ?

because all that says is that you are using too much memory

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Posted

welll yknow i can help but you have to do some of the work too

 

you're instancing your dataBlock staticly, try doing that in the preinit it *might* be part of the problem

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Posted

it appears that this loop is stuck forever ( EntityPlayerMP line 178 )

 

        while (!par2World.getCollidingBoundingBoxes(this, this.boundingBox).isEmpty())
        {
            this.setPosition(this.posX, this.posY + 1.0D, this.posZ);
        }

 

so as far as I'm understanding, for some reason my mod is causing everything in the world to be occupied with something, which causes this loop to keep checking up where there might be space, but there won't be...

Posted

yup, I found out I was using the latest version of forge, instead of the latest recommended for 1.5.2, so i tried that, same result.. I also tried 1.6.2 ( with other computercraft lib ofc ) same result

Posted

well that was stupid, I accidentaly set the block ID integer after using it to set the block ID, so the block ID was set to 0, which is air, and so all normal air blocks were now my block...

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.