Carpet

Carpet

2M Downloads

Carpet Crashes while Opening a world when broken symlink scripts are present in world script folder.

opsaaaaa opened this issue ยท 0 comments

commented

The issue

I have developed multiple scarpet apps and I have used symlinks to access specific scripts in my worlds scripts folder.
I uses separate branches on my own fork for each new script to keep my apps separate so merging goes smoothly.
When I switch to a branch that is lacking a file for a symlink then when i boot the game and open a world it crashes.

It does not crash while switching branches while the game is open.
and only when the symlink is missing its source file because my I switches branches.

Work Arounds

The issue is pretty easy to avoid by making smarter use of symlinks.
Linking to a folder rather then a file. The folder is more likely to be present in separate branches.
It can also be avoided by placing/ link to the repo using the global script folder.

If you need to keep the app symlink you can also launch the world in a branch with all the symlink sources present and then switch branches while minecraft is running.

System

I am running pop_os ( ubuntu ) and fabric with a number of optimization and quality of life mods.

---- Minecraft Crash Report ----
// Shall we play a game?

Time: 2/8/22, 4:15 PM
Description: Exception in server tick loop

java.lang.NullPointerException: Cannot invoke "String.hashCode()" because the return value of "carpet.script.bundled.Module.getName()" is null
	at carpet.script.bundled.Module.hashCode(Module.java:42)
	at java.base/java.util.HashMap.hash(HashMap.java:338)
	at java.base/java.util.HashMap.put(HashMap.java:610)
	at carpet.script.ScriptHost.<init>(ScriptHost.java:123)
	at carpet.script.CarpetScriptHost.<init>(CarpetScriptHost.java:92)
	at carpet.script.CarpetScriptHost.create(CarpetScriptHost.java:114)
	at carpet.script.CarpetScriptServer.addScriptHost(CarpetScriptServer.java:263)
	at carpet.script.CarpetScriptServer.initializeForWorld(CarpetScriptServer.java:142)
	at carpet.CarpetServer.onServerLoadedWorlds(CarpetServer.java:103)
	at net.minecraft.server.MinecraftServer.handler$zef000$serverLoadedWorlds(MinecraftServer.java:2263)
	at net.minecraft.server.MinecraftServer.method_3735(MinecraftServer.java:342)
	at net.minecraft.class_1132.method_3823(class_1132.java:72)
	at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:657)
	at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:270)
	at java.base/java.lang.Thread.run(Thread.java:833)


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

