Support: Built from sources crash the game on Release only #1

Closed
opened 2020-09-07 08:23:04 +00:00 by Bob_74 · 0 comments

Solution

I just found out why it didn't work:

I was using the files built using Vscode, but looking at your Jenkins builds, I found you run ./gradlew build javadoc publish and simply running this command on my side built the mod correctly and gave me a ready to use jar file.

So it really was a beginner mistake, I'll keep Vscode to try my modifications but will surely use gradlew to build it for release :)

Addition

To the guy who will come across this issue while Googling an error, if you're using Vscode please STOP right now and switch to IntelliJ IDEA. Vscode is a pain in the ass to get to work correctly and is very inconsistent (will build, won't build after rebooting, ...).
IntelliJ works right out of the box if you follow the guide on the Fabric Wiki and is so much easier to use. It just works!


Original post

Hi. First I really like your mod but I wanted to edit it a little bit to fit my needs :)

This is rather asking for help than a real issue, your release from Curseforge works just fine.

I'm having trouble building correctly SorceryCraft and I was hoping you could give me some tips.

  • I'm able to debug and build the example mod (1.16.1) from Fabric
  • I'm using fabric-api-0.17.0+build.386-1.16.1 (also tried fabric-api-0.13.1+build.370-1.16)
  • I use Visual Studio Code as IDE
  • I can build SorceryCraft and run it in Minecraft debugging mode

As soon as I put the build into a jar file and drop it in my mods folder, the game crash on launch.

It's so frustrating to see everything working well inside Minecraft in debug mode and not on release ><

I also tried to build from these sources without modifying the code but no success.

I spent the last two days on this, I'm running out of idea...

The game crashs as it starts (only SorceryCraft and fabric-api are installed):

The game crashed whilst initializing game
Error: net.fabricmc.loader.api.EntrypointException: Exception while loading entries for entrypoint 'main' provided by 'sorcerycraft'
Exit Code: -1

Here is the full log:

---- Minecraft Crash Report ----
// There are four lights!

Time: 07/09/20 10:11
Description: Initializing game

net.fabricmc.loader.api.EntrypointException: Exception while loading entries for entrypoint 'main' provided by 'sorcerycraft'
	at net.fabricmc.loader.EntrypointStorage.getEntrypointContainers(EntrypointStorage.java:193)
	at net.fabricmc.loader.FabricLoader.getEntrypointContainers(FabricLoader.java:251)
	at net.fabricmc.loader.entrypoint.minecraft.hooks.EntrypointUtils.invoke0(EntrypointUtils.java:44)
	at net.fabricmc.loader.entrypoint.minecraft.hooks.EntrypointUtils.invoke(EntrypointUtils.java:36)
	at net.fabricmc.loader.entrypoint.minecraft.hooks.EntrypointClient.start(EntrypointClient.java:32)
	at net.minecraft.class_310.<init>(class_310.java:425)
	at net.minecraft.client.main.Main.main(Main.java:177)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	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)
Caused by: java.lang.NoClassDefFoundError: net/minecraft/block/Block
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:348)
	at net.fabricmc.loader.util.DefaultLanguageAdapter.create(DefaultLanguageAdapter.java:45)
	at net.fabricmc.loader.EntrypointStorage$NewEntry.create(EntrypointStorage.java:114)
	at net.fabricmc.loader.EntrypointStorage$NewEntry.getOrCreate(EntrypointStorage.java:101)
	at net.fabricmc.loader.EntrypointStorage.getEntrypointContainers(EntrypointStorage.java:186)
	... 13 more
Caused by: java.lang.ClassNotFoundException: net.minecraft.block.Block
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at net.fabricmc.loader.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:161)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 19 more


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

