AlexModGuy / DomesticationInnovation

improved tamable creatures in minecraft
18 stars 22 forks source link

Server crash: `java.lang.NullPointerException: Cannot invoke "java.util.UUID.getMostSignificantBits()"` #200

Open MaxWasUnavailable opened 8 months ago

MaxWasUnavailable commented 8 months ago
java.lang.NullPointerException: Cannot invoke "java.util.UUID.getMostSignificantBits()" because "p_235882_" is null
        at net.minecraft.core.UUIDUtil.m_235881_(UUIDUtil.java:66) ~[server-1.20.1-20230612.114412-srg.jar%23763!/:?] {re:classloading}
        at net.minecraft.nbt.NbtUtils.m_129226_(NbtUtils.java:187) ~[server-1.20.1-20230612.114412-srg.jar%23763!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:railways-common.mixins.json:NbtUtilsMixin,pl:mixin:A}
        at net.minecraft.nbt.CompoundTag.m_128362_(CompoundTag.java:192) ~[server-1.20.1-20230612.114412-srg.jar%23763!/:?] {re:computing_frames,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:modernfix-comm>
        at com.github.alexthe668.domesticationinnovation.server.misc.DIWorldData.m_7176_(DIWorldData.java:80) ~[domesticationinnovation-1.7.1-1.20.1.jar%23546!/:1.7.1-1.20.1] {re:classloading}
        at net.minecraft.world.level.saveddata.SavedData.m_77757_(SavedData.java:36) ~[server-1.20.1-20230612.114412-srg.jar%23763!/:?] {re:mixin,re:classloading}
        at net.minecraft.world.level.storage.DimensionDataStorage.m_164865_(DimensionDataStorage.java:128) ~[server-1.20.1-20230612.114412-srg.jar%23763!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:structure_gel.mixins.js>
        at java.util.HashMap.forEach(HashMap.java:1421) ~[?:?] {re:mixin}
        at net.minecraft.world.level.storage.DimensionDataStorage.m_78151_(DimensionDataStorage.java:126) ~[server-1.20.1-20230612.114412-srg.jar%23763!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:structure_gel.mixins.jso>
        at net.minecraft.server.level.ServerLevel.m_8806_(ServerLevel.java:758) ~[server-1.20.1-20230612.114412-srg.jar%23763!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:cupboard.mixins.json:ServerAddEntityMixin,pl:mixin>
        at net.minecraft.server.level.ServerLevel.m_8643_(ServerLevel.java:737) ~[server-1.20.1-20230612.114412-srg.jar%23763!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:cupboard.mixins.json:ServerAddEntityMixin,pl:mixin>
        at net.minecraft.server.MinecraftServer.m_129885_(MinecraftServer.java:507) ~[server-1.20.1-20230612.114412-srg.jar%23763!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:sat>
        at net.minecraft.server.MinecraftServer.m_195514_(MinecraftServer.java:532) ~[server-1.20.1-20230612.114412-srg.jar%23763!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:sat>
        at net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:824) ~[server-1.20.1-20230612.114412-srg.jar%23763!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:satur>
        at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:661) ~[server-1.20.1-20230612.114412-srg.jar%23763!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:sat>
        at net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:251) ~[server-1.20.1-20230612.114412-srg.jar%23763!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:sat>
        at java.lang.Thread.run(Thread.java:840) ~[?:?] {re:mixin}

Version: domesticationinnovation-1.7.1-1.20.1.jar

MaxWasUnavailable commented 8 months ago

Happened another time, same crash:

java.lang.NullPointerException: Cannot invoke "java.util.UUID.getMostSignificantBits()" because "p_235882_" is null
        at net.minecraft.core.UUIDUtil.m_235881_(UUIDUtil.java:66) ~[server-1.20.1-20230612.114412-srg.jar%23821!/:?] {re:classloading}
        at net.minecraft.nbt.NbtUtils.m_129226_(NbtUtils.java:187) ~[server-1.20.1-20230612.114412-srg.jar%23821!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:railways-common.mixins.json:NbtUtilsMixin,pl:mixin:A}
        at net.minecraft.nbt.CompoundTag.m_128362_(CompoundTag.java:192) ~[server-1.20.1-20230612.114412-srg.jar%23821!/:?] {re:computing_frames,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:modernfix-common.mixins.json:perf.nbt_memory_usage.CompoundTagMixin,pl:mixin:APP:canary.mixins.json:alloc.nbt.CompoundTagMixin,pl:mixin:A}
        at com.github.alexthe668.domesticationinnovation.server.misc.DIWorldData.m_7176_(DIWorldData.java:80) ~[domesticationinnovation-1.7.1-1.20.1.jar%23581!/:1.7.1-1.20.1] {re:classloading}
        at net.minecraft.world.level.saveddata.SavedData.m_77757_(SavedData.java:36) ~[server-1.20.1-20230612.114412-srg.jar%23821!/:?] {re:mixin,re:classloading}
        at net.minecraft.world.level.storage.DimensionDataStorage.m_164865_(DimensionDataStorage.java:128) ~[server-1.20.1-20230612.114412-srg.jar%23821!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:structure_gel.mixins.json:DimensionDataStorageAccessor,pl:mixin:A}
        at java.util.HashMap.forEach(HashMap.java:1421) ~[?:?] {re:mixin}
        at net.minecraft.world.level.storage.DimensionDataStorage.m_78151_(DimensionDataStorage.java:126) ~[server-1.20.1-20230612.114412-srg.jar%23821!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:structure_gel.mixins.json:DimensionDataStorageAccessor,pl:mixin:A}
        at net.minecraft.server.level.ServerLevel.m_8806_(ServerLevel.java:758) ~[server-1.20.1-20230612.114412-srg.jar%23821!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:cupboard.mixins.json:ServerAddEntityMixin,pl:mixin:APP:betterendisland.mixins.json:ServerLevelMixin,pl:mixin:APP:modernfix-common.mixins.json:perf.cache_strongholds.ServerLevelMixin,pl:mixin:APP:modernfix-common.mixins.json:bugfix.chunk_deadlock.ServerLevelMixin,pl:mixin:APP:snowrealmagic.mixins.json:ServerLevelMixin,pl:mixin:APP:supplementaries-common.mixins.json:ServerLevelMixin,pl:mixin:APP:chunkpregen.mixins.json:common.server.ServerLevelMixin,pl:mixin:APP:the_bumblezone-common.mixins.json:world.ServerWorldMixin,pl:mixin:APP:krypton.mixins.json:server.fastchunkentityaccess.ServerWorldMixin,pl:mixin:APP:immersive_weathering-common.mixins.json:ServerLevelMixin,pl:mixin:APP:crafttweaker.mixins.json:common.transform.world.level.MixinServerLevel,pl:mixin:APP:corgilib.mixins.json:MixinServerLevel,pl:mixin:APP:ad_astra-common.mixins.json:ServerLevelMixin,pl:mixin:APP:mixins.biomancy.json:ServerLevelMixin,pl:mixin:APP:bedbenefits.mixins.json:MixinServerLevel,pl:mixin:APP:friendsandfoes-common.mixins.json:ServerWorldAccessor,pl:mixin:APP:friendsandfoes-common.mixins.json:ServerWorldMixin,pl:mixin:APP:enhancedcelestials.mixins.json:MixinServerWorld,pl:mixin:APP:citadel.mixins.json:ServerLevelMixin,pl:mixin:APP:leavesbegone.common.mixins.json:ServerLevelMixin,pl:mixin:APP:sereneseasons.mixins.json:MixinServerLevel,pl:mixin:APP:neruina-common.mixins.json:ServerWorldMixin,pl:mixin:APP:immersiveengineering.mixins.json:coremods.ServerWorldMixin,pl:mixin:APP:canary.mixins.json:alloc.chunk_random.ServerLevelMixin,pl:mixin:APP:canary.mixins.json:chunk.replace_streams.ServerLevelMixin,pl:mixin:APP:canary.mixins.json:entity.inactive_navigations.ServerLevelMixin,pl:mixin:APP:canary.mixins.json:profiler.ServerLevelMixin,pl:mixin:APP:canary.mixins.json:util.accessors.ServerLevelAccessor,pl:mixin:APP:canary.mixins.json:world.block_entity_ticking.sleeping.ServerLevelMixin,pl:mixin:APP:aether.mixins.json:common.accessor.ServerLevelAccessor,pl:mixin:APP:ritchiesprojectilelib.mixins.json:ServerLevelMixin,pl:mixin:APP:betterdeserttemples.mixins.json:ServerLevelMixin,pl:mixin:APP:create.mixins.json:accessor.ServerLevelAccessor,pl:mixin:APP:betterendisland.mixins.json:EndergeticExpansionMixins,pl:mixin:A}
        at net.minecraft.server.level.ServerLevel.m_8643_(ServerLevel.java:737) ~[server-1.20.1-20230612.114412-srg.jar%23821!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:cupboard.mixins.json:ServerAddEntityMixin,pl:mixin:APP:betterendisland.mixins.json:ServerLevelMixin,pl:mixin:APP:modernfix-common.mixins.json:perf.cache_strongholds.ServerLevelMixin,pl:mixin:APP:modernfix-common.mixins.json:bugfix.chunk_deadlock.ServerLevelMixin,pl:mixin:APP:snowrealmagic.mixins.json:ServerLevelMixin,pl:mixin:APP:supplementaries-common.mixins.json:ServerLevelMixin,pl:mixin:APP:chunkpregen.mixins.json:common.server.ServerLevelMixin,pl:mixin:APP:the_bumblezone-common.mixins.json:world.ServerWorldMixin,pl:mixin:APP:krypton.mixins.json:server.fastchunkentityaccess.ServerWorldMixin,pl:mixin:APP:immersive_weathering-common.mixins.json:ServerLevelMixin,pl:mixin:APP:crafttweaker.mixins.json:common.transform.world.level.MixinServerLevel,pl:mixin:APP:corgilib.mixins.json:MixinServerLevel,pl:mixin:APP:ad_astra-common.mixins.json:ServerLevelMixin,pl:mixin:APP:mixins.biomancy.json:ServerLevelMixin,pl:mixin:APP:bedbenefits.mixins.json:MixinServerLevel,pl:mixin:APP:friendsandfoes-common.mixins.json:ServerWorldAccessor,pl:mixin:APP:friendsandfoes-common.mixins.json:ServerWorldMixin,pl:mixin:APP:enhancedcelestials.mixins.json:MixinServerWorld,pl:mixin:APP:citadel.mixins.json:ServerLevelMixin,pl:mixin:APP:leavesbegone.common.mixins.json:ServerLevelMixin,pl:mixin:APP:sereneseasons.mixins.json:MixinServerLevel,pl:mixin:APP:neruina-common.mixins.json:ServerWorldMixin,pl:mixin:APP:immersiveengineering.mixins.json:coremods.ServerWorldMixin,pl:mixin:APP:canary.mixins.json:alloc.chunk_random.ServerLevelMixin,pl:mixin:APP:canary.mixins.json:chunk.replace_streams.ServerLevelMixin,pl:mixin:APP:canary.mixins.json:entity.inactive_navigations.ServerLevelMixin,pl:mixin:APP:canary.mixins.json:profiler.ServerLevelMixin,pl:mixin:APP:canary.mixins.json:util.accessors.ServerLevelAccessor,pl:mixin:APP:canary.mixins.json:world.block_entity_ticking.sleeping.ServerLevelMixin,pl:mixin:APP:aether.mixins.json:common.accessor.ServerLevelAccessor,pl:mixin:APP:ritchiesprojectilelib.mixins.json:ServerLevelMixin,pl:mixin:APP:betterdeserttemples.mixins.json:ServerLevelMixin,pl:mixin:APP:create.mixins.json:accessor.ServerLevelAccessor,pl:mixin:APP:betterendisland.mixins.json:EndergeticExpansionMixins,pl:mixin:A}
        at net.minecraft.server.MinecraftServer.m_129885_(MinecraftServer.java:507) ~[server-1.20.1-20230612.114412-srg.jar%23821!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:modernfix-common.mixins.json:perf.dedicated_reload_executor.MinecraftServerMixin,pl:mixin:APP:chunkpregen.mixins.json:common.server.MinecraftServerMixin,pl:mixin:APP:chunkpregen.mixins.json:common.server.ServerSeedMixin,pl:mixin:APP:crafttweaker.mixins.json:common.access.server.AccessMinecraftServer,pl:mixin:APP:saturn.mixins.json:allocations.server_directory.MinecraftServerMixin,pl:mixin:APP:citadel.mixins.json:MinecraftServerMixin,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:neruina-common.mixins.json:MinecraftServerMixin,pl:mixin:A}
        at net.minecraft.server.MinecraftServer.m_195514_(MinecraftServer.java:532) ~[server-1.20.1-20230612.114412-srg.jar%23821!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:modernfix-common.mixins.json:perf.dedicated_reload_executor.MinecraftServerMixin,pl:mixin:APP:chunkpregen.mixins.json:common.server.MinecraftServerMixin,pl:mixin:APP:chunkpregen.mixins.json:common.server.ServerSeedMixin,pl:mixin:APP:crafttweaker.mixins.json:common.access.server.AccessMinecraftServer,pl:mixin:APP:saturn.mixins.json:allocations.server_directory.MinecraftServerMixin,pl:mixin:APP:citadel.mixins.json:MinecraftServerMixin,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:neruina-common.mixins.json:MinecraftServerMixin,pl:mixin:A}
        at net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:824) ~[server-1.20.1-20230612.114412-srg.jar%23821!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:modernfix-common.mixins.json:perf.dedicated_reload_executor.MinecraftServerMixin,pl:mixin:APP:chunkpregen.mixins.json:common.server.MinecraftServerMixin,pl:mixin:APP:chunkpregen.mixins.json:common.server.ServerSeedMixin,pl:mixin:APP:crafttweaker.mixins.json:common.access.server.AccessMinecraftServer,pl:mixin:APP:saturn.mixins.json:allocations.server_directory.MinecraftServerMixin,pl:mixin:APP:citadel.mixins.json:MinecraftServerMixin,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:neruina-common.mixins.json:MinecraftServerMixin,pl:mixin:A}
        at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:661) ~[server-1.20.1-20230612.114412-srg.jar%23821!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:modernfix-common.mixins.json:perf.dedicated_reload_executor.MinecraftServerMixin,pl:mixin:APP:chunkpregen.mixins.json:common.server.MinecraftServerMixin,pl:mixin:APP:chunkpregen.mixins.json:common.server.ServerSeedMixin,pl:mixin:APP:crafttweaker.mixins.json:common.access.server.AccessMinecraftServer,pl:mixin:APP:saturn.mixins.json:allocations.server_directory.MinecraftServerMixin,pl:mixin:APP:citadel.mixins.json:MinecraftServerMixin,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:neruina-common.mixins.json:MinecraftServerMixin,pl:mixin:A}
        at net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:251) ~[server-1.20.1-20230612.114412-srg.jar%23821!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:modernfix-common.mixins.json:perf.dedicated_reload_executor.MinecraftServerMixin,pl:mixin:APP:chunkpregen.mixins.json:common.server.MinecraftServerMixin,pl:mixin:APP:chunkpregen.mixins.json:common.server.ServerSeedMixin,pl:mixin:APP:crafttweaker.mixins.json:common.access.server.AccessMinecraftServer,pl:mixin:APP:saturn.mixins.json:allocations.server_directory.MinecraftServerMixin,pl:mixin:APP:citadel.mixins.json:MinecraftServerMixin,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:neruina-common.mixins.json:MinecraftServerMixin,pl:mixin:A}
        at java.lang.Thread.run(Thread.java:840) ~[?:?] {re:mixin}
YassaaaTU commented 7 months ago

You should send the full crash-log so the dev can actually see what is causing the problem. :)

I also recommend using MCLogs

MaxWasUnavailable commented 7 months ago

You should send the full crash-log so the dev can actually see what is causing the problem. :)

I also recommend using MCLogs

This is the relevant stack trace for the crash. That being said, it seems the last commit was ~5 months ago, so it might be that the mod is no longer actively maintained anyway.

PvtFudgepants commented 4 months ago

Did you ever figure out what was causing this? I'm currently having the same error.

MaxWasUnavailable commented 3 months ago

This is still happening, different pack, same exact crash.

MaxWasUnavailable commented 3 months ago

Dirty fix, but adding a try-catch in DIWorldData.save (see below) seems to at least prevent the crashing. Obviously doesn't fix the source of the problem, but it's duct tape to prevent the crash until a proper fix is made:

        if (!this.lanternRequestList.isEmpty()) {
            ListTag listTag = new ListTag();
            for(LanternRequest request : lanternRequestList){
                try {
                    CompoundTag tag = new CompoundTag();
                    tag.putUUID("PetUUID", request.getPetUUID());
                    tag.putString("EntityType", request.getEntityTypeLoc());
                    tag.putUUID("OwnerUUID", request.getOwnerUUID());
                    tag.putLong("Timestamp", request.getTimestamp());
                    tag.putString("EntityNametag", request.getNametag());
                    tag.putInt("X", request.getChunkPosition().getX());
                    tag.putInt("Y", request.getChunkPosition().getY());
                    tag.putInt("Z", request.getChunkPosition().getZ());
                    listTag.add(tag);
                } catch (Exception e) {
                    DomesticationMod.LOGGER.error("Failed to save lantern request: {}", e.getMessage());
                }
alarmgoose commented 3 months ago

Had anyone been able to fix this issue without having to go into the java file? I tried that out but I can't seem to repackage the mod once I edit it.

SuperStefan97 commented 2 months ago

Seems to be a common problem, I also reported it (before knowing about it, I will add the crashes here too https://pastebin.com/A7q9KN1J https://github.com/user-attachments/files/16923851/crash-2024-09-08_03.08.05-server.txt

MaxWasUnavailable commented 2 months ago

Had anyone been able to fix this issue without having to go into the java file? I tried that out but I can't seem to repackage the mod once I edit it.

You'd have to open the project in an IDE such as IntelliJ IDEA, have a dev environment set up, do the edit, and then recompile it to get a jar.