Jump to content

[SOLVED] Crash at launch ModLoader.java:114 (NullPointerException: Initializing game)


bigbang

Recommended Posts

***

SOLVED! Look at posts below to find a quick tutorial how o fix this issue.

***

 

1. Problem

Starting the project using Run Start crashes the game. When I start the project by using gradlew runClient it works. Another problem is that I need to set an additional enviro variable named "assetDirectory", as a value I used "C:\Users\MyUserName\AppData\Roaming\.minecraft\assets". I did this because it couldn't find asset path under this enviro variable in Start.class:

String assets = System.getenv().containsKey("assetDirectory") ? System.getenv("assetDirectory") : "assets";

 

image.png.df51540959b58cdaf12a675eedc139e5.png

 

2. Repro

Tried on 2 different machines, result is the same. Im using Eclipse. Here's my repro:

  1. downloaded the most recent Recommended Forge (forge-1.14.4-28.1.0)
  2. installed Java 8
  3. gradlew eclipse
  4. gradlew build
  5. open eclipse and load project with default Example Mod
  6. changed nothing in project files, just want a sanity check launch

 

3. Output

2019-09-24 10:43:43,665 main WARN Advanced terminal features are not available in this environment
[10:43:44] [Client thread/INFO] [minecraft/Minecraft]: Setting user: Player825
[10:43:45] [Client thread/INFO] [minecraft/Minecraft]: LWJGL Version: 3.2.2 build 10
---- Minecraft Crash Report ----
// This doesn't make any sense!

Time: 24.09.19 10:43
Description: Initializing game