-- Head --
Thread: Render thread
Stacktrace:
	at net.fabricmc.loader.EntrypointStorage.getEntrypointContainers(EntrypointStorage.java:193)
	at net.fabricmc.loader.FabricLoader.getEntrypointContainers(FabricLoader.java:251)
	at net.fabricmc.loader.entrypoint.minecraft.hooks.EntrypointUtils.invoke0(EntrypointUtils.java:44)
	at net.fabricmc.loader.entrypoint.minecraft.hooks.EntrypointUtils.invoke(EntrypointUtils.java:36)
	at net.fabricmc.loader.entrypoint.minecraft.hooks.EntrypointClient.start(EntrypointClient.java:32)
	at net.minecraft.class_310.<init>(class_310.java:425)

-- Initialization --
Details:
Stacktrace:
	at net.minecraft.client.main.Main.main(Main.java:177)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	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.1
	Minecraft Version ID: 1.16.1
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_51, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 2949397584 bytes (2812 MB) / 3657433088 bytes (3488 MB) up to 5368709120 bytes (5120 MB)
	CPUs: 8
	JVM Flags: 9 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx5G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M
	Fabric Mods: 
		autoconfig1u: Auto Config v1 Updated 3.2.0-unstable
		cloth-basic-math: Cloth Basic Math 0.5.1
		cloth-config2: Cloth Config v4 4.5.6
		fabric: Fabric API 0.13.1+build.370-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.10+e00ecb5f7c
		fabric-object-builder-api-v1: Fabric Object Builder API (v1) 1.5.5+e00ecb5f7c
		fabric-object-builders-v0: Fabric Object Builders (v0) 0.6.0+da175ad67c
		fabric-particles-v1: fabric-particles-v1 0.2.1+0a6f2a707c
		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.9.2+build.206
		minecraft: Minecraft 1.16.1
		sorcerycraft: SorceryCraft ${version}
	Launched Version: fabric-loader-0.9.2+build.206-1.16.1
	Backend library: LWJGL version 3.2.2 build 10
	Backend API: NO CONTEXT
	GL Caps: 
	Using VBOs: Yes
	Is Modded: Definitely; Client brand changed to 'fabric'
	Type: Client (map_client.txt)
	CPU: <unknown>

I started over from the example mod, editing and replacing files to fit SorceryCraft and it will crash when I add the classes and setup the entrypoints in fabric.mod.json.

I know you've made an API and honestly I wanted to use it but I need to change some core features (craft "price", projectile speed, implementing water collision detection and such).

