MinestrapTeam / Minestrappolation-2

Minestrappolation - a complete Vanilla Minecraft overhaul!
http://minestrappolation.wikia.com
5 stars 3 forks source link

ArrayIndexOutOfBoundsException when crafting vanilla items #373

Closed Keten closed 9 years ago

Keten commented 9 years ago

Hi!! I love this mod. Now, with latest version I have this critical issue: This happens, when I try to craft, for example, a Wooden or Stone Pickaxe. If I craft a Slate Pickaxe, works fine.

I can't play Minecraft with this mod, if this issue remaining... :/

---- Minecraft Crash Report ----
// Oh - I know what I did wrong!

Time: 3/11/14 22:52
Description: Updating screen events

java.lang.ArrayIndexOutOfBoundsException: -1
    at net.minecraft.item.ItemStack.func_77980_a(ItemStack.java:386)
    at net.minecraft.inventory.SlotCrafting.func_75208_c(SlotCrafting.java:53)
    at net.minecraft.inventory.SlotCrafting.func_82870_a(SlotCrafting.java:110)
    at net.minecraft.inventory.Container.func_75144_a(SourceFile:300)
    at net.minecraft.client.multiplayer.PlayerControllerMP.func_78753_a(PlayerControllerMP.java:419)
    at net.minecraft.client.gui.inventory.GuiContainer.func_146984_a(GuiContainer.java:639)
    at net.minecraft.client.gui.inventory.GuiContainer.func_146983_a(GuiContainer.java:672)
    at net.minecraft.client.gui.inventory.GuiContainer.func_73869_a(GuiContainer.java:649)
    at net.minecraft.client.gui.GuiScreen.func_146282_l(GuiScreen.java:319)
    at net.minecraft.client.gui.GuiScreen.func_146269_k(GuiScreen.java:276)
    at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1629)
    at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:962)
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:887)
    at net.minecraft.client.main.Main.main(SourceFile:148)
    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)

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

-- Head --
Stacktrace:
    at net.minecraft.item.ItemStack.func_77980_a(ItemStack.java:386)
    at net.minecraft.inventory.SlotCrafting.func_75208_c(SlotCrafting.java:53)
    at net.minecraft.inventory.SlotCrafting.func_82870_a(SlotCrafting.java:110)
    at net.minecraft.inventory.Container.func_75144_a(SourceFile:300)
    at net.minecraft.client.multiplayer.PlayerControllerMP.func_78753_a(PlayerControllerMP.java:419)
    at net.minecraft.client.gui.inventory.GuiContainer.func_146984_a(GuiContainer.java:639)
    at net.minecraft.client.gui.inventory.GuiContainer.func_146983_a(GuiContainer.java:672)
    at net.minecraft.client.gui.inventory.GuiContainer.func_73869_a(GuiContainer.java:649)
    at net.minecraft.client.gui.GuiScreen.func_146282_l(GuiScreen.java:319)
    at net.minecraft.client.gui.GuiScreen.func_146269_k(GuiScreen.java:276)

-- Affected screen --
Details:
    Screen name: net.minecraft.client.gui.inventory.GuiCrafting

-- Affected level --
Details:
    Level name: MpServer
    All players: 1 total; [EntityClientPlayerMP['ignaciusESP'/116, l='MpServer', x=280,55, y=60,62, z=170,30]]
    Chunk stats: MultiplayerChunkCache: 282, 291
    Level seed: 0
    Level generator: ID 00 - default, ver 1. Features enabled: false
    Level generator options: 
    Level spawn location: World: (279,64,178), Chunk: (at 7,4,2 in 17,11; contains blocks 272,0,176 to 287,255,191), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
    Level time: 732 game time, 732 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: survival (ID 0). Hardcore: false. Cheats: false
    Forced entities: 26 total; [...]
    Retry entities: 0 total; []
    Server brand: fml,forge
    Server type: Integrated singleplayer server
Stacktrace:
    at net.minecraft.client.multiplayer.WorldClient.func_72914_a(WorldClient.java:373)
    at net.minecraft.client.Minecraft.func_71396_d(Minecraft.java:2433)
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:908)
    at net.minecraft.client.main.Main.main(SourceFile:148)
    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)

