Jump to content

Crash I Don't Know How to Fix -- Tessellator Illegal Argument Exception


Draco18s

Recommended Posts

[23:00:52] [server thread/INFO]: Player823[local:E:6ed7fdcb] logged in with entity id 304 at (1985.300000011921, 4.0, 18.69999998807907)
[23:00:52] [server thread/INFO]: Player823 joined the game
[23:00:54] [Client thread/FATAL]: Unreported exception thrown!
java.lang.IllegalArgumentException
at java.util.PriorityQueue.<init>(PriorityQueue.java:152) ~[?:1.7.0_67]
at net.minecraft.client.renderer.Tessellator.getVertexState(Tessellator.java:189) ~[Tessellator.class:?]
at net.minecraft.client.renderer.WorldRenderer.postRenderBlocks(WorldRenderer.java:274) ~[WorldRenderer.class:?]
at net.minecraft.client.renderer.WorldRenderer.updateRenderer(WorldRenderer.java:230) ~[WorldRenderer.class:?]
at net.minecraft.client.renderer.RenderGlobal.updateRenderers(RenderGlobal.java:1618) ~[RenderGlobal.class:?]
at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1263) ~[EntityRenderer.class:?]
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1087) ~[EntityRenderer.class:?]
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1056) ~[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.7.0_67]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_67]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_67]
at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_67]
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(GradleStartCommon.java:78) [start/:?]
at GradleStart.main(GradleStart.java:45) [start/:?]
[23:00:54] [Client thread/INFO] [sTDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: ---- Minecraft Crash Report ----
// I blame Dinnerbone.

Time: 1/31/15 11:00 PM
Description: Unexpected error

java.lang.IllegalArgumentException
at java.util.PriorityQueue.<init>(PriorityQueue.java:152)
at net.minecraft.client.renderer.Tessellator.getVertexState(Tessellator.java:189)
at net.minecraft.client.renderer.WorldRenderer.postRenderBlocks(WorldRenderer.java:274)
at net.minecraft.client.renderer.WorldRenderer.updateRenderer(WorldRenderer.java:230)
at net.minecraft.client.renderer.RenderGlobal.updateRenderers(RenderGlobal.java:1618)
at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1263)
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1087)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1056)
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(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78)
at GradleStart.main(GradleStart.java:45)


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

-- Head --
Stacktrace:
at java.util.PriorityQueue.<init>(PriorityQueue.java:152)
at net.minecraft.client.renderer.Tessellator.getVertexState(Tessellator.java:189)
at net.minecraft.client.renderer.WorldRenderer.postRenderBlocks(WorldRenderer.java:274)
at net.minecraft.client.renderer.WorldRenderer.updateRenderer(WorldRenderer.java:230)
at net.minecraft.client.renderer.RenderGlobal.updateRenderers(RenderGlobal.java:1618)
at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1263)

