Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.7.10] [UNSOLVED] Ticking memory exception/NullPointerException...


Ms_Raven
 Share

Recommended Posts

I'm assuming this is another problem with the gui I just made...

But I have NO idea what this means. I'm seeing 'processPlayerBlockPlacement' but I'm trying to open a gui with an item, there's no blocks involved? The gui pops up, and a second or two later there's this:

 

Crash

[20:17:31] [server thread/ERROR]: Encountered an unexpected exception

net.minecraft.util.ReportedException: Ticking memory connection

at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:198) ~[NetworkSystem.class:?]

at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726) ~[MinecraftServer.class:?]

at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) ~[MinecraftServer.class:?]

at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) ~[integratedServer.class:?]

at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) [MinecraftServer.class:?]

at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) [MinecraftServer$2.class:?]

Caused by: java.lang.NullPointerException

at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:657) ~[NetHandlerPlayServer.class:?]

at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:74) ~[C08PacketPlayerBlockPlacement.class:?]

at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:122) ~[C08PacketPlayerBlockPlacement.class:?]

at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) ~[NetworkManager.class:?]

at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182) ~[NetworkSystem.class:?]

... 5 more

[20:17:31] [server thread/ERROR]: This crash report has been saved to: C:\Users\Avery\Documents\Mods\FandomCraft 2\eclipse\.\crash-reports\crash-2015-04-29_20.17.31-server.txt

[20:17:31] [server thread/INFO]: Stopping server

[20:17:31] [server thread/INFO]: Saving players

[20:17:31] [Client thread/INFO] [sTDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: ---- Minecraft Crash Report ----

// Don't be sad. I'll do better next time, I promise!

 

Time: 29/04/15 20:17

Description: Ticking memory connection

 

java.lang.NullPointerException: Ticking memory connection

at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:657)

at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:74)

at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:122)

at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241)

at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182)

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

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

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

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

at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)

 

 

A detailed walkthrough of the error, its code path and all known details is as follows:

---------------------------------------------------------------------------------------

 

-- Head --

Stacktrace:

at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:657)

at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:74)

at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:122)

at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241)

 

-- Ticking connection --

Details:

Connection: net.minecraft.network.NetworkManager@219c289c

Stacktrace:

at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182)

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

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

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

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

at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)

 

-- System Details --

Details:

Minecraft Version: 1.7.10

Operating System: Windows 8.1 (amd64) version 6.3

Java Version: 1.8.0_40, Oracle Corporation

Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation

Memory: 691539376 bytes (659 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)

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

AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

IntCache: cache: 11, tcache: 80, allocated: 1, tallocated: 14

FML: MCP v9.05 FML v7.10.85.1291 Minecraft Forge 10.13.2.1291 4 mods loaded, 4 mods active

mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

FML{7.10.85.1291} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

Forge{10.13.2.1291} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

fandomcraft{4.1.1} [FandomCraft] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

Profiler Position: N/A (disabled)

Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

Player Count: 1 / 8; [EntityPlayerMP['MissApocalypse'/121, l='New World', x=-280.35, y=71.00, z=233.52]]

Type: Integrated Server (map_client.txt)

Is Modded: Definitely; Client brand changed to 'fml,forge'

 

 

Opening the gui:

 

@Override

public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)

{

if (!player.capabilities.isCreativeMode)

{

--stack.stackSize;

}

if (!world.isRemote)

{

int i = (int)player.posX;

int j = (int)player.posY;

int k = (int)player.posZ;

player.openGui(Main.instance, Main.GuiTravellerOver, player.worldObj, i, j, k);

}

return stack;

}

 

 

The gui:

 

public class GuiShopTravellerOver extends GuiContainer

{

 

private GuiTextField amount1;

private GuiTextField amount2;

private GuiTextField amount3;

private GuiTextField amount4;

 

private String text_amount1 = "";

private String text_amount2 = "";

private String text_amount3 = "";

private String text_amount4 = "";

 

private int final_amount1=0;

private int final_amount2=0;

private int final_amount3=0;

private int final_amount4=0;

 

private int paid1 = 0;

private int paid2 = 0;

private int paid3 = 0;

private int paid4 = 0;

 

private int totalPrice = 0;

 

 

public GuiShopTravellerOver(ContainerShop container)

{

super(container);

}

 

private static final ResourceLocation texture = new ResourceLocation(Main.modid + ":textures/gui/stretchedIcons/" + "guiShop.png");

 

protected void drawGuiContainerBackgroundLayer(float f, int x, int y)

{

 

int posX = (this.width) /2;

int posY = (this.height) /2;

 

GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);

 

this.mc.renderEngine.bindTexture(texture);

this.xSize=128;

this.ySize=128;

int k = (this.width - this.xSize) / 2;

int l = (this.height - this.ySize) / 2;

this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);

 

 

 

}

 

