Carpet

Carpet

2M Downloads

Game crashes when using custom dimensions with Carpet

LogicalGeekBoy opened this issue ยท 3 comments

commented

I'm a long time user of Carpet and have been using it with the 1.16 pre-releases to test things out. I have experienced a game crash however that I think is due to Carpet.

Using Carpet in a normal world is just fine but if I create a the new custom dimension and teleport to it with Carpet loaded the game crashes. The same thing happens if I start a game in a custom dimension. If I remove Carpet and try again, everything works again.

Here's the crash log and looking through it, it seems this line https://github.com/gnembon/fabric-carpet/blob/master/src/main/java/carpet/script/utils/ShapesRenderer.java#L54 is throwing the error . I'm not sure if this is something you can fix as the RenderSystem class used on that line comes from com.mojang.blaze3d.systems.RenderSystem.

---- Minecraft Crash Report ---- // Don't do that.

Time: 20/06/2020, 08:59
Description: Unexpected error

java.lang.NullPointerException: Unexpected error
at carpet.script.utils.ShapesRenderer.render(ShapesRenderer.java:54)
at net.minecraft.class_761.handler$zlp000$renderScarpetThings(class_761.java:5087)
at net.minecraft.class_761.method_22710(class_761.java:1322)
at net.minecraft.class_757.method_3188(class_757.java:717)
at net.minecraft.class_757.method_3192(class_757.java:540)
at net.minecraft.class_310.method_1523(class_310.java:1021)
at net.minecraft.class_310.method_1514(class_310.java:654)
at net.minecraft.client.main.Main.main(Main.java:215)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:192)
at net.fabricmc.loader.launch.knot.Knot.init(Knot.java:140)
at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:26)

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

-- Head --
Thread: Render thread
Stacktrace:
at carpet.script.utils.ShapesRenderer.render(ShapesRenderer.java:54)
at net.minecraft.class_761.handler$zlp000$renderScarpetThings(class_761.java:5087)
at net.minecraft.class_761.method_22710(class_761.java:1322)
at net.minecraft.class_757.method_3188(class_757.java:717)

-- Affected level --
Details:
All players: 1 total; [class_746['logicalgeekboy'/835, l='ClientLevel', x=0.50, y=1.00, z=0.50]]
Chunk stats: Client Chunk Cache: 4225, 272
Level dimension: legacy:logicalgeekboy
Level spawn location: World: (-125,63,-32), Chunk: (at 3,3,0 in -8,-2; contains blocks -128,0,-32 to -113,255,-17), Region: (-1,-1; contains chunks -32,-32 to -1,-1, blocks -512,0,-512 to -1,255,-1)
Level time: 208054 game time, 123552 day time
Server brand: fabric
Server type: Integrated singleplayer server
Stacktrace:
at net.minecraft.class_638.method_8538(class_638.java:449)
at net.minecraft.class_310.method_1587(class_310.java:2181)
at net.minecraft.class_310.method_1514(class_310.java:677)
at net.minecraft.client.main.Main.main(Main.java:215)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:192)
at net.fabricmc.loader.launch.knot.Knot.init(Knot.java:140)
at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:26)

