Big_Cake

晓雨杂记

也许我们会分别,但我们将永远不会忘记彼此
bilibili
github
twitter
zhihu
telegram
tg_channel

How to diagnose errors in Minecraft Java Edition client

Introduction#

Oh my goodness, I finally fixed the Hexo YAMLException issue. It's been 5 months since the last update!

During this time, the main issue was with Hexo.

By the way, I'm back to online classes again (we have a pandemic here).

Due to the traditional art of Mojang Bugjump, Minecraft Java Edition often crashes for various mysterious reasons. This article will guide you in identifying what went wrong with your Minecraft and possible solutions.

Steps#

Choose the Correct Java Version#

Please select the correct Java version first.

Java 16 is required for 1.17.x, Java 17 is required for 1.18 and above, and Java 8 is required for 1.16.5 and below.

If you choose the wrong Java version, the game will crash no matter what you do.

In most cases, the launcher will automatically select the Java runtime based on the chosen version (such as BakaXL and PCL2).

When your game fails to launch, depending on the launcher you are using (such as BakaXL), it will analyze the crash reason and provide you with a packaged error report and log. If you're feeling lazy, you can directly send this compressed file to QQ groups or other places to ask for help. (But that's beyond the scope of this article, hey)

Recommended reading: How To Ask Questions The Smart Way

Ideally, the above method should help you solve most problems. However, as the saying goes, "Ideals are full of beauty, while reality is bone-chilling." Some problems cannot be identified by the launcher alone. That's when we need to take matters into our own hands.

Understand Minecraft's Directory Structure#

First, open the folder where you store the game. I assume that your game has already run and crashed at least once.

If you haven't enabled version isolation, then this folder should have at least the following directory structure:

Folder
|_ .minecraft
|     |_ assets
|     |_ libraries
|     |_ crash-reports
|     |_ logs
|     |_ versions
|     |   |_ Your Game Version
|     |       |_ Game Version.jar
|     |       |_ Game Version.json
|     |_ launcher_profiles.json       
|_ Launcher (PCL2.exe, BakaXL.exe, etc.)

If you have enabled version isolation, then the folder's directory structure should be at least like this:

Folder
|_ .minecraft
|     |_ assets
|     |_ libraries
|     |_ versions
|     |   |_ Your Game Version
|     |       |_ crash-reports
|     |       |_ logs
|     |       |_ Game Version.jar
|     |       |_ Game Version.json
|     |_ launcher_profiles.json
|_ Launcher (PCL2.exe, BakaXL.exe, etc.)

Next, based on the directory structure above, locate the crash-reports and logs folders. The former contains automatically generated crash reports when the game crashes, while the latter contains game runtime logs.

Then, in File Explorer, click the "Date Modified" button, and you will see the latest log file latest.log.

latest-log

The same applies to the crash-reports folder.

For now, let's not focus on latest.log. Instead, let's open the latest crash-report file. Once opened, you will see a large stack trace and incomprehensible error types.

Files with the word "server" in their names are generally related to built-in game servers and can be ignored. Generally, crash reports generated after a crash will have the word "client" in their names.

crash-report

Find the Error#

This crash report was generated after installing Forge and VanillaFix. We can see that the error type here is "Initializing game," which means loading the game (obviously). The top line of the stack trace tells us that the error occurred when loading the dependency mod jp.ngt.ngtlib.NGTCore.

Screenshot 2022-04-08 125741.png

This text tells us that the error is caused by ClassNotFoundException, which means "class not found." The failed SHA1 verification and the human-readable error message below indicate that the version of this mod and its dependent mod RealTrainMod do not match, resulting in the crash.

Scrolling down, we can see the following layout:

Screenshot 2022-04-08 130559.png

The top half records information about your system, game version, Java and JVM versions, JVM arguments, memory, etc. The bottom half shows the versions of Forge and OptiFine (if installed), and the meanings of the L, C, H, I, J, A, D, E characters, as well as the mods you have installed. Usually, this table is enough to identify the problematic mod.

Continue this process for other cases.

If your Minecraft folder contains files with names like hs-err-pidxxxxxxxx.mdmp, it may be because you have allocated insufficient memory to Minecraft or there is an issue with your Java.

If a window appears during startup with the following link: https://aka.ms/mcdriver, it means there is a problem with your graphics card driver (or you don't have a graphics card at all, which usually happens when you try to run Minecraft on a rented Windows server).

Troubleshooting#

For problematic mods, you need to replace or remove them.

If you're running out of memory, allocate more memory or downgrade your power and take it easy play older versions.

If there is an issue with your graphics card, consider updating the graphics card driver or buying a new computer (?

For Java/JVM issues, try reinstalling Java or allocating more memory to your Minecraft. After all:

Java eats memories

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.