protected void mouseClicked(int par1, int par2, int par3)

{

super.mouseClicked(par1, par2, par3);

this.amount1.mouseClicked(par1, par2, par3);

this.amount2.mouseClicked(par1, par2, par3);

this.amount3.mouseClicked(par1, par2, par3);

this.amount4.mouseClicked(par1, par2, par3);

 

}

 

public void updateScreen()

{

int posX = (this.width) /2;

int posY = (this.height) /2;

 

this.amount1.updateCursorCounter();

this.amount2.updateCursorCounter();

this.amount3.updateCursorCounter();

this.amount4.updateCursorCounter();

}

 

protected void keyTyped(char par1, int par2)

{

 

this.amount1.textboxKeyTyped(par1, par2);

this.amount2.textboxKeyTyped(par1, par2);

this.amount3.textboxKeyTyped(par1, par2);

this.amount4.textboxKeyTyped(par1, par2);

 

if (par2 != 28 && par2 != 156)

{

if (par2 == 1)

{

this.mc.displayGuiScreen((GuiScreen)null);

}

}

 

}

 

protected void drawGuiContainerForegroundLayer(int par1, int par2)

{

int posX = (this.width) /2;

int posY = (this.height) /2;

 

this.fontRendererObj.drawString("Halo of the Sun", posX+(-60), posY+(-55), 0xfff000);

this.fontRendererObj.drawString("Throwing Knife", posX+(-60), posY+(-27), 0xfff000);

this.fontRendererObj.drawString("Mining Helmet", posX+(-60), posY+(1), 0xfff000);

this.fontRendererObj.drawString("Backpack", posX+(-60), posY+(29), 0xfff000);

 

this.amount1.drawTextBox();

this.amount2.drawTextBox();

this.amount3.drawTextBox();

this.amount4.drawTextBox();

}

 

public void onGuiClosed()

{

Keyboard.enableRepeatEvents(false);

}

 

public void initGui(){

Keyboard.enableRepeatEvents(true);

this.buttonList.clear();

int posX = (this.width) / 2;

int posY = (this.height) / 2;

 

this.buttonList.add(new GuiButton(0, posX+(-16), posY+(70), 36, 20, "Buy"));

 

this.amount1 = new GuiTextField(this.fontRendererObj, posX+(30), posY+(-59), 28, 20);

this.amount1.setMaxStringLength(2);

 

this.amount1.setText("0");

 

this.amount2 = new GuiTextField(this.fontRendererObj, posX+(30), posY+(-31), 28, 20);

this.amount2.setMaxStringLength(2);

 

this.amount2.setText("0");

 

this.amount3 = new GuiTextField(this.fontRendererObj, posX+(30), posY+(-3), 28, 20);

this.amount3.setMaxStringLength(2);

 

this.amount3.setText("0");

 

this.amount4 = new GuiTextField(this.fontRendererObj, posX+(30), posY+(25), 28, 20);

this.amount4.setMaxStringLength(2);

 

this.amount4.setText("0");

}

 

protected void actionPerformed(GuiButton button)

{

MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();

World world = server.worldServers[0];

EntityPlayer player = Minecraft.getMinecraft().thePlayer;

int i = (int)player.posX;

int j = (int)player.posY;

int k = (int)player.posZ;

 

if (button.id == 0)

{

if(player instanceof EntityPlayer)((EntityPlayer)player).openGui(Main.instance, Main.FGuidePage1, world, i, j, k);

 

}

}

 

 

 

public void checkout(EntityPlayer player)

