Big_Cake

晓雨杂记

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

How to diagnose errors in Minecraft Java Edition client.

title: How to Diagnose Errors in Minecraft Java Edition Client
date: 2022-04-08 07:45:18
updated: 2022-04-08 07:45:18
tags:

  • Troubleshooting
  • Mods
    categories:
  • Minecraft

Introduction#

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 (there's an epidemic 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 the problems 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 Java 8 is required for 1.16.5 and below.

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

Usually, 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), the launcher will analyze the crash reason and provide you with a packaged error report and log. If you're lazy, you can directly send this compressed file to QQ groups or other places to ask for help. (But that deviates from the main purpose of this article)

Recommended reading: How To Ask Questions The Smart Way

Ideally, the above methods can help you solve most problems. However, as the saying goes, "Ideals are full, reality is bone-thin," and some problems cannot be identified by the launcher. In such cases, 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 been launched and crashed at least once.

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

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 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.)

Then, according to the directory structure mentioned above, find the crash-reports and logs folders. The former contains automatically generated crash reports when the game crashes, and the latter contains game runtime logs.

Next, in File Explorer, click on 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. Let's open the latest crash-report file instead. Once opened, you will see a large stack trace and error types that you may not understand.

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

crash-report

Find the Errors#

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 validation and the human-readable error message below it tell us that the version of this mod and its dependency, RealTrainMod, do not match, causing 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 eight characters L, C, H, I, J, A, D, E correspond to their meanings, as well as the mods you have installed. Usually, this table can help identify the problematic mod.

Continue this process for other errors.

If your Minecraft folder contains files with names like hs-err-pidxxxxxxxx.mdmp, it may be because you have allocated too little 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 an issue with your graphics card driver (or you don't have a graphics card at all, which usually happens when you try to play on a rented Windows server).

Troubleshooting#

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

If there is insufficient memory, you need to allocate more memory or reduce the power and relax play an older version.

If there is an issue with the 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 Minecraft. After all:

Java eats memories

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