### Solution I just found out why it didn't work: I was using the files built using Vscode, but looking at your Jenkins builds, I found you run `./gradlew build javadoc publish` and simply running this command on my side built the mod correctly and gave me a ready to use jar file. So it really was a beginner mistake, I'll keep Vscode to try my modifications but will surely use gradlew to build it for release :) #### Addition To the guy who will come across this issue while Googling an error, if you're using Vscode please STOP right now and switch to IntelliJ IDEA. Vscode is a pain in the ass to get to work correctly and is very inconsistent (will build, won't build after rebooting, ...). IntelliJ works right out of the box if you follow the guide on the Fabric Wiki and is so much easier to use. It just works! ------------------------------- ### Original post Hi. First I really like your mod but I wanted to edit it a little bit to fit my needs :) This is rather asking for help than a real issue, your release from Curseforge works just fine. I'm having trouble building correctly SorceryCraft and I was hoping you could give me some tips. * I'm able to debug and build the example mod (1.16.1) from Fabric * I'm using `fabric-api-0.17.0+build.386-1.16.1` (also tried `fabric-api-0.13.1+build.370-1.16`) * I use `Visual Studio Code` as IDE * I can build SorceryCraft and run it in Minecraft debugging mode As soon as I put the build into a jar file and drop it in my mods folder, the game crash on launch. It's so frustrating to see everything working well inside Minecraft in debug mode and not on release >< I also tried to build from these sources without modifying the code but no success. I spent the last two days on this, I'm running out of idea... The game crashs as it starts (only `SorceryCraft` and `fabric-api` are installed): ``` The game crashed whilst initializing game Error: net.fabricmc.loader.api.EntrypointException: Exception while loading entries for entrypoint 'main' provided by 'sorcerycraft' Exit Code: -1 ``` Here is the full log: ``` ---- Minecraft Crash Report ---- // There are four lights! Time: 07/09/20 10:11 Description: Initializing game net.fabricmc.loader.api.EntrypointException: Exception while loading entries for entrypoint 'main' provided by 'sorcerycraft' at net.fabricmc.loader.EntrypointStorage.getEntrypointContainers(EntrypointStorage.java:193) at net.fabricmc.loader.FabricLoader.getEntrypointContainers(FabricLoader.java:251) at net.fabricmc.loader.entrypoint.minecraft.hooks.EntrypointUtils.invoke0(EntrypointUtils.java:44) at net.fabricmc.loader.entrypoint.minecraft.hooks.EntrypointUtils.invoke(EntrypointUtils.java:36) at net.fabricmc.loader.entrypoint.minecraft.hooks.EntrypointClient.start(EntrypointClient.java:32) at net.minecraft.class_310.<init>(class_310.java:425) at net.minecraft.client.main.Main.main(Main.java:177) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) 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) Caused by: java.lang.NoClassDefFoundError: net/minecraft/block/Block at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) at net.fabricmc.loader.util.DefaultLanguageAdapter.create(DefaultLanguageAdapter.java:45) at net.fabricmc.loader.EntrypointStorage$NewEntry.create(EntrypointStorage.java:114) at net.fabricmc.loader.EntrypointStorage$NewEntry.getOrCreate(EntrypointStorage.java:101) at net.fabricmc.loader.EntrypointStorage.getEntrypointContainers(EntrypointStorage.java:186) ... 13 more Caused by: java.lang.ClassNotFoundException: net.minecraft.block.Block at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at net.fabricmc.loader.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:161) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 19 more A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Render thread Stacktrace: at net.fabricmc.loader.EntrypointStorage.getEntrypointContainers(EntrypointStorage.java:193) at net.fabricmc.loader.FabricLoader.getEntrypointContainers(FabricLoader.java:251) at net.fabricmc.loader.entrypoint.minecraft.hooks.EntrypointUtils.invoke0(EntrypointUtils.java:44) at net.fabricmc.loader.entrypoint.minecraft.hooks.EntrypointUtils.invoke(EntrypointUtils.java:36) at net.fabricmc.loader.entrypoint.minecraft.hooks.EntrypointClient.start(EntrypointClient.java:32) at net.minecraft.class_310.<init>(class_310.java:425) -- Initialization -- Details: Stacktrace: at net.minecraft.client.main.Main.main(Main.java:177) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) 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.1 Minecraft Version ID: 1.16.1 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_51, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 2949397584 bytes (2812 MB) / 3657433088 bytes (3488 MB) up to 5368709120 bytes (5120 MB) CPUs: 8 JVM Flags: 9 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx5G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M Fabric Mods: autoconfig1u: Auto Config v1 Updated 3.2.0-unstable cloth-basic-math: Cloth Basic Math 0.5.1 cloth-config2: Cloth Config v4 4.5.6 fabric: Fabric API 0.13.1+build.370-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.10+e00ecb5f7c fabric-object-builder-api-v1: Fabric Object Builder API (v1) 1.5.5+e00ecb5f7c fabric-object-builders-v0: Fabric Object Builders (v0) 0.6.0+da175ad67c fabric-particles-v1: fabric-particles-v1 0.2.1+0a6f2a707c 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.9.2+build.206 minecraft: Minecraft 1.16.1 sorcerycraft: SorceryCraft ${version} Launched Version: fabric-loader-0.9.2+build.206-1.16.1 Backend library: LWJGL version 3.2.2 build 10 Backend API: NO CONTEXT GL Caps: Using VBOs: Yes Is Modded: Definitely; Client brand changed to 'fabric' Type: Client (map_client.txt) CPU: <unknown> ``` I started over from the example mod, editing and replacing files to fit SorceryCraft and it will crash when I add the classes and setup the entrypoints in `fabric.mod.json`. I know you've made an API and honestly I wanted to use it but I need to change some core features (craft "price", projectile speed, implementing water collision detection and such).
This repo is archived. You cannot comment on issues.
No Label
No Milestone
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: TheBrokenRail/SorceryCraft#1
No description provided.