{

ExtendedPlayer props = ExtendedPlayer.get(player);

int posX = (this.width) /2;

int posY = (this.height) /2;

 

correctValues();

fixValues();

convertToInteger();

 

totalPrice = (paid1+paid2+paid3+paid4);

 

if(inventoryHasRoom(player))

{

if(props.getMoney() >= (totalPrice))

{

if(final_amount1>0)player.inventory.addItemStackToInventory(new ItemStack(HorrorReg.haloOfTheSun, final_amount1));

if(final_amount2>0)player.inventory.addItemStackToInventory(new ItemStack(Main.bomb, final_amount2));

if(final_amount3>0)player.inventory.addItemStackToInventory(new ItemStack(Main.miningHelmet, final_amount3));

if(final_amount4>0)player.inventory.addItemStackToInventory(new ItemStack(HorrorReg.backpack, final_amount4));

props.spendMoney(totalPrice);

this.fontRendererObj.drawString("Purchased!", posX+(82), posY+(40), 0xfff000);

}

else

{

this.fontRendererObj.drawString("You can't afford that.", posX+(70), posY+(40), 0xfff000);

 

}

}

else

{

this.fontRendererObj.drawString("You don't have enough room.", posX+(76), posY+(40), 0xfff000);

 

}

}

public boolean inventoryHasRoom(EntityPlayer player)

{

int emptySlots = 0;

int neededSlots = (final_amount1+final_amount2+final_amount3+final_amount4);

for(int i = 0; i <35; i++)

{

if(player.inventory.getStackInSlot(i) != null)

{

emptySlots++;

}

}

if(emptySlots > neededSlots)

{

return true;

}

else return false;

}

 

public void toMoney()

{

paid1 = final_amount1 * 1500;

paid2 = final_amount2 * 50;

paid3 = final_amount3 * 500;

paid4 = final_amount4 * 750;

 

}

 

public void checkValues()

{

int stacks = 0;

if(final_amount1>0){stacks++;};

if(final_amount2>0){stacks++;};

if(final_amount3>0){stacks++;};

if(final_amount4>0){stacks++;};

if(final_amount1>64){final_amount1=64;};

if(final_amount2>64){final_amount2=64;};

if(final_amount3>64){final_amount3=64;};

if(final_amount4>64){final_amount4=64;};

 

}

public void correctValues()

{

text_amount1 = amount1.getText();

text_amount2 = amount2.getText();

text_amount3 = amount3.getText();

text_amount4 = amount4.getText();

 

if(amount1.getText().isEmpty())

{

text_amount1 = "0";

}

if(amount2.getText().isEmpty())

{

text_amount2 = "0";

}

if(amount3.getText().isEmpty())

{

text_amount3 = "0";

}

if(amount4.getText().isEmpty())

{

text_amount4 = "0";

}

}

 

public void convertToInteger()

{

final_amount1 = Integer.getInteger(text_amount1);

final_amount2 = Integer.getInteger(text_amount2);

final_amount3 = Integer.getInteger(text_amount3);

final_amount4 = Integer.getInteger(text_amount4);

}

 

public void fixValues()

{

Tools.println("Original string: " + text_amount1 + " becomes: " + text_amount1.replaceAll("\\D", ""));

text_amount1 = text_amount1.replaceAll("\\D", "");

Tools.println("Original string: " + text_amount2 + " becomes: " + text_amount2.replaceAll("\\D", ""));

text_amount2 = text_amount2.replaceAll("\\D", "");

Tools.println("Original string: " + text_amount3 + " becomes: " + text_amount3.replaceAll("\\D", ""));

text_amount3 = text_amount3.replaceAll("\\D", "");

Tools.println("Original string: " + text_amount4 + " becomes: " + text_amount4.replaceAll("\\D", ""));

text_amount4 = text_amount4.replaceAll("\\D", "");

}

 

public boolean doesGuiPauseGame()

{

return false;

}

 

}

 

 

The container:

 

public class ContainerShop extends Container

{

public ContainerShop(EntityPlayer par1Player)

{

}

 

    @Override

    public boolean canInteractWith(EntityPlayer player)

    {

            return true;

    }

 

 

    protected void bindPlayerInventory(InventoryPlayer inventoryPlayer)

    {

    }

 

    @Override

    public ItemStack transferStackInSlot(EntityPlayer player, int slot)

    {

            return null;

    }

 

}

 

 

Gui handler:

 

 

@Override public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z)

{

if(id == Main.GuiBackpack)

{

return new ContainerBackpack(player, player.inventory, new InventoryBackpack(player.getHeldItem()));

}

if(id == Main.GuiTravellerOver)

{

return new ContainerShop(player);

}

return new FCGuiContainer(player);

}