-- System Details --
Details:
Minecraft Version: 1.16 Release Candidate 1
Minecraft Version ID: 1.16-rc1
Operating System: Windows 10 (amd64) version 10.0
Java Version: 11.0.6, AdoptOpenJDK
Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), AdoptOpenJDK
Memory: 1008075592 bytes (961 MB) / 2952790016 bytes (2816 MB) up to 6442450944 bytes (6144 MB)
CPUs: 16
JVM Flags: 9 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx6G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M
Fabric Mods:
carpet: Carpet Mod in Fabric 1.3.32
fabric: Fabric API 0.12.5+build.367-1.16
fabric-api-base: Fabric API Base 0.1.3+12a8474c7c
fabric-biomes-v1: Fabric Biomes (v1) 0.2.7+059ea8667c
fabric-blockrenderlayer-v1: Fabric BlockRenderLayer Registration (v1) 1.1.4+c6a8ea897c
fabric-command-api-v1: Fabric Command API (v1) 1.0.8+5ce533987c
fabric-commands-v0: Fabric Commands (v0) 0.2.0+52d308367c
fabric-containers-v0: Fabric Containers (v0) 0.1.8+045df74f7c
fabric-content-registries-v0: Fabric Content Registries (v0) 0.1.9+059ea8667c
fabric-crash-report-info-v1: Fabric Crash Report Info (v1) 0.1.2+b7f9825d7c
fabric-dimensions-v1: fabric-dimensions-v1 1.0.0+a71b30537c
fabric-events-interaction-v0: Fabric Events Interaction (v0) 0.3.3+7066030f7c
fabric-events-lifecycle-v0: Fabric Events Lifecycle (v0) 0.1.3+0d474ec47c
fabric-item-groups-v0: Fabric Item Groups (v0) 0.2.0+438f96367c
fabric-key-binding-api-v1: Fabric Key Binding API (v1) 1.0.0+e16a97747c
fabric-keybindings-v0: Fabric Key Bindings (v0) 0.2.0+3fa9f7c57c
fabric-loot-tables-v1: Fabric Loot Tables (v1) 0.1.10+059ea8667c
fabric-mining-levels-v0: Fabric Mining Levels (v0) 0.1.2+b764ce997c
fabric-models-v0: Fabric Models (v0) 0.1.0+dfdb52d67c
fabric-networking-blockentity-v0: Fabric Networking Block Entity (v0) 0.2.5+b50ffc7b7c
fabric-networking-v0: Fabric Networking (v0) 0.1.9+1a47cd787c
fabric-object-builder-api-v1: Fabric Object Builder API (v1) 1.5.4+059ea8667c
fabric-object-builders-v0: Fabric Object Builders (v0) 0.6.0+da175ad67c
fabric-particles-v1: fabric-particles-v1 0.1.3+4a08d6b27c
fabric-registry-sync-v0: Fabric Registry Sync (v0) 0.3.8+7dba2d6c7c
fabric-renderer-api-v1: Fabric Renderer API (v1) 0.2.13+eae12eb87c
fabric-renderer-indigo: Fabric Renderer - Indigo 0.3.1+059ea8667c
fabric-renderer-registries-v1: Fabric Renderer Registries (v1) 2.0.1+5a0f9a607c
fabric-rendering-data-attachment-v1: Fabric Rendering Data Attachment (v1) 0.1.3+b7f9825d7c
fabric-rendering-fluids-v1: Fabric Rendering Fluids (v1) 0.1.7+12a8474c7c
fabric-rendering-v0: Fabric Rendering (v0) 1.1.0+534104907c
fabric-rendering-v1: Fabric Rendering (v1) 1.1.2+346247d77c
fabric-resource-loader-v0: Fabric Resource Loader (v0) 0.2.5+059ea8667c
fabric-screen-handler-api-v1: Fabric Screen Handler API (v1) 1.0.1+f362c86e7c
fabric-tag-extensions-v0: Fabric Tag Extensions (v0) 0.2.5+5a6e8f4c7c
fabric-textures-v0: Fabric Textures (v0) 1.0.4+eae12eb87c
fabric-tool-attribute-api-v1: Fabric Tool Attribute API (v1) 1.1.4+5794386e7c
fabricloader: Fabric Loader 0.8.8+build.202
logical_zoom: Logical Zoom 0.0.3
minecraft: Minecraft 1.16-rc.9
Launched Version: fabric-loader-0.8.8+build.202-1.16-rc1
Backend library: LWJGL version 3.2.2 build 10
Backend API: GeForce RTX 2080/PCIe/SSE2 GL version 4.6.0 NVIDIA 441.08, NVIDIA Corporation
GL Caps: Using framebuffer using OpenGL 3.0
Using VBOs: Yes
Is Modded: Definitely; Client brand changed to 'fabric'
Type: Client (map_client.txt)
Resource Packs: vanilla
Current Language: English (US)
CPU: 16x Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz

I suspect there is some work required generally to support custom dimensions so thought I'd post this as a starting point for this.

Thanks for all hard work you do with Carpet, it's greatly appreciated <3

Logic

commented

Can confirm, this issue occurs on Release Candidate 1. It is not possible to get the world to even load when carpet is installed and I'm in a custom dimension.

Edit: Here's a video of me creating a new world with a custom dimension to showcase the bug. https://youtu.be/2vNJ3ikmvf4

commented

well, forgot now there can be more than 3.... Probably lots of other things also don't work in the custom dimensions

commented

So, I've been thinking. Given that Mojang likes to change the format for custom dimension data, at least during snapshots (and some of the changes aren't even published), I've had to spend some time tracking down what I need to make my dimensions work on almost every snapshot update.

To save you the time of having to do that, I'm giving you and everyone else a copy of my custom dimensions to do whatever you want with it. Hopefully this will help make testing support for custom dimensions easier.

The Caves zip is a dimension I made to add custom caves to Minecraft. I combined it with the CaveBiomes datapack in my survival world to generate unique caves. The Glass zip is just a single layer flat world that I use for testing my custom portals datapack I've been working on. Enjoy!

Caves.zip
Glass.zip