java.lang.NullPointerException: Initializing game
	at net.minecraftforge.fml.ModLoader.<init>(ModLoader.java:114) ~[forge-1.14.4-28.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {}
	at net.minecraftforge.fml.ModLoader.get(ModLoader.java:143) ~[forge-1.14.4-28.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {}
	at net.minecraftforge.fml.client.ClientModLoader.lambda$begin$2(ClientModLoader.java:79) ~[forge-1.14.4-28.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {}
	at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:95) ~[forge-1.14.4-28.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {}
	at net.minecraftforge.fml.client.ClientModLoader.begin(ClientModLoader.java:79) ~[forge-1.14.4-28.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {}
	at net.minecraft.client.Minecraft.init(Minecraft.java:453) [forge-1.14.4-28.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {}
	at net.minecraft.client.Minecraft.run(Minecraft.java:365) [forge-1.14.4-28.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {}
	at net.minecraft.client.main.Main.main(SourceFile:155) [forge-1.14.4-28.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {}
	at mcp.client.Start.main(Start.java:17) [forge-1.14.4-28.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {}


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

-- Head --
Thread: Client thread
Stacktrace:
	at net.minecraftforge.fml.ModLoader.<init>(ModLoader.java:114)
	at net.minecraftforge.fml.ModLoader.get(ModLoader.java:143)
	at net.minecraftforge.fml.client.ClientModLoader.lambda$begin$2(ClientModLoader.java:79)
	at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:95)
	at net.minecraftforge.fml.client.ClientModLoader.begin(ClientModLoader.java:79)
	at net.minecraft.client.Minecraft.init(Minecraft.java:453)

-- Initialization --
Details:
Stacktrace:
	at net.minecraft.client.Minecraft.run(Minecraft.java:365)
	at net.minecraft.client.main.Main.main(SourceFile:155)
	at mcp.client.Start.main(Start.java:17)

-- System Details --
Details:
	Minecraft Version: 1.14.4
	Minecraft Version ID: 1.14.4
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_221, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 608595104 bytes (580 MB) / 2247098368 bytes (2143 MB) up to 7635730432 bytes (7282 MB)
	CPUs: 12
	JVM Flags: 1 total; -Xmx8G
	Launched Version: mcp
	LWJGL: 3.2.2 build 10
	OpenGL: GeForce RTX 2060/PCIe/SSE2 GL version 4.6.0 NVIDIA 417.71, NVIDIA Corporation
	GL Caps: Using GL 1.3 multitexturing.
Using GL 1.3 texture combiners.
Using framebuffer objects because OpenGL 3.0 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 'forge'
	Type: Client (map_client.txt)
	Resource Packs: 
	Current Language: ~~ERROR~~ NullPointerException: null
	CPU: 12x Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
#@!@# Game crashed! Crash report saved to: #@!@# D:\Test\.\crash-reports\crash-2019-09-24_10.43.47-client.txt
Picked up _JAVA_OPTIONS: -Xmx8G

 

3. Additional info

I attached debugger file, nulls everywhere in this.

Screenshot_1.thumb.png.ba168421859c9e95486fc6e643e16e42.png

 

Edited by bigbang
Link to comment
Share on other sites

genEclipseRuns didn't helped, still having the same error. What else can I check?

 

I launched this command, there's output:

PS D:\Test> .\gradlew genEclipseRuns
Picked up _JAVA_OPTIONS: -Xmx8G
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/4.9/userguide/gradle_daemon.html.
Daemon will be stopped at the end of the build stopping after processing

> Configure project :
New Dep: net.minecraftforge:forge:1.14.4-28.1.0_mapped_snapshot_20190719-1.14.3

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.9/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 25s
5 actionable tasks: 3 executed, 2 up-to-date
PS D:\Test>

 

And after that I reopened Eclipse, clicked Run Start (Start - mcp.client configuration) and have the same result:

 

2019-09-24 12:24:02,106 main WARN Advanced terminal features are not available in this environment
[12:24:02] [Client thread/INFO] [minecraft/Minecraft]: Setting user: Player639
[12:24:05] [Client thread/INFO] [minecraft/Minecraft]: LWJGL Version: 3.2.2 build 10
---- Minecraft Crash Report ----
// Everything's going to plan. No, really, that was supposed to happen.

Time: 24.09.19 12:24
Description: Initializing game

java.lang.NullPointerException: Initializing game
	at net.minecraftforge.fml.ModLoader.<init>(ModLoader.java:114) ~[forge-1.14.4-28.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {}
	at net.minecraftforge.fml.ModLoader.get(ModLoader.java:143) ~[forge-1.14.4-28.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {}
	at net.minecraftforge.fml.client.ClientModLoader.lambda$begin$2(ClientModLoader.java:79) ~[forge-1.14.4-28.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {}
	at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:95) ~[forge-1.14.4-28.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {}
	at net.minecraftforge.fml.client.ClientModLoader.begin(ClientModLoader.java:79) ~[forge-1.14.4-28.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {}
	at net.minecraft.client.Minecraft.init(Minecraft.java:453) [forge-1.14.4-28.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {}
	at net.minecraft.client.Minecraft.run(Minecraft.java:365) [forge-1.14.4-28.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {}
	at net.minecraft.client.main.Main.main(SourceFile:155) [forge-1.14.4-28.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {}
	at mcp.client.Start.main(Start.java:17) [forge-1.14.4-28.1.0_mapped_snapshot_20190719-1.14.3.jar:?] {}


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

-- Head --
Thread: Client thread
Stacktrace:
	at net.minecraftforge.fml.ModLoader.<init>(ModLoader.java:114)
	at net.minecraftforge.fml.ModLoader.get(ModLoader.java:143)
	at net.minecraftforge.fml.client.ClientModLoader.lambda$begin$2(ClientModLoader.java:79)
	at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:95)
	at net.minecraftforge.fml.client.ClientModLoader.begin(ClientModLoader.java:79)
	at net.minecraft.client.Minecraft.init(Minecraft.java:453)

-- Initialization --
Details:
Stacktrace:
	at net.minecraft.client.Minecraft.run(Minecraft.java:365)
	at net.minecraft.client.main.Main.main(SourceFile:155)
	at mcp.client.Start.main(Start.java:17)

-- System Details --
Details:
	Minecraft Version: 1.14.4
	Minecraft Version ID: 1.14.4
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_221, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 1116458744 bytes (1064 MB) / 2134376448 bytes (2035 MB) up to 7635730432 bytes (7282 MB)
	CPUs: 12
	JVM Flags: 1 total; -Xmx8G
	Launched Version: mcp
	LWJGL: 3.2.2 build 10
	OpenGL: GeForce RTX 2060/PCIe/SSE2 GL version 4.6.0 NVIDIA 417.71, NVIDIA Corporation
	GL Caps: Using GL 1.3 multitexturing.
Using GL 1.3 texture combiners.
Using framebuffer objects because OpenGL 3.0 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 'forge'
	Type: Client (map_client.txt)
	Resource Packs: 
	Current Language: ~~ERROR~~ NullPointerException: null
	CPU: 12x Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
#@!@# Game crashed! Crash report saved to: #@!@# D:\Test\.\crash-reports\crash-2019-09-24_12.24.07-client.txt
Picked up _JAVA_OPTIONS: -Xmx8G

 

Link to comment
Share on other sites

@diesieben07

Thanks! That solved my issue. I checked configurations once again and found generated by the task. For some reason this run configuration was not set by default in my case

 

Here is how to solve this problem if you found this topic with similar issue:

 

Open Run Configurations

image.png.159e2e28fb9159ed5c23f173abb1f961.png

 

From the Run Configurations expand Java Application and choose your config (runClient for example) and press Run.

image.png.2c386a3249ba49265d3742379bd9ce97.png

 

After that just by pressing Run it will automatically start the game with selected configuration every time until you change it on something else (like a runServer).

image.png.a7d73c10b482a0559226635f2c67aca0.png

 

 

 

 

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.

Announcements



×
×
  • Create New...

Important Information

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