@Override public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z)

{

if(id == 0)

{

return new FCGuideHome(world, y, z, z, player);

}

if(id == 1)

{

return new FCGuidePage1(world, y, z, z, player);

}

if(id == 2)

{

return new FCGuidePage2(world, y, z, z, player);

}

if(id == 3)

{

return new FCGuidePage3(world, y, z, z, player);

}

if(id == 4)

{

return new FCGuidePage4(world, y, z, z, player);

}

if(id == 5)

{

return new FCGuidePage5(world, y, z, z, player);

}

if(id == 6)

{

return new FCGuidePage6(world, y, z, z, player);

}

if(id == 7)

{

return new FCGuidePage7(world, y, z, z, player);

}

if(id == 8)

{

return new FCGuidePage8(world, y, z, z, player);

}

if(id == 9)

{

return new FCGuidePage9(world, y, z, z, player);

}

if(id == Main.GuiBackpack)

{

return new GuiBackpack((ContainerBackpack) new ContainerBackpack(player, player.inventory, new InventoryBackpack(player.getHeldItem())));

}

if(id == Main.GuiTravellerOver)

{

return new GuiShopTravellerOver((ContainerShop) new ContainerShop(player));

}

return new FCGuiContainer(player);

}

 

Link to comment
Share on other sites

You should try using:

FMLNetwokHandler.openGui();

 

Also, coolAlias has a tutorial on the minecraft forum about how to make a backpack. It's far more complex than you may expect. :P

I am not a cat. I know my profile picture is sexy and amazing beyond anything you could imagine but my cat like features only persist in my fierce eyes. I might be a cat.

Link to comment
Share on other sites

It does if it somehow gets called from EntityClientPlayerMP. :P What is i, j and k? Try using the player.posXYZ and cast them to Integers.

I am not a cat. I know my profile picture is sexy and amazing beyond anything you could imagine but my cat like features only persist in my fierce eyes. I might be a cat.

Link to comment
Share on other sites

It does if it somehow gets called from EntityClientPlayerMP. :P

No it doesn't. The two do the exact same thing. Always.
What is i, j and k? Try using the player.posXYZ and cast them to Integers.

That's what i, j, k are, read the fuckin' code. But doing this is stupid anyways, I don't know who started it, but passing the player position is useless and stupid.

 

For the actual issue: Why do you have a container without slots?

Link to comment
Share on other sites

Okay, you are missing the point of using Containers.

 

If you want simple Gui, you should use GuiScreen and open it on client side ONLY. that means on server you will return null.

 

If you want to have slots you use Container for server and GuiContainer for client.

 

Using Container and GuiContainer and not having slots is totally pointless.

 

EDIT

In case of GuiScreen exchange of data happens via packets sent from button-clicks.

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

It's a gui, not an inventory, why would I need slots?

 

This took me a while to get as well. The Container is intended to take care of the synchronization between client and server, plus help aggregate multiple IInventory. But it isn't needed for all GUIs.

 

I explain "do you need a container" a bit here: http://jabelarminecraft.blogspot.com/p/minecraft-modding-blocks-with-guis.html

 

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Link to comment
Share on other sites

Okay, you are missing the point of using Containers.

 

If you want simple Gui, you should use GuiScreen and open it on client side ONLY. that means on server you will return null.

 

If you want to have slots you use Container for server and GuiContainer for client.

 

Using Container and GuiContainer and not having slots is totally pointless.

 

EDIT

In case of GuiScreen exchange of data happens via packets sent from button-clicks.

 

 

But now with GuiScreen nothing happens at all, whether I use a packet or open it directly...

The item used to open the gui just disappears and appears when used now, nothing else.

