Posted August 5, 20241 yr Hello everyone, I'm struggling with a weird issue, I'm trying to make a server pack for a new modpack and sometime I can join the server but got immediately disconnected with the message below: Quote Connection Lost Internal Exception: java.lang.NullPointerException: Cannot invoke "net.minecraft.nbt.CompoundTag.m_128459_(String)" because "nbt" is null I've seen seen other posts with the same error but nobody mention how they fix it (if they really fixed it). Issue: Here is the weird part, I have two scenarios occuring : I start my client, join the server, everything is fine. I can disconnect/reconnect to the server. It works. I start my client, join the server, get disconnected with the message above. If I try to reconnect, I will always get the same error. I must restart the client and hope this time it will works. Additional informations: I have tried with Forge 43.2.0, 43.3.0 (stable) and 43.3.5 (latest) on both server and client with the same results. The server pack is created using ServerPackCreator. There is no problem in single player mode. I can't determine if this could be a mod or a Forge issue. I suspect there is somewhere an unstable loading order that could explain that problem. I can't find anything of interest in the server and client debug.log (or I don't know what to look for). Logs: Client (debug.log): https://mclo.gs/4jf8lz7 Server (debug.log): https://mclo.gs/aT3hgEG Any help or hint to find the culprit appreciated . Thanks for reading Edited August 6, 20241 yr by DrSpuick
January 12Jan 12 This error occurs when you are trying to invoke a method on a null object reference. In this case, the variable "nbt" is null, meaning it doesn't point to any object. To fix this issue, you need to make sure that the "nbt" variable is properly initialized before trying to invoke any method on it. You can check if the "nbt" variable is null before calling the method, or ensure that it is properly assigned a value from a valid object. Here is an example of how you can handle this issue: sqlCopy code if (nbt != null) { // Call the method on the "nbt" object nbt.m_128459_("String"); } else { // Handle the case when "nbt" is null System.out.println("Error: nbt is null"); } Make sure to review your code and find out where the "nbt" variable should be initialized before using it. were you able to figure out which mod is causing this problem? https://chat-gpt.org/chat
January 12Jan 12 4 hours ago, deus_ said: This error occurs when you are trying to invoke a method on a null object reference. This section of the forum is for support running forge, not modder support. Based on their post, they are creating a modpack from mods other people created, not writing a mod, so do not have access to the sourcecode. ChatGPT steered you wrong in this case, AI is not that intelligent lol.
August 12Aug 12 Been dealing with this for a few weeks. The folks at Forge weren't able to come up with a solution either and recommended removing mods one at a time until the culprit is found. Trouble is the intermittency of this bug, I was able to connect 17 times without Mekanism: Generators but only once or twice with it. So that must be it! So after updating everyone on the problem and having the others connect to the server.. everyone got the same bug again. Additionally, neither the Client nor the Server actually show this bug in their respective logs. Any ideas on how to address that part? https://TeamAxxios.com/Discord
September 1Sep 1 Author Hi, Sorry to everyone who had followed-up and/or asked if I found a way to solve this... I just abandon this post because... Well, nobody cared for month. There is activity and reactivity for common questions, not for issues. I never found the culprit, either being Forge itself or a specific mod, and never find a way to trigger the bug without the "intermittency part" @deus_ ChatGPT did what it does best, putting words one after another, and led you to trying to fix "code" with obfuscated java methods... While we are doing modpacks here ^^' I did try removing mods one by one, and stumble with the "7 times in a row, I think this time I get rid of the little bugger! Oh... It happen again..." too. Anyway since nobody know what can cause that bug, and the intermittency, we can't assume that removing a mod will solve the issue because any later version of another modcould trigger this bug aswell. I highly suspect that Forge is the real problem here, not a mod. @Sniper_Gecko I have, in fact, an idea to address that: changing platform for future modpacks. The split occur for a reason, and severals mods only support the fork now. Good luck everybody and I hope someone could help you
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.