Pixelmon Mod - Bug tracker

[9.0.0] Server fails to save party fix completed

Ticket description:
On using /stop:

Code: Select all[21:40:34] [pool-3-thread-1/ERROR] [Pixelmon/]: Couldn't async save storage of type PlayerPartyStorage and UUID: 78f852ea-3d33-4d5a-85be-9c14a476c17b
[21:40:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]: java.lang.NullPointerException
[21:40:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at com.pixelmonmod.pixelmon.api.storage.PlayerPartyStorage.getNames(PlayerPartyStorage.java:260)
[21:40:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at com.pixelmonmod.pixelmon.api.storage.PlayerPartyStorage.writeToNBT(PlayerPartyStorage.java:242)
[21:40:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at com.pixelmonmod.pixelmon.storage.adapters.PixelmonFileAdapter.save(PixelmonFileAdapter.java:18)
[21:40:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at com.pixelmonmod.pixelmon.api.storage.StorageSaveScheduler.save(StorageSaveScheduler.java:18)
[21:40:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler.flush(PixelmonStorageAsyncScheduler.java:80)
[21:40:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler.lambda$new$0(PixelmonStorageAsyncScheduler.java:31)
[21:40:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[21:40:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
[21:40:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
[21:40:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
[21:40:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[21:40:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[21:40:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at java.lang.Thread.run(Thread.java:748)
[21:41:34] [pool-3-thread-1/ERROR] [Pixelmon/]: Couldn't async save storage of type PlayerPartyStorage and UUID: 78f852ea-3d33-4d5a-85be-9c14a476c17b
[21:41:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]: java.lang.NullPointerException
[21:41:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at com.pixelmonmod.pixelmon.api.storage.PlayerPartyStorage.getNames(PlayerPartyStorage.java:260)
[21:41:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at com.pixelmonmod.pixelmon.api.storage.PlayerPartyStorage.writeToNBT(PlayerPartyStorage.java:242)
[21:41:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at com.pixelmonmod.pixelmon.storage.adapters.PixelmonFileAdapter.save(PixelmonFileAdapter.java:18)
[21:41:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at com.pixelmonmod.pixelmon.api.storage.StorageSaveScheduler.save(StorageSaveScheduler.java:18)
[21:41:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler.flush(PixelmonStorageAsyncScheduler.java:80)
[21:41:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler.lambda$new$0(PixelmonStorageAsyncScheduler.java:31)
[21:41:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[21:41:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
[21:41:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
[21:41:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
[21:41:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[21:41:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[21:41:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at java.lang.Thread.run(Thread.java:748)
[21:42:34] [pool-3-thread-1/ERROR] [Pixelmon/]: Couldn't async save storage of type PlayerPartyStorage and UUID: 78f852ea-3d33-4d5a-85be-9c14a476c17b
[21:42:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]: java.lang.NullPointerException
[21:42:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at com.pixelmonmod.pixelmon.api.storage.PlayerPartyStorage.getNames(PlayerPartyStorage.java:260)
[21:42:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at com.pixelmonmod.pixelmon.api.storage.PlayerPartyStorage.writeToNBT(PlayerPartyStorage.java:242)
[21:42:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at com.pixelmonmod.pixelmon.storage.adapters.PixelmonFileAdapter.save(PixelmonFileAdapter.java:18)
[21:42:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at com.pixelmonmod.pixelmon.api.storage.StorageSaveScheduler.save(StorageSaveScheduler.java:18)
[21:42:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler.flush(PixelmonStorageAsyncScheduler.java:80)
[21:42:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler.lambda$new$0(PixelmonStorageAsyncScheduler.java:31)
[21:42:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[21:42:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
[21:42:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
[21:42:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
[21:42:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[21:42:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[21:42:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at java.lang.Thread.run(Thread.java:748)
[21:43:34] [pool-3-thread-1/ERROR] [Pixelmon/]: Couldn't async save storage of type PlayerPartyStorage and UUID: 78f852ea-3d33-4d5a-85be-9c14a476c17b
[21:43:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]: java.lang.NullPointerException
[21:43:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at com.pixelmonmod.pixelmon.api.storage.PlayerPartyStorage.getNames(PlayerPartyStorage.java:260)
[21:43:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at com.pixelmonmod.pixelmon.api.storage.PlayerPartyStorage.writeToNBT(PlayerPartyStorage.java:242)
[21:43:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at com.pixelmonmod.pixelmon.storage.adapters.PixelmonFileAdapter.save(PixelmonFileAdapter.java:18)
[21:43:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at com.pixelmonmod.pixelmon.api.storage.StorageSaveScheduler.save(StorageSaveScheduler.java:18)
[21:43:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler.flush(PixelmonStorageAsyncScheduler.java:80)
[21:43:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler.lambda$new$0(PixelmonStorageAsyncScheduler.java:31)
[21:43:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[21:43:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
[21:43:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
[21:43:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
[21:43:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[21:43:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[21:43:34] [pool-3-thread-1/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at java.lang.Thread.run(Thread.java:748)
[21:43:45] [Server thread/INFO] [minecraft/DedicatedServer]: [Le_Schwin: Stopping the server]
[21:43:45] [Server thread/INFO] [co.sk.wo.ex.pl.PlatformManager/]: Unregistering com.sk89q.worldedit.forge.ForgePlatform from WorldEdit
[21:43:45] [Server thread/ERROR] [Pixelmon/]: Couldn't async save storage of type PlayerPartyStorage and UUID: 78f852ea-3d33-4d5a-85be-9c14a476c17b
[21:43:45] [Server thread/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]: java.lang.NullPointerException
[21:43:45] [Server thread/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at com.pixelmonmod.pixelmon.api.storage.PlayerPartyStorage.getNames(PlayerPartyStorage.java:260)
[21:43:45] [Server thread/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at com.pixelmonmod.pixelmon.api.storage.PlayerPartyStorage.writeToNBT(PlayerPartyStorage.java:242)
[21:43:45] [Server thread/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at com.pixelmonmod.pixelmon.storage.adapters.PixelmonFileAdapter.save(PixelmonFileAdapter.java:18)
[21:43:45] [Server thread/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at com.pixelmonmod.pixelmon.api.storage.StorageSaveScheduler.save(StorageSaveScheduler.java:18)
[21:43:45] [Server thread/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler.flush(PixelmonStorageAsyncScheduler.java:80)
[21:43:45] [Server thread/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler.onServerStopping(PixelmonStorageAsyncScheduler.java:54)
[21:43:45] [Server thread/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at com.pixelmonmod.pixelmon.Pixelmon.onServerStopping(Pixelmon.java:249)
[21:43:45] [Server thread/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at net.minecraftforge.eventbus.ASMEventHandler_218_Pixelmon_onServerStopping_FMLServerStoppingEvent.invoke(.dynamic)
[21:43:45] [Server thread/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85)
[21:43:45] [Server thread/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302)
[21:43:45] [Server thread/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283)
[21:43:45] [Server thread/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at net.minecraftforge.fml.server.ServerLifecycleHooks.handleServerStopping(ServerLifecycleHooks.java:113)
[21:43:45] [Server thread/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:652)
[21:43:45] [Server thread/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at net.minecraft.server.MinecraftServer.func_240783_a_(MinecraftServer.java:232)
[21:43:45] [Server thread/INFO] [STDERR/]: [com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageAsyncScheduler:flush:85]:    at java.lang.Thread.run(Thread.java:748)
[21:43:45] [Server thread/INFO] [minecraft/MinecraftServer]: Stopping server

Comments

#25600 Posted by Katzyn » 27 May 2022 06:22

Heya, thanks for your ticket! I'll pass this on to Internal!

#25635 Posted by ikbikslik » 27 May 2022 16:01

After looking through the source code, it looks like this issue is related to the server not correctly recording which mega stone's the player has obtained.

See:

Code: Select allcom.pixelmonmod.pixelmon.api.storage.PlayerPartyStorage.writeToNBT


The getNames call that results in a NullPointerException occurs within a for-loop block that iterates over the species of unlocked megas.

Such an exception implies that the data from this.megasObtained.keySet() is generated improperly (and likely contains null values or values that generate null values).

#25636 Posted by ikbikslik » 27 May 2022 16:02

You may want to try and reproduce this issue by defeating the same Mega boss twice.

#25638 Posted by ItsKipz » 27 May 2022 16:08

Having the same issue on a server with multiple people - it seems to start happening around when a player kills a mega boss and obtains a mega stone, the next time they log in the async saving fails (and continues to fail every time the async interval occurs). Based on the error it may be involving the saving of the MegasObtained section of the player's .pk file - the last time it is written before the server is unable to write to the file anymore, it adds "[email protected]" (alternating d4 for a different value based on which mega it is) at around hex 0x000035A5, and the error involves the getNames method in PlayerPartySorage.java. I can send two pk files - one is a player who has not killed a mega yet (freshly generated to test the error), and another immediately after the same player killed a mega (marked as player_mega) - for comparison, if that helps at all (the second one has that string and can no longer be written by the async routine).

#25639 Posted by ikbikslik » 27 May 2022 16:16

I literally just made the same observation. Good stuff, I think we found the root cause here.

#25641 Posted by ItsKipz » 27 May 2022 16:36

To add to this, the server seems to be writing that data to the file perfectly fine when async is disabled, and if async is on it is able to write the data until the player disconnects and reconnects, at which point it pulls the data from the file but stops being able to write back to it - possibly, the async routine has an issue flushing that specific data to disk (pulling it from memory until the player logs off) and then the next time it has to read the data it gets somewhat mangled data that it is no longer able to re-write to disk? (or vice versa, having trouble reading from disk on player log-in and getting mangled data that can't be re-written)

The player .pk files have the MegasObtained information written correctly (confirmed using a functioning file generated with async disabled, player_mega_working.pk) and are being updated up until the player logs off, at which point the next time they log in it is no longer able to be updated and the error appears in the log.

All three pk files are attached here: https://drive.google.com/drive/folders/1JLg-huxOF8ip2LPtHQPTwmBup2hB8Czo?usp=sharing

#25662 Posted by ItsKipz » 27 May 2022 22:59

Slight update: with async disabled, the server no longer fails to write to the player data file, but instead it just completely crashes when trying to write the data. I've uploaded a player data file and relevant crash log below - what happened is a player caught a mega, logged in and out multiple times with no issue, the server was then restarted, and upon the player logging in again the server hard crashed about a minute later with a similar error (exception in server tick loop, which the logs identify as a java.lang.NullPointerException at PlayerPartyStorage.getNames)

I think what's happening is when the MegasObtained data is read from disk, it comes back somewhat mangled and any attempts to re-write this new data to disk just break the writeToNBT function - or the error is happening upon writing to disk, I'm not sure if what I'm seeing in the .pk files is even close to correct since I don't know the format.

Relevant files are attached here: https://drive.google.com/drive/folders/1lA4QttBMjzUEEUDG6qfTpDzw4OSl-jYz?usp=sharing

logfile.txt is the section of the server log pertaining to the crash (all subsequent crashes display the same errors), and crashing.pk is the player file for the player that is causing the crashes

#25691 Posted by Katzyn » 28 May 2022 05:51

Thanks guys, I've passed this whole convo onto the internal ticket as well.

Ticket details

  • Ticket ID: 17692
  • Project: Pixelmon Mod
  • Status: Fix completed
  • Component: Error
  • Project version: 1.16.5-9.x.x
  • Priority: Normal
  • Severity: Normal
  • Forge/Sponge: Forge 36.2.34 no Sponge
  • What else would be useful to know?: (unknown)
  • Assigned to: Katzyn
  • Reported by: ikbikslik (Send PM)
  • Reporter's tickets: (List all tickets)
  • Reported on: 26 May 2022 21:45
  • Ticket last visited by: Sophie847 on 29 Jun 2022 03:03
JOIN THE TEAM