@Override
public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z)
{
	if(id == Main.GuiBackpack)
	{
		return new ContainerBackpack(player, player.inventory, new InventoryBackpack(player.getHeldItem()));
	}
	if(id == Main.GuiTravellerOver)
	{
		return null;
	}
	return new FCGuiContainer(player);
}
@Override
public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z)
{
	if(id == 0)
	{
		return new FCGuideHome(world, y, z, z, player);
	}
	if(id == 1)
	{
		return new FCGuidePage1(world, y, z, z, player);
	}
	if(id == 2)
	{
		return new FCGuidePage2(world, y, z, z, player);
	}
	if(id == 3)
	{
		return new FCGuidePage3(world, y, z, z, player);
	}
	if(id == 4)
	{
		return new FCGuidePage4(world, y, z, z, player);
	}
	if(id == 5)
	{
		return new FCGuidePage5(world, y, z, z, player);
	}
	if(id == 6)
	{
		return new FCGuidePage6(world, y, z, z, player);
	}
	if(id == 7)
	{
		return new FCGuidePage7(world, y, z, z, player);
	}
	if(id == 
	{
		return new FCGuidePage8(world, y, z, z, player);
	}
	if(id == 9)
	{
		return new FCGuidePage9(world, y, z, z, player);
	}
	if(id == Main.GuiBackpack)
	{
		return new GuiBackpack((ContainerBackpack) new ContainerBackpack(player, player.inventory, new InventoryBackpack(player.getHeldItem())));
	}
	if(id == Main.GuiTravellerOver)
	{
		return new GuiShopTravellerOver();
	}
	return new FCGuiContainer(player);
}

 

 

Link to comment
Share on other sites

Could you please describe what exacly are you after?

 

I pulled part of code from my handler, it works.

@Override
public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z)
{
	switch (id)
	{
	case 0: return null;
	}
	return null;
}

@Override
public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z)
{
	switch (id)
	{
	case 0: return new GuiExample(player);
	}
	return null;
}

 

Where GuiExample extends GuiScreen.

 

Opening is called from client thread (via packet):

player.openGui(Main.instance, 0, //whatever params);

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

I'm trying to open the gui....

It just won't open. Not with an item or by interacting with a mob.

I added a system printout after the openGui line and it does show up in console, so the gui is not being called. I can't figure out what I'm doing wrong. It just doesn't work for me.

Link to comment
Share on other sites

I don't think you need the IGuiHandler at all if you are just opening a GuiScreen. I think that is just for GuiContainers as it helps you match the Container (i.e. the server element) with the GuiContainer (i.e. the client element).

 

Just make a GuiScreen class and open it like (on client side):

Minecraft.getMinecraft().displayGuiScreen(new MyCustomGui());

 

or if you have the player you can use EntityPlayerSP#displayGui(). Note this is NOT the openGui() method, that one is for the container guis that need the IGuiHandler..

 

or if you have the FMLClientHandler you can use FMLClientHandler#displayGui().

 

That's it!

 

 

 

 

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Link to comment
Share on other sites

That just makes it crash with this...

 

 

[12:12:31] [Client thread/FATAL]: Reported exception thrown!

net.minecraft.util.ReportedException: Ticking screen

at net.minecraft.client.Minecraft.runTick(Minecraft.java:1755) ~[Minecraft.class:?]

at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1028) ~[Minecraft.class:?]

at net.minecraft.client.Minecraft.run(Minecraft.java:951) [Minecraft.class:?]

at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_40]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_40]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_40]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_40]

at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]

at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]

at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]

at GradleStart.main(Unknown Source) [start/:?]

Caused by: java.lang.NullPointerException

at apocalypse.fandomcraft.gui.GuiShopTravellerOver.updateScreen(GuiShopTravellerOver.java:90) ~[GuiShopTravellerOver.class:?]

at net.minecraft.client.Minecraft.runTick(Minecraft.java:1741) ~[Minecraft.class:?]

... 11 more

[12:12:31] [Client thread/INFO] [sTDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: ---- Minecraft Crash Report ----

// Why is it breaking :(

 

Time: 02/05/15 12:12

Description: Ticking screen

 

java.lang.NullPointerException: Ticking screen

at apocalypse.fandomcraft.gui.GuiShopTravellerOver.updateScreen(GuiShopTravellerOver.java:90)

at net.minecraft.client.Minecraft.runTick(Minecraft.java:1741)

at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1028)

at net.minecraft.client.Minecraft.run(Minecraft.java:951)

at net.minecraft.client.main.Main.main(Main.java:164)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)

at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)

at GradleStart.main(Unknown Source)

 

 

A detailed walkthrough of the error, its code path and all known details is as follows:

---------------------------------------------------------------------------------------

 

-- Head --

Stacktrace:

at apocalypse.fandomcraft.gui.GuiShopTravellerOver.updateScreen(GuiShopTravellerOver.java:90)

 

-- Affected screen --

Details:

Screen name: apocalypse.fandomcraft.gui.GuiShopTravellerOver

 