-- System Details --
Details:
	Minecraft Version: 1.18.1
	Minecraft Version ID: 1.18.1
	Operating System: Linux (amd64) version 5.13.0-7620-generic
	Java Version: 17.0.1, Microsoft
	Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Microsoft
	Memory: 313353248 bytes (298 MiB) / 2147483648 bytes (2048 MiB) up to 2147483648 bytes (2048 MiB)
	CPUs: 8
	Processor Vendor: GenuineIntel
	Processor Name: Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
	Identifier: Intel64 Family 6 Model 142 Stepping 10
	Microarchitecture: Coffee Lake
	Frequency (GHz): 1.60
	Number of physical packages: 1
	Number of physical CPUs: 4
	Number of logical CPUs: 8
	Graphics card #0 name: UHD Graphics 620
	Graphics card #0 vendor: Intel Corporation (0x8086)
	Graphics card #0 VRAM (MB): 256.00
	Graphics card #0 deviceId: 0x5917
	Graphics card #0 versionInfo: unknown
	Virtual memory max (MB): 12035.07
	Virtual memory used (MB): 7372.23
	Swap memory total (MB): 4095.49
	Swap memory used (MB): 0.00
	JVM Flags: 8 total; -Xss1M -Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M
	Fabric Mods: 
		architectury: Architectury 3.4.9
		armor-visibility: Armor Visibility 3.0.0
		carpet: Carpet Mod 1.4.57
		carpet-extra: Carpet Extra 1.4.57
		ccoords: Chat Coords 0.2.2152
		cloth-basic-math: cloth-basic-math 0.6.0
		cloth-config: Cloth Config v6 6.1.48
		com_moandjiezana_toml_toml4j: toml4j 0.7.2
		com_velocitypowered_velocity-native: velocity-native 1.1.0-SNAPSHOT
		dynamicfps: Dynamic FPS 2.0.6
		fabric: Fabric API 0.45.0+1.18
		fabric-api-base: Fabric API Base 0.4.1+b4f4f6cd65
		fabric-api-lookup-api-v1: Fabric API Lookup API (v1) 1.5.0+17be577f65
		fabric-biome-api-v1: Fabric Biome API (v1) 6.0.1+ded849a965
		fabric-blockrenderlayer-v1: Fabric BlockRenderLayer Registration (v1) 1.1.9+3ac43d9565
		fabric-command-api-v1: Fabric Command API (v1) 1.1.6+3ac43d9565
		fabric-commands-v0: Fabric Commands (v0) 0.2.5+b4f4f6cd65
		fabric-containers-v0: Fabric Containers (v0) 0.1.18+d154e2c665
		fabric-content-registries-v0: Fabric Content Registries (v0) 0.4.5+6f53a73d65
		fabric-crash-report-info-v1: Fabric Crash Report Info (v1) 0.1.8+3ac43d9565
		fabric-dimensions-v1: Fabric Dimensions API (v1) 2.1.7+43d2957165
		fabric-entity-events-v1: Fabric Entity Events (v1) 1.4.5+6b21378a65
		fabric-events-interaction-v0: Fabric Events Interaction (v0) 0.4.16+bfa23f1765
		fabric-events-lifecycle-v0: Fabric Events Lifecycle (v0) 0.2.6+b4f4f6cd65
		fabric-game-rule-api-v1: Fabric Game Rule API (v1) 1.0.10+3ac43d9565
		fabric-item-api-v1: Fabric Item API (v1) 1.3.0+691a79b565
		fabric-item-groups-v0: Fabric Item Groups (v0) 0.3.3+3ac43d9565
		fabric-key-binding-api-v1: Fabric Key Binding API (v1) 1.0.8+c8aba2f365
		fabric-keybindings-v0: Fabric Key Bindings (v0) 0.2.6+b4f4f6cd65
		fabric-language-kotlin: Fabric Language Kotlin 1.7.1+kotlin.1.6.10
		fabric-lifecycle-events-v1: Fabric Lifecycle Events (v1) 1.4.10+c15ca33565
		fabric-loot-tables-v1: Fabric Loot Tables (v1) 1.0.8+3ac43d9565
		fabric-mining-level-api-v1: Fabric Mining Level API (v1) 1.0.3+3ac43d9565
		fabric-mining-levels-v0: Fabric Mining Levels (v0) 0.1.7+b4f4f6cd65
		fabric-models-v0: Fabric Models (v0) 0.3.3+3ac43d9565
		fabric-networking-api-v1: Fabric Networking API (v1) 1.0.18+3ac43d9565
		fabric-networking-v0: Fabric Networking (v0) 0.3.5+b4f4f6cd65
		fabric-object-builder-api-v1: Fabric Object Builder API (v1) 1.11.0+3b82842e65
		fabric-object-builders-v0: Fabric Object Builders (v0) 0.7.8+3ac43d9565
		fabric-particles-v1: Fabric Particles (v1) 0.2.9+526dc1ac65
		fabric-registry-sync-v0: Fabric Registry Sync (v0) 0.8.6+533be9ba65
		fabric-renderer-api-v1: Fabric Renderer API (v1) 0.4.9+3ac43d9565
		fabric-renderer-indigo: Fabric Renderer - Indigo 0.4.12+3ac43d9565
		fabric-renderer-registries-v1: Fabric Renderer Registries (v1) 3.2.7+b4f4f6cd65
		fabric-rendering-data-attachment-v1: Fabric Rendering Data Attachment (v1) 0.3.4+7242e9d765
		fabric-rendering-fluids-v1: Fabric Rendering Fluids (v1) 0.1.18+3ac43d9565
		fabric-rendering-v0: Fabric Rendering (v0) 1.1.9+b4f4f6cd65
		fabric-rendering-v1: Fabric Rendering (v1) 1.10.3+6b21378a65
		fabric-resource-loader-v0: Fabric Resource Loader (v0) 0.4.11+3ac43d9565
		fabric-screen-api-v1: Fabric Screen API (v1) 1.0.7+3ac43d9565
		fabric-screen-handler-api-v1: Fabric Screen Handler API (v1) 1.1.11+3ac43d9565
		fabric-structure-api-v1: Fabric Structure API (v1) 2.0.8+295197a765
		fabric-tag-extensions-v0: Fabric Tag Extensions (v0) 1.2.5+3ac43d9565
		fabric-textures-v0: Fabric Textures (v0) 1.0.9+3ac43d9565
		fabric-tool-attribute-api-v1: Fabric Tool Attribute API (v1) 1.3.4+7de09f5565
		fabric-transfer-api-v1: Fabric Transfer API (v1) 1.5.6+b4f4f6cd65
		fabricloader: Fabric Loader 0.12.12
		freecam: Freecam 0.3.4
		indium: Indium 1.0.2-alpha1+mc1.18
		inspecio: Inspecio 1.1.0+1.18
		inventoryprofilesnext: Inventory Profiles Next 1.2.4
		itemscroller: Item Scroller 0.15.0
		java: OpenJDK 64-Bit Server VM 17
		krypton: Krypton 0.1.6
		lambdynlights: LambDynamicLights 2.1.0+1.17
		lazydfu: LazyDFU 0.1.2
		lightoverlay: Light Overlay 6.0.4
		lithium: Lithium 0.7.6
		malilib: MaLiLib 0.10.0-dev.26
		minecraft: Minecraft 1.18.1
		minihud: MiniHUD 0.19.0-dev.20211204.230657
		modmenu: Mod Menu 3.0.1
		org_aperlambda_lambdajcommon: lambdajcommon 1.8.1
		org_jetbrains_kotlin_kotlin-reflect: kotlin-reflect 1.6.10
		org_jetbrains_kotlin_kotlin-stdlib: kotlin-stdlib 1.6.10
		org_jetbrains_kotlin_kotlin-stdlib-jdk7: kotlin-stdlib-jdk7 1.6.10
		org_jetbrains_kotlin_kotlin-stdlib-jdk8: kotlin-stdlib-jdk8 1.6.10
		org_jetbrains_kotlinx_kotlinx-coroutines-core-jvm: kotlinx-coroutines-core-jvm 1.5.2
		org_jetbrains_kotlinx_kotlinx-coroutines-jdk8: kotlinx-coroutines-jdk8 1.5.2
		org_jetbrains_kotlinx_kotlinx-serialization-cbor-jvm: kotlinx-serialization-cbor-jvm 1.3.1
		org_jetbrains_kotlinx_kotlinx-serialization-core-jvm: kotlinx-serialization-core-jvm 1.3.1
		org_jetbrains_kotlinx_kotlinx-serialization-json-jvm: kotlinx-serialization-json-jvm 1.3.1
		org_joml_joml: joml 1.10.2
		pride: Pride Lib 1.1.0+1.17
		sodium: Sodium 0.4.0-alpha5+build.9
		spruceui: SpruceUI 3.3.0+1.17
		starlight: Starlight 1.0.0+fabric.d0a3220
		tweakeroo: Tweakeroo 0.11.0
	Server Running: true
	Player Count: 0 / 8; []
	Data Packs: vanilla, Fabric Mods
	Type: Integrated Server (map_client.txt)
	Is Modded: Definitely; Client brand changed to 'fabric'; Server brand changed to 'fabric'