Lunatrius / Schematica

Import schematics, export schematics, build schematics. All inside Minecraft!
MIT License
212 stars 146 forks source link

Schematica Crash (Compatible/Vanilla Multiplayer Crash) #193

Open SpinRunner opened 7 years ago

SpinRunner commented 7 years ago

Currently, I have a problem with Minecraft Forge/Schematica/LunatriusCore on a server. The Minecraft server is pure vanilla, and I’ve used schematics multiple times before. Today, I was using the printer, but when I relogged, none of the blocks registered and my game crashed. Here’s the log; I appreciate it if anyone can help out. Thank you

Time: 12/28/16 11:20 PM
Description: Batching chunks

java.lang.NullPointerException: Batching chunks
    at net.minecraft.util.math.BlockPos.<init>(SourceFile:41)
    at net.minecraft.client.renderer.chunk.ChunkRenderWorker.func_178474_a(SourceFile:65)
    at net.minecraft.client.renderer.chunk.ChunkRenderWorker.run(SourceFile:43)
    at java.lang.Thread.run(Thread.java:745)

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

-- System Details --
Details:
    Minecraft Version: 1.11
    Operating System: Mac OS X (x86_64) version 10.10
    Java Version: 1.8.0_74, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 350416496 bytes (334 MB) / 688377856 bytes (656 MB) up to 1060372480 bytes (1011 MB)
    JVM Flags: 5 total; -Xmx1G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M
    IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95
    FML: MCP 9.35 Powered by Forge 13.19.1.2189 6 mods loaded, 6 mods active
    States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
    UCHIJA  mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) 
    UCHIJA  FML{8.0.99.99} [Forge Mod Loader] (forge-1.11-13.19.1.2189.jar) 
    UCHIJA  forge{13.19.1.2189} [Minecraft Forge] (forge-1.11-13.19.1.2189.jar) 
    UCHIJA  mercurius_updater{1.0} [mercurius_updater] (MercuriusUpdater-1.11.jar) 
    UCHIJA  lunatriuscore{1.1.2.39} [LunatriusCore] (LunatriusCore-1.11-1.1.2.39-universal.jar) 
    UCHIJA  schematica{1.7.8.156} [Schematica] (Schematica-1.11.jar) 
    Loaded coremods (and transformers): 
    GL info: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread.
    Launched Version: 1.11-forge1.11-13.19.1.2189
    LWJGL: 2.9.2
    OpenGL: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread.
    GL Caps: Using GL 1.3 multitexturing.
Using GL 1.3 texture combiners.
Using framebuffer objects because ARB_framebuffer_object is supported and separate blending is supported.
Shaders are available because OpenGL 2.1 is supported.
VBOs are available because OpenGL 1.5 is supported.

    Using VBOs: Yes
    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)
    CPU: 4x Intel(R) Core(TM) i5-4260U CPU @ 1.40GHz
Lunatrius commented 7 years ago

Does the crash only happen when you relog? Is it reproducible?

SpinRunner commented 7 years ago

Yes, I can join any server, build, talk, etc. When I relog, however, I instantly crash before I can join back on the server. I can relaunch minecraft and forge to join again, but once I get back on, no blocks were registered. I tried it again and the same result happened.

Lunatrius commented 7 years ago

Could you check if the same thing happens when you do the same for a single player world?

SpinRunner commented 7 years ago

Ok I just checked and did some more troubleshooting. It seems like the problem is only connected to all types of multiplayer servers. For me, single-player works fine for me with no errors. With multiplayer (survival, creative, etc), I'm getting the same error every time, even with compatible and vanilla servers that forge and schematica can work on. It worked previously on the same multiplayer servers though.

And after some more troubleshooting, most of the crashes occur after using the printer method (If that helps narrow anything down)

SpinRunner commented 7 years ago

Ok, I'm going to try to explain this in the easiest way possible for you to understand; the glitch is super confusing and it varies for some reason. I'll log on, load the schematic perfectly fine and let all the schematic chunks load. I then proceed to use the printer function to build at an area. The people around me can't see me building for some reason. But other people can see blocks disappearing and reappearing. I'll then relog, and two options happen: 1) I completely crash before I can get back on 2) Log back on to find that none of my blocks registered to the server, and then I crash.

However, I might happen to move on to a different area of the schematic and use the printer to build, and everything works fine.

It's super weird, isn't it?

Lunatrius commented 7 years ago