-- Affected level --

Details:

Level name: MpServer

All players: 1 total; [EntityClientPlayerMP['MissApocalypse'/119, l='MpServer', x=-272.79, y=71.62, z=214.63]]

Chunk stats: MultiplayerChunkCache: 110, 110

Level seed: 0

Level generator: ID 00 - default, ver 1. Features enabled: false

Level generator options:

Level spawn location: World: (-260,64,190), Chunk: (at 12,4,14 in -17,11; contains blocks -272,0,176 to -257,255,191), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)

Level time: 109033 game time, 109033 day time

Level dimension: 0

Level storage version: 0x00000 - Unknown?

Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)

Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false

Forced entities: 6 total; [EntityBat['Bat'/147, l='MpServer', x=-319.34, y=21.00, z=176.59], EntityBat['Bat'/149, l='MpServer', x=-196.47, y=50.86, z=295.07], EntityClientPlayerMP['MissApocalypse'/119, l='MpServer', x=-272.79, y=71.62, z=214.63], EntityMerchantOther['entity.EntityMerchantOther.name'/120, l='MpServer', x=-272.56, y=70.00, z=213.15], EntityBat['Bat'/121, l='MpServer', x=-225.30, y=35.23, z=237.71], EntityBat['Bat'/122, l='MpServer', x=-205.41, y=27.30, z=151.49]]

Retry entities: 0 total; []

Server brand: fml,forge

Server type: Integrated singleplayer server

Stacktrace:

at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:415)

at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2555)

at net.minecraft.client.Minecraft.run(Minecraft.java:973)

at net.minecraft.client.main.Main.main(Main.java:164)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)

at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)

at GradleStart.main(Unknown Source)

 

-- System Details --

Details:

Minecraft Version: 1.7.10

Operating System: Windows 8.1 (amd64) version 6.3

Java Version: 1.8.0_40, Oracle Corporation

Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation

Memory: 694986248 bytes (662 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)

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

AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95

FML: MCP v9.05 FML v7.10.85.1291 Minecraft Forge 10.13.2.1291 4 mods loaded, 4 mods active

mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

FML{7.10.85.1291} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

Forge{10.13.2.1291} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

fandomcraft{4.1.1} [FandomCraft] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

Launched Version: 1.7.10

LWJGL: 2.9.1

OpenGL: AMD Radeon HD 8400 / R3 Series GL version 4.4.13283 Compatibility Profile Context 14.501.1003.0, ATI Technologies Inc.

GL Caps: Using GL 1.3 multitexturing.

Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.

Anisotropic filtering is supported and maximum anisotropy is 16.

Shaders are available because OpenGL 2.1 is supported.

 

Is Modded: Definitely; Client brand changed to 'fml,forge'

Type: Client (map_client.txt)

Resource Packs: [FandomCraft Music Pack.zip]

Current Language: English (US)

Profiler Position: N/A (disabled)

Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

Anisotropic Filtering: Off (1)

 

Link to comment
Share on other sites

It would help you a lot to learn some basic debugging skills:

1. When you crash, read the log

2. At the lines the log indicates, put break points or println's to determine the values of variables

3. Run your code again and observe the variable values

 

At that point you have likely at least discovered the culprit, and can then figure out why it is behaving unexpectedly.

 

In your crash log, for example, there is a NULL pointer exception during your gui's updateScreen method - looking in there, you only have a few possible culprits: 'this' when accessing any class field (e.g. 'this.width'), which seems unlikely to be null, and 'amount1'-4 when trying to call a class method 'updateCursorCounter'. Hm.

 

amount1-4 are not initialized when the class is created, relying on initGui, so perhaps the updateScreen is getting called once before the gui has initialized. In that case, you could simply check if each one is null before calling a class method, or you could initialize them inline with their declarations, or however else you want to solve it.