-- System Details --
Details:
    Minecraft Version: 1.7.10
    Operating System: Windows 7 (amd64) version 6.1
    Java Version: 1.7.0_07, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 1646769104 bytes (1570 MB) / 1995898880 bytes (1903 MB) up to 1995898880 bytes (1903 MB)
    JVM Flags: 3 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx2048M -Xms2048M
    AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
    IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94
    FML: MCP v9.05 FML v7.10.85.1230 Minecraft Forge 10.13.2.1230 Optifine OptiFine_1.7.10_HD_U_A4 6 mods loaded, 6 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.1230} [Forge Mod Loader] (forge-1.7.10-10.13.2.1230.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    Forge{10.13.2.1230} [Minecraft Forge] (forge-1.7.10-10.13.2.1230.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    cslib{1.7.10-2.7.2} [Clashsoft Lib] (ClashsoftLib-1.7.10-2.7.2.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    brewingapi{1.7.10-3.0.2} [Brewing API] (BrewingAPI-1.7.10-3.0.2.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    minestrappolation{1.7.10-3.3.4} [Minestrappolation] (Minestrappolation-1.7.10-3.3.4.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    Launched Version: 1.7.10-Forge10.13.2.1230
    LWJGL: 2.9.1
    OpenGL: GeForce 410M/PCI/SSE2 GL version 4.1.0, NVIDIA Corporation
    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: [Minestrappolation AVT.zip]
    Current Language: Español (España)
    Profiler Position: N/A (disabled)
    Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
    Anisotropic Filtering: Off (1)
Delocuro commented 9 years ago

I can confirm that this is a major issue in 3.3.4, so we'll make sure to fix it in the next update. For now, I recommend trying to play on versions 3.3.1 or lower, since every version past 3.3.2 seems to have at least one fatal flaw...

Clashsoft commented 9 years ago

Actually, it is not a Minestrappolation issue, but rather a Clashsoft Lib one. I don't know if you can recreate it, but it works in my workspace.

Keten commented 9 years ago

Tell me If I can help with something... (im developer).

Great mod team!

Clashsoft commented 9 years ago

Try updating to Forge 1232. We are using that in the workspace.

medsal15 commented 9 years ago

I updated to Forge 1236... Still not working.

Delocuro commented 9 years ago

Yep, definitely not an install problem, since it's happened on every version of Forge I've tried so far. It's obviously something to due with what the default NBT tags are set to when crafting the items, as it only happens for Tools, Armor, and Food (the three items that Minestrapp gives custom NBTs to), but why it's crashing now when it worked just fine in 3.3.0 is beyond me...

Clashsoft commented 9 years ago

I think the problem here is the registry. When crafting an Item, the ItemStack increases a Stat value, which is stored in an Array indexed by the Item ID (the Minecraft codebase gave me cancer). It computes the Item ID just before doing that, as it stores the actual Item object rather than the ID. However, it fails to compute the ID correctly (because the registry can't resolve the Item object to an ID), and uses -1 as the ID. But since Arrays are indexed from 0 to length - 1, the JVM throws an exception here, causing the crash. Unfortunately, this does not seem to be happening in the decompiled / dev version of Forge (why?), which is why it is not easy to resolve this issue.

Delocuro commented 9 years ago

Actually, it does seem to happen in my workspace still, so it could be that something in yours is causing it to not. I'd try getting a fresh MCP workspace and installing only Minestrapp and the compiled versions of CSLib and Brewing API and see if that changes anything.

Clashsoft commented 9 years ago

I generally only use the compiled CSLib and BAPI JARs instead of linking the projects, but I re-downloaded and setup the workspace again. However, LWJGL seems to be broken, and I am currently unable (and not motivated enough) to fix that.

Delocuro commented 9 years ago

Fair enough. Try testing it again whenever you feel like it, and worst case if the bug still doesn't happen in your workspace, you can always just try things that you think might fix it and then have me text them on mine.

Delocuro commented 9 years ago

Temporarily closed because adding a README seems to have somehow magically fixed it in my workspace??? I'll test this again after we build 3.3.5 to make sure it doesn't start happening again, but for the moment it seems to be fixed...