The server might have a plugin in that area(?) that prevents the use of "cheat" mods (you're placing blocks in places that you're not actually looking at.

Have you tried only loading up the schematic, leaving it loaded for a few seconds and then re-logging, repeating that a few times? Just want to make sure that it's actually the printer causing the crash and not something else.

SpinRunner commented 7 years ago

The server doesn't have any plugins to prevent a schematica mod. I've used it many times on the server before and it the printer causes the crash only in certain areas. Right now I think it might be a chunk issue, but I'll try your method when I can get back on.

SpinRunner commented 7 years ago

I also don't know if the issue has something to do with OpenGL?

Lunatrius commented 7 years ago

The printer shouldn't keep any references to the schematic and/or real world, which is why it's weird that it's the printer causing the issue in specific areas/chunks. There might be a weird block/tile entity combination somewhere, causing it to do something that it really shouldn't do.

SpinRunner commented 7 years ago

Possibly, and I called in some players to see it too. They told me that thy couldn't see the blocks that I had placed. Then, they walked out of the build area and came back to see some of the blocks. It's been super glucthy lately.

Lunatrius commented 7 years ago

That block placement thing seems to be ping related, try lowering the placement speed to check if more of the blocks stay placed.

SpinRunner commented 7 years ago

I tried lowering the speed and every other option down, but it doesn't seem to be working for any type of delay. Loading the schematic and relogging hasn't worked either. I can easily load the schematic and see all types of blocks, but I crash when I attempt to build in certain areas. I took some screenshots were the printer has caused some problems (if this helps). OH, I also have to reload the schematic every time I relog, but that's fine with me, but I didn't know if that was a bug or not.

Schematics: With - 2016-12-30_17 58 52 Without - 2016-12-30_17 58 55

With - 2016-12-30_17 58 21

Without - 2016-12-30_17 58 25

Every crash, the crash log remains the same.

SpinRunner commented 7 years ago

Ok something else popped up that might discover the glitch. I literally logged in, loaded in the schematic from the same point, relogged, and crashed. Maybe the glitch has something to do with rendering the schematic?

Lunatrius commented 7 years ago

The crash that you posted it rendering related. I'll have to look into this and check if anything changed for servers (again... on Mojang's side)

SpinRunner commented 7 years ago

Thank you again. I appreciate it

SpinRunner commented 7 years ago

Hey, so I've been manually placing blocks everytime this glitch happens, while slowly placing them. So far, it's worked great. Today, I got a new crash log and wanted to see if this could help the situation. Once again, I appreciate your help.

Description: Tesselating block model

java.lang.NullPointerException: Tesselating block model
    at com.github.lunatrius.schematica.client.renderer.SchematicRenderCache.func_180495_p(SchematicRenderCache.java:24)
    at net.minecraft.world.ChunkCache.func_175629_a(ChunkCache.java:129)
    at net.minecraft.world.ChunkCache.func_175626_b(ChunkCache.java:80)
    at net.minecraft.block.Block.func_185484_c(Block.java:365)
    at net.minecraft.block.state.BlockStateContainer$StateImplementation.func_185889_a(BlockStateContainer.java:362)
    at net.minecraftforge.client.model.pipeline.BlockInfo.updateLightMatrix(BlockInfo.java:126)
    at net.minecraftforge.client.model.pipeline.VertexLighterSmoothAo.updateBlockInfo(VertexLighterSmoothAo.java:186)
    at net.minecraftforge.client.model.pipeline.ForgeBlockModelRenderer.render(ForgeBlockModelRenderer.java:134)
    at net.minecraftforge.client.model.pipeline.ForgeBlockModelRenderer.func_187498_b(ForgeBlockModelRenderer.java:103)
    at net.minecraft.client.renderer.BlockModelRenderer.func_187493_a(BlockModelRenderer.java:47)
    at net.minecraft.client.renderer.BlockModelRenderer.func_178267_a(BlockModelRenderer.java:38)
    at net.minecraft.client.renderer.BlockRendererDispatcher.func_175018_a(BlockRendererDispatcher.java:80)
    at net.minecraft.client.renderer.chunk.RenderChunk.func_178581_b(RenderChunk.java:199)
    at com.github.lunatrius.schematica.client.renderer.chunk.proxy.SchematicRenderChunkList.func_178581_b(SchematicRenderChunkList.java:46)
    at net.minecraft.client.renderer.chunk.ChunkRenderWorker.func_178474_a(SourceFile:100)
    at net.minecraft.client.renderer.chunk.ChunkRenderWorker.run(SourceFile:43)
    at java.lang.Thread.run(Thread.java:745)

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

