1.16.5 - Jukebox Upgrade NullPointerException
elkinsa opened this issue ยท 7 comments
So not really sure how to replicate this issue since I am not totally sure how it started. I don't recall testing upgrades in my server or the jukebox upgrade at all, but I was exhausted so maybe I did. Anyway, without having the jukebox upgrade on my backpack I was getting random music playing and nobody else and it was quite confusing. But then I had my game crash (as well as the copy I made of the world to debug this issue) and both crash logs said there was a jukebox backpack issue, so I am thinking the random music may be related. Also since the crashes I have not heard random music.
crash-2021-03-28_17.52.56-server.txt
crash-2021-03-28_21.34.19-server.txt
Random music comes from mobs spawning with backpacks that can occasionally have jukebox upgrade playing a disc.
However to be honest I am not sure how this issue is happening for you. Basically from what I can gather at the place where it crashes it would happen if there isn't a player client side. which is very strange in logic that will only ever run when a player is in the world. Have you perhaps added/updated a mod before this started happening? there may be a mod that modifies how the logic that I am looking at works. Also there are many people playing with the mod and it's included in two big modpacks and this is the first time I am hearing about issue like this which leads me to believe there's a mod interaction issue happening.
Is there a way to turn off that upgrade for mobs? Also the music was happening in the day in the Overworld and a lot around the same time, but maybe there is a really packed cavern under my base.
And I do have other mods (I think I saw the list in crash report but can get the list if not), but the only other one I added recently was one for functional bookcases (stores books in new bookcase object).
Maybe I will have time to look at the line in the code later this week and see if any of the other mods call that without verifying a player is in the world. I am still learning Minecraft mod stuff, but I know Java so I might be able to find a conflict.
You can turn the spawning with jukebox in config, look for playJukebox
setting. how far you will hear the discs depends on how loud the disc is as well, with vanilla it's something like 30 blocks away, but I know that some mods add very loud ones that can be heard much further away.
that line in the code isn't going to help you much unless you would be looking at the mod's code that changes it or debugging with that mod when this is null. There's also a potential that a mod messes with a few other field values used on that line that are actually supposed to be non null, but again only debugging with what is changing these would help. I have tried debugging in dev environment, but can't get null values there so I am missing something to recreate.
I meant I would look at the other mod code bases. I doubt I'd find it easily if at all, but since I am not sure what triggered it in game it would be difficult to otherwise troubleshoot. Also I spend so much of my work days reading other people's code to figure out what they did wrong, so maybe I will get lucky. But I doubt all of the mods have public repos I can look at, so that may just end up a waste of effort.
fyi, #112 appears to be the same issue - happens during reloading world / switching world