chatasma / PGM

The original PvP Game Manager for Minecraft

Home Page:https://pgm.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ModuleLoadException: Failed to generate spawn location Bug

Mew2K opened this issue · comments

Issue Description: Attempting to cycle to this map seems to completely break PGM. There is not much of a stack trace, but it seems the core problem lies within the message that PGM sends: "[PGM] ModuleLoadException: Failed to generate spawn location for MewTwoKing". Upon failing to cycle, most/all PGM commands seem to become disabled, with the message "You must be a player to use this command!" getting sent whenever trying to run a PGM command. It seems to be possible to break out of this state by cycling to a new map within the console. Additionally, PGM fails to unload the previous map, which leads to additional error upon stopping the server (this may just be a side effect of the underlying bug, though seeing as there is not much information to go off of, I figured I'd include this detail just in case).

Map: Rooted Frontier

Version: PGM-0.16-SNAPSHOT-3c8fd1f9.jar

Video:

Minecraft.1.20.4.-.Multiplayer.3rd-party.Server.2024-05-25.21-21-04.mp4

Stack Trace (Before Stopping Server):
[21:21:07 INFO]: MewTwoKing issued server command: /sn Rooted Frontier
[21:21:07 INFO]: [A] ❖MewTwoKing set the next map to Rooted Frontier
[21:21:08 INFO]: MewTwoKing issued server command: /cycle 1
[21:21:08 INFO]: Cycling to Rooted Frontier in 1 second
[21:21:09 INFO]: Preparing start region for dimension minecraft:match-5
[21:21:09 INFO]: Time elapsed: 22 ms
[21:21:09 WARN]: [PGM.MatchImpl] [MatchImpl] VariablesMatchModule implements Listener but is not annotated with @ListenerScope
[21:21:09 INFO]: [PGM.MatchManagerImpl] [MatchManagerImpl] Loaded match-5 (rooted_frontier)
[21:21:09 WARN]: Skipping Entity with id Armorstand
[21:21:09 WARN]: Skipping Entity with id Armorstand
[21:21:09 INFO]: [PGM] ModuleLoadException: Failed to generate spawn location for MewTwoKing
[21:21:15 INFO]: MewTwoKing issued server command: /cycle 1
[21:21:17 INFO]: MewTwoKing issued server command: /join
[21:21:20 INFO]: MewTwoKing issued server command: /sn 2D
[21:21:22 INFO]: MewTwoKing issued server command: /join
[21:21:24 ERROR]: [PGM.MatchImpl] [MatchImpl] Unable to unload world match-4 (this can cause memory leaks!)
[21:21:24 INFO]: [PGM.MatchManagerImpl] [MatchManagerImpl] Unloaded match-4 (enchanted)

Stack Trace (After Stopping Server):
[21:23:58 INFO]: [ChunkHolderManager] Halted chunk system for world 'match-2'
[21:23:58 INFO]: [ChunkHolderManager] Saving all chunkholders for world 'match-2'
[21:23:58 INFO]: [ChunkHolderManager] Saved 2374 block chunks, 702 entity chunks, 0 poi chunks in world 'match-2' in 0.51s
[21:23:58 ERROR]: Failed to save level .\match-2
java.nio.file.NoSuchFileException: .\match-2\level11944566549908683292.dat
at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85) ~[?:?]
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103) ~[?:?]
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108) ~[?:?]
at sun.nio.fs.WindowsFileSystemProvider.newByteChannel(WindowsFileSystemProvider.java:236) ~[?:?]
at java.nio.file.Files.newByteChannel(Files.java:380) ~[?:?]
at java.nio.file.Files.createFile(Files.java:658) ~[?:?]
at java.nio.file.TempFileHelper.create(TempFileHelper.java:136) ~[?:?]
at java.nio.file.TempFileHelper.createTempFile(TempFileHelper.java:159) ~[?:?]
at java.nio.file.Files.createTempFile(Files.java:878) ~[?:?]
at net.minecraft.world.level.storage.LevelStorageSource$LevelStorageAccess.saveLevelData(LevelStorageSource.java:614) ~[?:?]
at net.minecraft.world.level.storage.LevelStorageSource$LevelStorageAccess.saveDataTag(LevelStorageSource.java:607) ~[?:?]
at net.minecraft.server.level.ServerLevel.save(ServerLevel.java:1544) ~[?:?]
at net.minecraft.server.MinecraftServer.saveAllChunks(MinecraftServer.java:881) ~[paper-1.20.4.jar:git-Paper-496]
at net.minecraft.server.MinecraftServer.stopServer(MinecraftServer.java:999) ~[paper-1.20.4.jar:git-Paper-496]
at net.minecraft.server.dedicated.DedicatedServer.stopServer(DedicatedServer.java:822) ~[paper-1.20.4.jar:git-Paper-496]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1265) ~[paper-1.20.4.jar:git-Paper-496]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[paper-1.20.4.jar:git-Paper-496]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
[21:23:58 INFO]: ThreadedAnvilChunkStorage (match-2): All chunks are saved