-- Head --
Thread: Client thread
Stacktrace:
    at com.github.lunatrius.schematica.client.renderer.SchematicRenderCache.func_180495_p(SchematicRenderCache.java:24)
    at net.minecraft.world.ChunkCache.func_175629_a(ChunkCache.java:129)
    at net.minecraft.world.ChunkCache.func_175626_b(ChunkCache.java:80)
    at net.minecraft.block.Block.func_185484_c(Block.java:365)
    at net.minecraft.block.state.BlockStateContainer$StateImplementation.func_185889_a(BlockStateContainer.java:362)
    at net.minecraftforge.client.model.pipeline.BlockInfo.updateLightMatrix(BlockInfo.java:126)
    at net.minecraftforge.client.model.pipeline.VertexLighterSmoothAo.updateBlockInfo(VertexLighterSmoothAo.java:186)
    at net.minecraftforge.client.model.pipeline.ForgeBlockModelRenderer.render(ForgeBlockModelRenderer.java:134)
    at net.minecraftforge.client.model.pipeline.ForgeBlockModelRenderer.func_187498_b(ForgeBlockModelRenderer.java:103)

-- Block model being tesselated --
Details:
    Block: minecraft:stonebrick[variant=stonebrick]
    Block location: World: (52,10,60), Chunk: (at 4,0,12 in 3,3; contains blocks 48,0,48 to 63,255,63), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
    Using AO: true
Stacktrace:
    at net.minecraft.client.renderer.BlockModelRenderer.func_187493_a(BlockModelRenderer.java:47)
    at net.minecraft.client.renderer.BlockModelRenderer.func_178267_a(BlockModelRenderer.java:38)

-- Block being tesselated --
Details:
    Block type: ID #98 (tile.stonebricksmooth // net.minecraft.block.BlockStoneBrick)
    Block data value: 0 / 0x0 / 0b0000
    Block location: World: (52,10,60), Chunk: (at 4,0,12 in 3,3; contains blocks 48,0,48 to 63,255,63), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
Stacktrace:
    at net.minecraft.client.renderer.BlockRendererDispatcher.func_175018_a(BlockRendererDispatcher.java:80)
    at net.minecraft.client.renderer.chunk.RenderChunk.func_178581_b(RenderChunk.java:199)
    at com.github.lunatrius.schematica.client.renderer.chunk.proxy.SchematicRenderChunkList.func_178581_b(SchematicRenderChunkList.java:46)
    at net.minecraft.client.renderer.chunk.ChunkRenderWorker.func_178474_a(SourceFile:100)
    at net.minecraft.client.renderer.chunk.ChunkRenderWorker.run(SourceFile:43)
    at java.lang.Thread.run(Thread.java:745)

-- System Details --
Details:
    Minecraft Version: 1.11
    Operating System: Mac OS X (x86_64) version 10.10
    Java Version: 1.8.0_74, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 286311336 bytes (273 MB) / 738025472 bytes (703 MB) up to 1060372480 bytes (1011 MB)
    JVM Flags: 5 total; -Xmx1G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M
    IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95
    FML: MCP 9.35 Powered by Forge 13.19.1.2189 6 mods loaded, 6 mods active
    States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
    UCHIJA  mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) 
    UCHIJA  FML{8.0.99.99} [Forge Mod Loader] (forge-1.11-13.19.1.2189.jar) 
    UCHIJA  forge{13.19.1.2189} [Minecraft Forge] (forge-1.11-13.19.1.2189.jar) 
    UCHIJA  mercurius_updater{1.0} [mercurius_updater] (MercuriusUpdater-1.11.jar) 
    UCHIJA  lunatriuscore{1.1.2.39} [LunatriusCore] (LunatriusCore-1.11-1.1.2.39-universal.jar) 
    UCHIJA  schematica{1.7.8.155} [Schematica] (Schematica-1.11-1.7.8.155-universal.jar) 
    Loaded coremods (and transformers): 
    Launched Version: 1.11-forge1.11-13.19.1.2189
    LWJGL: 2.9.2
    OpenGL: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread.
    GL Caps: Using GL 1.3 multitexturing.
Using GL 1.3 texture combiners.
Using framebuffer objects because ARB_framebuffer_object is supported and separate blending is supported.
Shaders are available because OpenGL 2.1 is supported.
VBOs are available because OpenGL 1.5 is supported.

    Using VBOs: No
    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)
    CPU: 4x Intel(R) Core(TM) i5-4260U CPU @ 1.40GHz
Lunatrius commented 7 years ago

Yeah, something is definitely not getting cleaned up properly... could you test it the same way as you did up to now, but before logging off unload the currently loaded schematic.

SpinRunner commented 7 years ago

Sure, I'll give that a shot

SpinRunner commented 7 years ago

Unloading the schematic works about 25% of the time. What I've been doing is switching back and forth to manual in printer is glitchy chunks, and I've gotten used to the error now. But, it's still present and occurs often.

Lunatrius commented 7 years ago

This should be fun to debug... I'll have to figure out what keeps the schematic loaded in the game after you log off.

SpinRunner commented 7 years ago

Sounds good. Can you set a hotkey to unload/load the schematic? the only thing I have set is to toggle the layers