-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Client crash when leaving singleplayer world after having been in Carpet server #1908
Comments
Caused by: java.lang.NullPointerException: Cannot invoke "carpet.fakes.MinecraftServerInterface.getScriptServer()" because "server" is null ... Maybe it's when you have a Carpet Bot loaded during Open To Lan situation, perhaps ? |
No, I did not Open to Lan and I'm not using a Bot. |
All good, still confused by what caused this same crash for me, also. |
I have this as well my way of producing the crash is make a fabric server i use crafty on casaos add fabric-carpet-1.20.6-1.4.141+v240429.jar to the servers mod folder install fabric on your client i use the 0.15.11 loader and install fabric-carpet-1.20.6-1.4.141+v240429.jar in the client mods then join the server load in disconnect
|
CarpetServer.java#181: The crash is somehow coming from this code. Not sure how (server == null) when it's being called from MinecraftServer stopServer. |
I think I've found the issue: When logging into a server Carpet is getting into "client-side" mode, but it's not getting cleared when leaving (what handled this probably changed between versions). However when leaving a world it's being called, and given it's still in this client mode it thinks it has no server, and the mess of global vs non-global server is making it crash (client part gives null server, server part says it has server so it has to run, code uses given null server and crashes). I'll try to look into a fix when I have a bit of time. |
The build from the PR should fix it, you can get builds of it here (1.20.5-1.20.6), let me know if it works. (Artifacts > Compiled artifacts, then from the zip get the jar with the shortest name) |
i tested joining and leaving MP/SP 5 times with the 240505 artifact installed on both client/server without crashes. I also tested with the 240505 artifact on client and the old 240429 release still on server no crash so it should be fixed. |
I've also been experiencing this bug, and can confirm that the build @altrisi posted fixes the issue for me. |
Version:
fabric-carpet-1.20.6-1.4.141+v240429
Logs are here:
The text was updated successfully, but these errors were encountered: