Skip to content
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

Error while loading migrated Bukkit world #1116

Closed
TheRaspPie opened this issue Jan 3, 2017 · 3 comments
Closed

Error while loading migrated Bukkit world #1116

TheRaspPie opened this issue Jan 3, 2017 · 3 comments
Labels
system: world type: bug Something isn't working version: 1.10 (u) API: 5 (unsupported since Jan 1st 2018)

Comments

@TheRaspPie
Copy link
Contributor

  1. Migrate worlds from Bukkit by dropping them into the server folder and starting.
  2. Load one of these worlds. Loads just fine.
  3. Load a second one of these worlds. The console shows the following error:
java.lang.IllegalArgumentException: value already present: null
        at com.google.common.collect.HashBiMap.put(HashBiMap.java:238) ~[minecraft_server.1.11.jar:?]
        at com.google.common.collect.HashBiMap.put(HashBiMap.java:215) ~[minecraft_server.1.11.jar:?]
        at org.spongepowered.common.world.WorldManager.registerWorldProperties(WorldManager.java:331) ~[WorldManager.class:1.11-6.0.0-BETA-190]
        at org.spongepowered.common.world.WorldManager.loadWorld(WorldManager.java:597) ~[WorldManager.class:1.11-6.0.0-BETA-190]
        at org.spongepowered.common.world.WorldManager.loadWorld(WorldManager.java:553) ~[WorldManager.class:1.11-6.0.0-BETA-190]
        at net.minecraft.server.MinecraftServer.loadWorld(SourceFile:406) ~[MinecraftServer.class:?]
===== PLUGIN CODE =====
        at org.spongepowered.api.command.dispatcher.SimpleDispatcher.process(SimpleDispatcher.java:333) ~[SimpleDispatcher.class:1.11-6.0.0-BETA-190]
        at org.spongepowered.common.command.SpongeCommandManager.process(SpongeCommandManager.java:291) [SpongeCommandManager.class:1.11-6.0.0-BETA-190]
        at net.minecraft.command.ServerCommandManager.func_71556_a(SourceFile:83) [bd.class:?]
        at net.minecraft.network.NetHandlerPlayServer.func_147361_d(SourceFile:811) [mi.class:?]
        at net.minecraft.network.NetHandlerPlayServer.func_147354_a(SourceFile:798) [mi.class:?]
        at net.minecraft.network.play.client.CPacketChatMessage.func_148833_a(SourceFile:37) [ip.class:?]
        at net.minecraft.network.play.client.CPacketChatMessage.func_148833_a(SourceFile:9) [ip.class:?]
        at org.spongepowered.common.network.PacketUtil.onProcessPacket(PacketUtil.java:136) [PacketUtil.class:1.11-6.0.0-BETA-190]
        at net.minecraft.network.PacketThreadUtil$1.redirect$onProcessPacket$zin000(SourceFile:39) [fo$1.class:?]
        at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) [fo$1.class:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_92]
        at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_92]
        at net.minecraft.util.Util.func_181617_a(SourceFile:46) [h.class:?]
        at net.minecraft.server.MinecraftServer.func_71190_q(SourceFile:153) [MinecraftServer.class:?]
        at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(SourceFile:335) [lh.class:?]
        at net.minecraft.server.MinecraftServer.func_71217_p(SourceFile:562) [MinecraftServer.class:?]
        at net.minecraft.server.MinecraftServer.run(SourceFile:466) [MinecraftServer.class:?]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_92]

The error points to this line:
https://github.com/SpongePowered/SpongeCommon/blob/bleeding/src/main/java/org/spongepowered/common/world/WorldManager.java#L331

So I suspect that somehow the UUID of a migrated Bukkit world is null, because the first world is properly loaded and only when the second one is loaded, this error occurs. Reloading the first one after that is fine.

Might be related to #1048 and #648.

Tested on Spongevanilla 1.11-6.0.0-BETA-190.

@TheRaspPie
Copy link
Contributor Author

TheRaspPie commented Jan 20, 2017

Still occurs on SpongeVanilla 1.10.2-5.1.0-BETA-366.

EDIT:
I may also note that worlds that have the same internal name (saved in NBT), but different folder names, both appear as their internal names, not their folder names, in the server log.
Maybe we should only ever use the folder name, and stop relying on the NBT name completely. Also, world UUIDs seem to make problems all the time, if two world's are equal by copying and renaming etc.
So I may ask, why do we use those names and UUIDs in the first place? Is there any reason besides the fact that Vanilla uses them?

@kashike kashike reopened this Jan 20, 2017
@kashike kashike added system: world type: bug Something isn't working labels Feb 25, 2017
@ryantheleach
Copy link
Contributor

Does this still occur on 1.12? If so, this could be limiting migration of Bukkit to Sponge.

@TheRaspPie It's a convenient place to keep a name, and the UUID's are a sponge concept in order to unique-ify worlds.

There should be no reason why we can't import a world with duplicate names, or duplicate UUID's given input from the user on what to do.

I would expect attempting to import a world with clashing data, to give the user an option of importing but generating a new UUID, replacing the other world, and changing it's UUID, or loading this world in place of the other world.

There are valid reasons to load a duplicate world, and server administrators are accustomed to just copying folders and reloading. We should be able to handle this semi-gracefully.

@ImMorpheus
Copy link
Contributor

Hey! You seem to be running an unsupported version (1.10.2) of SpongeVanilla. Support for 1.10 ended in January 2018.

If you can reproduce this issue with Minecraft 1.12.2, please open a new issue with updated information.

(Small note: this looks really similar to SpongePowered/SpongeVanilla#378 which is now fixed, showing importing worlds is working fine)

@ImMorpheus ImMorpheus added the version: 1.10 (u) API: 5 (unsupported since Jan 1st 2018) label Jul 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
system: world type: bug Something isn't working version: 1.10 (u) API: 5 (unsupported since Jan 1st 2018)
Projects
None yet
Development

No branches or pull requests

4 participants