Link to comment
Share on other sites

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
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.

 Share



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • you need to check if the EventHandler is called
    • update Forge to the latest version 1.16.5 requires java 8
    • C:\Users\(My Name)\Desktop\Clockwise server>java -Xmx10240M -Xms10240M -jar forgeserver.jar nogui 2022-05-26 12:35:05,381 main WARN Advanced terminal features are not available in this environment [12:35:05] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher running: args [--gameDir, ., --launchTarget, fmlserver, --fml.forgeVersion, 36.1.30, --fml.mcpVersion, 20210115.111550, --fml.mcVersion, 1.16.5, --fml.forgeGroup, net.minecraftforge, nogui] [12:35:05] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher 8.0.9+86+master.3cf110c starting: java version 1.8.0_333 by Oracle Corporation [12:35:06] [main/INFO] [ne.mi.fm.lo.FixSSL/CORE]: Added Lets Encrypt root certificates as additional trust [12:35:06] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.2 Source=file:/C:/Users/Joshua%20Hague/Desktop/Clockwise%20server/libraries/org/spongepowered/mixin/0.8.2/mixin-0.8.2.jar Service=ModLauncher Env=SERVER [12:35:06] [main/WARN] [ne.mi.fm.lo.FMLConfig/CORE]: Configuration file C:\Users\Joshua Hague\Desktop\Clockwise server\config\fml.toml is not correct. Correcting [12:35:06] [main/WARN] [ne.mi.fm.lo.FMLConfig/CORE]: Incorrect key [defaultConfigPath] was corrected from null to defaultconfigs [12:35:06] [main/INFO] [cp.mo.mo.LaunchServiceHandler/MODLAUNCHER]: Launching target 'fmlserver' with arguments [--gameDir, ., nogui] Exception in thread "main" [12:35:07] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: java.lang.NoSuchMethodError: sun.security.util.ManifestEntryVerifier.<init>(Ljava/util/jar/Manifest;)V [12:35:07] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at cpw.mods.modlauncher.SecureJarHandler.createCodeSource(SecureJarHandler.java:66) [12:35:07] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at cpw.mods.modlauncher.TransformingClassLoader$DelegatedClassLoader.findClass(TransformingClassLoader.java:275) [12:35:07] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:136) [12:35:07] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:98) [12:35:07] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at java.lang.ClassLoader.loadClass(Unknown Source) [12:35:07] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at java.lang.Class.forName0(Native Method) [12:35:07] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at java.lang.Class.forName(Unknown Source) [12:35:07] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at net.minecraftforge.fml.loading.FMLServerLaunchProvider.lambda$launchService$0(FMLServerLaunchProvider.java:51) [12:35:07] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [12:35:07] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [12:35:07] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [12:35:07] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [12:35:07] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [12:35:07] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at net.minecraftforge.server.ServerMain$Runner.runLauncher(ServerMain.java:63) [12:35:07] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at net.minecraftforge.server.ServerMain$Runner.access$100(ServerMain.java:60) [12:35:07] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at net.minecraftforge.server.ServerMain.main(ServerMain.java:57) C:\Users\(My Name)\Desktop\Clockwise server>PAUSE Tried it again with just Java version 8 update 333, still nothing.
    • package com.zaksen.fancydecorativeblocks; import com.zaksen.fancydecorativeblocks.screen.FancyMenuTypes; import com.zaksen.fancydecorativeblocks.screen.WoodCrateScreen; import net.minecraft.client.gui.screens.MenuScreens; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; @Mod.EventBusSubscriber(modid = FancyDecorativeBlocks.MOD_ID) public class ClientSetup { @SubscribeEvent public static void clientSetup(final FMLClientSetupEvent Event) { Runnable runnable = new Runnable() { @Override public void run() { MenuScreens.register(FancyMenuTypes.WOOD_CRATE_MENU.get(), WoodCrateScreen::new); } }; Event.enqueueWork(runnable); } } I create new class for it, but how i need call it?
    • Hey thanks for the reply So I can't exactly remove mods from the modpack without causing severe problems with the world so I just tried increasing the max-tick-time and found out it happens between these lines   [26May2022 20:15:49.384] [Server thread/DEBUG] [mixin/]: Mixing MixinNetworkItemManager from creativewirelesstransmitter.mixins.json into com.refinedmods.refinedstorage.apiimpl.network.item.NetworkItemManager [26May2022 20:19:51.050] [Server thread/DEBUG] [mixin/]: Mixing MixinBlockEntityExtension from architectury.mixins.json into me.shedaniel.architectury.extensions.BlockEntityExtension Here's the full debug.log, had to shorten it a little cause it was too big for pastebin so I cut the start out, if you need it I can also send it Also because I increased the max-tick-time it didn't crash but I dont wanna keep it that way since a 4 minute tick has to have an explanation. So any idea of how to fix this?
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.