-- Affected level --
Details:
Level name: MpServer
All players: 1 total; [EntityClientPlayerMP['Player823'/304, l='MpServer', x=1985.30, y=5.62, z=18.70]]
Chunk stats: MultiplayerChunkCache: 65, 65
Level seed: 0
Level generator: ID 01 - flat, ver 0. Features enabled: false
Level generator options: 
Level spawn location: World: (1993,4,28), Chunk: (at 9,0,12 in 124,1; contains blocks 1984,0,16 to 1999,255,31), Region: (3,0; contains chunks 96,0 to 127,31, blocks 1536,0,0 to 2047,255,511)
Level time: 1134 game time, 1134 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: 49 total; [EntityCow['Cow'/137, l='MpServer', x=1974.97, y=9.00, z=37.03], EntityHorse['Horse'/136, l='MpServer', x=1970.94, y=9.00, z=39.00], EntitySlime['Slime'/207, l='MpServer', x=2041.88, y=9.00, z=-18.15], EntitySheep['Sheep'/139, l='MpServer', x=1968.50, y=9.00, z=63.50], EntitySlime['Slime'/138, l='MpServer', x=1977.99, y=9.00, z=38.34], EntitySheep['Sheep'/141, l='MpServer', x=1979.50, y=9.00, z=63.16], EntitySheep['Sheep'/140, l='MpServer', x=1970.16, y=9.00, z=62.69], EntityCow['Cow'/143, l='MpServer', x=1973.50, y=9.00, z=58.50], EntityCow['Cow'/142, l='MpServer', x=1969.22, y=9.00, z=60.78], EntitySheep['Sheep'/129, l='MpServer', x=1958.91, y=9.00, z=32.69], EntityCow['Cow'/128, l='MpServer', x=1955.06, y=9.00, z=38.03], EntitySlime['Slime'/130, l='MpServer', x=1966.78, y=9.00, z=56.81], EntitySheep['Sheep'/135, l='MpServer', x=1974.97, y=9.00, z=17.94], EntitySlime['Slime'/134, l='MpServer', x=1968.04, y=9.00, z=-8.87], EntitySheep['Sheep'/216, l='MpServer', x=2038.09, y=9.00, z=32.34], EntitySheep['Sheep'/217, l='MpServer', x=2047.50, y=9.00, z=33.50], EntitySlime['Slime'/218, l='MpServer', x=2036.31, y=9.00, z=77.63], EntityClientPlayerMP['Player823'/304, l='MpServer', x=1985.30, y=5.62, z=18.70], EntityCow['Cow'/212, l='MpServer', x=2037.09, y=9.00, z=31.22], EntityCow['Cow'/144, l='MpServer', x=1970.75, y=9.00, z=58.22], EntitySlime['Slime'/213, l='MpServer', x=2037.74, y=9.00, z=26.99], EntitySheep['Sheep'/145, l='MpServer', x=1970.97, y=9.00, z=63.94], EntityCow['Cow'/146, l='MpServer', x=1971.56, y=9.00, z=66.09], EntityHorse['Horse'/214, l='MpServer', x=2036.88, y=9.00, z=34.00], EntityCow['Cow'/147, l='MpServer', x=1972.76, y=9.00, z=67.96], EntitySheep['Sheep'/215, l='MpServer', x=2042.78, y=9.00, z=32.50], EntityCow['Cow'/148, l='MpServer', x=1968.50, y=9.00, z=69.50], EntityHorse['Horse'/208, l='MpServer', x=2035.79, y=9.00, z=29.79], EntityCow['Cow'/149, l='MpServer', x=1971.09, y=9.00, z=70.38], EntityHorse['Horse'/209, l='MpServer', x=2035.50, y=9.00, z=28.50], EntityHorse['Horse'/210, l='MpServer', x=2035.50, y=9.00, z=26.50], EntityCow['Cow'/211, l='MpServer', x=2035.94, y=9.00, z=31.41], EntitySlime['Slime'/171, l='MpServer', x=2004.45, y=9.00, z=17.16], EntitySlime['Slime'/170, l='MpServer', x=2002.65, y=9.00, z=-3.35], EntitySlime['Slime'/172, l='MpServer', x=2005.43, y=9.00, z=60.18], EntitySheep['Sheep'/163, l='MpServer', x=1984.59, y=9.00, z=93.41], EntitySlime['Slime'/231, l='MpServer', x=2049.71, y=9.00, z=6.84], EntitySlime['Slime'/162, l='MpServer', x=1986.68, y=9.00, z=48.26], EntityItem['item.tile.stone'/161, l='MpServer', x=1986.50, y=5.13, z=17.13], EntitySlime['Slime'/160, l='MpServer', x=1997.11, y=9.00, z=-23.77], EntitySheep['Sheep'/164, l='MpServer', x=1984.50, y=9.00, z=88.50], EntitySlime['Slime'/188, l='MpServer', x=2025.40, y=9.00, z=-20.66], EntitySlime['Slime'/189, l='MpServer', x=2023.64, y=9.00, z=-24.82], EntityHorse['Horse'/127, l='MpServer', x=1966.59, y=9.00, z=37.72], EntityCow['Cow'/126, l='MpServer', x=1958.19, y=9.00, z=39.16], EntityCow['Cow'/125, l='MpServer', x=1964.19, y=9.00, z=34.31], EntitySlime['Slime'/122, l='MpServer', x=1943.35, y=9.00, z=34.51], EntitySlime['Slime'/121, l='MpServer', x=1951.16, y=9.00, z=29.44], EntitySlime['Slime'/120, l='MpServer', x=1939.31, y=9.00, z=25.98]]
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:980)
at net.minecraft.client.main.Main.main(Main.java:164)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78)
at GradleStart.main(GradleStart.java:45)

-- System Details --
Details:
Minecraft Version: 1.7.10
Operating System: Windows 7 (x86) version 6.1
Java Version: 1.7.0_67, Oracle Corporation
Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
Memory: 819050080 bytes (781 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 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: 0, tallocated: 0
FML: MCP v9.05 FML v7.10.85.1291 Minecraft Forge 10.13.2.1291 9 mods loaded, 9 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
CustomOreGen{1.0} [CustomOreGen] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
HardLib{1.2.0} [HardLib] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
HarderUnderground{0.1.3} [HarderUnderground] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
HarderOres{0.2.6} [HarderOres] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
HarderWildlife{0.1.5} [HarderWildlife] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
ATG{0.10.0} [Alternate Terrain Generation] (ATG-1.7.2-0.10.0-DEV.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Launched Version: 1.7.10
LWJGL: 2.9.1
OpenGL: ATI Radeon HD 5570 GL version 4.2.11566 Compatibility Profile Context, 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: []
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)
[23:00:54] [Client thread/INFO] [sTDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:398]: #@!@# Game crashed! Crash report saved to: #@!@# Z:\Users\Major\Desktop\Minecraft Tools\Minecraft Modding\forge 1291\eclipse\.\crash-reports\crash-2015-01-31_23.00.54-client.txt
[23:00:54] [Client Shutdown Thread/INFO]: Stopping server
AL lib: (EE) alc_cleanup: 1 device not closed

 

As far as I have been able to diagnose, this is the result of replacing all of the stone blocks at worldgen with a custom block that renders in both passes.

 

If I don't do the replacement: no crash (and I can place the block in the word by hand just fine)

If I don't render the block in both passes: no crash (but it doesn't look right)

 

Thoughts?

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.

Link to comment
Share on other sites

Does this only happen right at world start up?

 

Can you get it to crash if you place a lot of your blocks by hand, perhaps all bunched together in say a 5x5x5 or larger cube?

 

Have you tried putting a break point in there to see what the Tessellator and renderer states are at that point?

 

I suppose the worst case scenario is you surround the second render pass in a try/catch.

Link to comment
Share on other sites

Does this only happen right at world start up?

 

Correct.

 

Can you get it to crash if you place a lot of your blocks by hand, perhaps all bunched together in say a 5x5x5 or larger cube?

 

I've previously hand-built some really large structures with this block.  And prior to genericizing it (so that I could pass a Block to its constructor and it would use the original block's name and texture, returning a new block that looks like it, but has its own behavior) I was able to generate the block into the world.  When I turned it into a generic I ended up with an accidental bug that prevented it from replacing the original and I didn't notice for a while.  Once I fixed that, I got this crash.

 

Have you tried putting a break point in there to see what the Tessellator and renderer states are at that point?

 

No, and I'll be frank.  I haven't used break-point debugging in over a decade.  :\

I gave it a stab and all I know is that Tesselator#TesselatorVertexState is called and PriorityQueue's first parameter is Tesselator.rawBufferIndex, which has a value of 0.

 

I suppose the worst case scenario is you surround the second render pass in a try/catch.

 

...except that that is all vanilla.  I even completely commented out my renderWorldBlock method in my ISBRH and it still crashes.

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.

Link to comment
Share on other sites

...except that that is all vanilla.  I even completely commented out my renderWorldBlock method in my ISBRH and it still crashes.

Wait a second, if it's a custom block, how is it all vanilla? If you tell it to render a vanilla block but make it run 2 render passes on that vanilla block, that would probably explain why it's crashing - most vanilla blocks don't expect that 2nd pass.

 

I assume you have a reason for wanting that 2nd pass on a vanilla block overlay, but I'm not sure how you can get around that. Not that you need an example, but I have a block that can render as most vanilla blocks; thing is, it only uses the first render pass.

 

How are you managing to do so without a custom renderer?

Link to comment
Share on other sites

Hi

 

It looks to me like you have told vanilla "I am going to render something in this pass" but then you never actually added any vertices to the Tessellator in that pass.  So when it gets to the end and tries to draw it, there is nothing to draw (i.e. Tessellator.rawBufferIndex equals zero).

 

-TGG

Link to comment
Share on other sites

...except that that is all vanilla.  I even completely commented out my renderWorldBlock method in my ISBRH and it still crashes.

Wait a second, if it's a custom block, how is it all vanilla? If you tell it to render a vanilla block but make it run 2 render passes on that vanilla block, that would probably explain why it's crashing - most vanilla blocks don't expect that 2nd pass.

 

I mean that if I wrap my render code in a try...catch it still crashes, and I can't go up any higher because that calling code is in vanilla.

 

I assume you have a reason for wanting that 2nd pass on a vanilla block overlay, but I'm not sure how you can get around that. Not that you need an example, but I have a block that can render as most vanilla blocks; thing is, it only uses the first render pass.

 

How are you managing to do so without a custom renderer?

 

It looks to me like you have told vanilla "I am going to render something in this pass" but then you never actually added any vertices to the Tessellator in that pass.

 

Except that I have.

 

	@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
	renderer.renderStandardBlock(block, x, y, z);

	return true;
}

 

Its all handled by the getIcon(...) methods at that point.

 

width=800 height=449http://s17.postimg.org/rp8kqzgf3/2015_02_01_10_19_02.png[/img]

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.

Link to comment
Share on other sites

  • 6 months later...

This is a bit of a necro, so I assume you've solved the problem already, but for posterity I'm going to post my solution and description of the problem.

 

The issue you're running into is https://github.com/MinecraftForge/MinecraftForge/issues/981

It's been closed and labeled as "not my problem" but as far as I understand it, it IS a forge bug, or at least a propagation of a vanilla bug. As of build 1448, anyway,looks like it was fixed in later builds

 

Apparently, if a block is rendering in the alpha pass, but is surrounded on all sides by opaque blocks, the tessellator is passed no vertices, which results in a crash. The methods in Block that determine whether a block renders on the second pass, canRenderInPass and getRenderBlockPass can't be passed coordinates, and as such will always return true on the alpha pass, if you intend to do so.

 

In the render code itself you can check all the sides of the block, or tell a block/tileentity to do it for you, although that can be pretty expensive and really shouldn't be necessary. If you can render the first pass when the block is completely hidden, I see no reason why you shouldn't be able to render the second. A quick, hacky workaround is simply to pass some dummy vertices to the tessellator when you call the render. for example in your code

@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {

            Tessellator t = Tessellator.instance;
            for(int i = 0; i<8; i++)
            {
                t.addVertex(0,0,0);
            }
	renderer.renderStandardBlock(block, x, y, z);

	return true;
}

 

If there is a better answer I welcome someone to correct me, but this is what I've found.

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



×
×
  • Create New...

Important Information

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