BG-Software-LLC / SuperiorSkyblock2

Optimized, feature packed Skyblock core.
https://bg-software.com/superiorskyblock/
GNU General Public License v3.0
166 stars 139 forks source link

Island creation for new players hanging and not completing #2051

Open EditChris opened 4 months ago

EditChris commented 4 months ago

Minecraft's Version

Paper Spigot for 1.20.4, Build 478

Plugin's Version

SuperiorSkyBlock2: 2023.3-b163 OneBlock module also installed with: 2023.3-b47

Describe the bug

When a new player joins the server for the first time and tries to create the island, the island creation process seems to hang and never complete. After that player performed the command the island gets registered, but neither you or that player can't teleport to it. Disconnecting then joining back doesn't fix it.

What seems to do the trick most of the time is completely delete the island with /island delete, then create it again, this second time working perfectly. This however is inconsistent, a few players were able to create it the first try, as it's supposed to be, but now I just had a case where the player tried to delete/create the island 4 times, even rejoining between each attempt, and nothing.

Also, the console won't send a single error or warn line about this, it just hangs in there and never finishes. The thing is, it seems no one else is reporting this, so maybe it could be some cache or something I should clean or something else that could be wrong in my end?

To Reproduce

  1. Join the server for the first time.
  2. Try to create an island.

Additional Information

No response

OmerBenGera commented 4 months ago

Are your schematics large? Is your server lagging? SuperiorSkyblock will not load chunks in case the server is really lagging. Or, if your schematic is really large, it will take more time to load all the chunks for it to be placed.

EditChris commented 4 months ago

The schematics are pretty tiny, and when the creation process does work it takes just a second or two in generate everything.

About the other option, I also checked if the server is lagging, but trying to do anything else in the server, either from this plugin or others all while the creation process is supposedly still running feels perfect, as one could expect. And if I check the server's memory usage, CPU usage or the TPS, all that is in order.

More like hanging in there it feels like the process gets interrupted by something, but neither the player or the console get any message reporting a problem. Is there like a debug mode or something available in the plugin to have access to more detailed logs to maybe find what's going on?

OmerBenGera commented 4 months ago

The schematics are pretty tiny, and when the creation process does work it takes just a second or two in generate everything.

About the other option, I also checked if the server is lagging, but trying to do anything else in the server, either from this plugin or others all while the creation process is supposedly still running feels perfect, as one could expect. And if I check the server's memory usage, CPU usage or the TPS, all that is in order.

More like hanging in there it feels like the process gets interrupted by something, but neither the player or the console get any message reporting a problem. Is there like a debug mode or something available in the plugin to have access to more detailed logs to maybe find what's going on?

You can use /is admin debug <tab> for a list of available debug messages. By enabling them, you'll see messages in console regarding actions in the plugin. Try enabling CREATE_ISLAND, PASTE_SCHEMATIC and LOAD_CHUNK, and send the results back for a stuck island.

EditChris commented 4 months ago

Got the debug text of a case where it fails:

[15:25:55 INFO]: ingeniusparrot issued server command: /island create
[15:25:57 INFO]: [SuperiorSkyblock2] GridManagerImpl::createIslandInternalAsync {ingeniusparrot} {0} {0} {} {true} {WINDSWEPT_HILLS} {oneblock}
[15:25:57 INFO]: [SuperiorSkyblock2] DefaultIslandCreationAlgorithm::createIsland {ingeniusparrot} {oneblock} {islands, -5250, 110, -2250}
[15:25:57 INFO]: [SuperiorSkyblock2] DefaultIslandCreationAlgorithm::createIsland Next Island Position {Location{world=CraftWorld{name=islands},x=-5250.0,y=110.0,z=-3000.0,pitch=0.0,yaw=0.0}}
[15:25:57 INFO]: [SuperiorSkyblock2] SuperiorSchematic::pasteSchematic {oneblock} {ingeniusparrot} {Location{world=CraftWorld{name=islands},x=-5250.0,y=109.0,z=-3000.0,pitch=0.0,yaw=0.0}}
[15:25:57 INFO]: [SuperiorSkyblock2] ChunksProvider::loadChunk {islands, -329, -188} {SCHEMATIC_PLACE}
[15:25:57 INFO]: [SuperiorSkyblock2] SuperiorSchematic::null Loaded Chunk {islands, -329, -188}
[15:25:57 INFO]: [SuperiorSkyblock2] SuperiorSchematic::pasteSchematic Finished Chunks Loading {}
[15:26:04 INFO]: ingeniusparrot issued server command: /island home
[15:26:14 INFO]: ingeniusparrot issued server command: /island home

After the attempt, I tried to teleport to the coordinates where the islands were supposed to be generated. Nothing was there, all an empty void.

Late edit: Doing more testing I found out that it affects the island generation that has the OneBlock block enabled. The normal SkyBlock generation works as intended. The schematic I have for OneBlock is literally a 1x1x1 schematic, just the OneBlock block.

OmerBenGera commented 3 months ago

@EditChris I added more debug messages to the creation process. Please install latest dev build and do the same debugging again, hopefully I will better understand what causes this to hang.

EditChris commented 2 months ago

After a while looking at the issue, it looks like this is something wrong with the OneBlock module, not the main plugin. I've been updating the plugin every time a new build got available and been trying since then. Comparing the debug messages from a successful creation with an unsuccessful one doesn't say a thing, it's basically the same:

Successful:

[19:50:33 INFO]: [SuperiorSkyblock2] GridManagerImpl::createIslandInternalAsync {Username} {0} {0} {} {true} {WINDSWEPT_HILLS} {oneblock}
[19:50:33 INFO]: [SuperiorSkyblock2] DefaultIslandCreationAlgorithm::createIsland {Username} {oneblock} {islands, -6750, 110, 6750}
[19:50:33 INFO]: [SuperiorSkyblock2] DefaultIslandCreationAlgorithm::createIsland Next Island Position {Location{world=CraftWorld{name=islands},x=-6750.0,y=110.0,z=6000.0,pitch=0.0,yaw=0.0}}
[19:50:34 INFO]: [SuperiorSkyblock2] SuperiorSchematic::pasteSchematic {oneblock} {Username} {Location{world=CraftWorld{name=islands},x=-6750.0,y=109.0,z=6000.0,pitch=0.0,yaw=0.0}}
[19:50:34 INFO]: [SuperiorSkyblock2] ChunksProvider::loadChunk {islands, -422, 375} {SCHEMATIC_PLACE}
[19:50:34 INFO]: [SuperiorSkyblock2] SuperiorSchematic::null Loaded Chunk {islands, -422, 375}
[19:50:34 INFO]: [SuperiorSkyblock2] SuperiorSchematic::pasteSchematicAsyncInternal Finished Chunks Loading {}
[19:50:34 INFO]: [SuperiorSkyblock2] SuperiorSchematic::null Placing Schematic {}
[19:50:34 INFO]: [SuperiorSkyblock2] SuperiorSchematic::null Spawning Entities {}
[19:50:34 INFO]: [SuperiorSkyblock2] SuperiorSchematic::null Finished Schematic Placement {}

NOT Successful:

[15:14:07 INFO]: [SuperiorSkyblock2] GridManagerImpl::createIslandInternalAsync {Username} {0} {0} {} {true} {WINDSWEPT_HILLS} {oneblock}
[15:14:07 INFO]: [SuperiorSkyblock2] DefaultIslandCreationAlgorithm::createIsland {Username} {oneblock} {islands, -6750, 110, 5250}
[15:14:07 INFO]: [SuperiorSkyblock2] DefaultIslandCreationAlgorithm::createIsland Next Island Position {Location{world=CraftWorld{name=islands},x=-6750.0,y=110.0,z=4500.0,pitch=0.0,yaw=0.0}}
[15:14:07 INFO]: [SuperiorSkyblock2] SuperiorSchematic::pasteSchematic {oneblock} {Username} {Location{world=CraftWorld{name=islands},x=-6750.0,y=109.0,z=4500.0,pitch=0.0,yaw=0.0}}
[15:14:07 INFO]: [SuperiorSkyblock2] ChunksProvider::loadChunk {islands, -422, 281} {SCHEMATIC_PLACE}
[15:14:07 INFO]: [SuperiorSkyblock2] SuperiorSchematic::null Loaded Chunk {islands, -422, 281}
[15:14:07 INFO]: [SuperiorSkyblock2] SuperiorSchematic::pasteSchematicAsyncInternal Finished Chunks Loading {}
[15:14:07 INFO]: [SuperiorSkyblock2] SuperiorSchematic::null Placing Schematic {}
[15:14:07 INFO]: [SuperiorSkyblock2] SuperiorSchematic::null Spawning Entities {}
[15:14:07 INFO]: [SuperiorSkyblock2] SuperiorSchematic::null Finished Schematic Placement {}

Been also looking at the memory usage before, during and after the creation process for each case and not having enough memory is not the issue, I have plenty of memory available, and in the case of the schematic I use for OneBlock I shouldn't even need to worry because it's literally a schematic of a single block. The creation process for a normal SkyBlock island works flawlessly, and the schematic is like x1000+ bigger.

OmerBenGera commented 2 months ago

When it doesn't work and the player runs /is tp, what happens?

EditChris commented 2 months ago

Nothing. No message or anything, like if it was stuck.

OmerBenGera commented 2 months ago

Sounds like chunks are not loaded for you or something like that. Try running /is admin debug LOAD_CHUNK and then tp (of course, after island was not created)

EditChris commented 2 months ago

As I explained in previous messages, trying to teleport to the island when the process failed did absolutely nothing. LOAD_CHUNK was one of the flags you asked me to check some time ago, so all the console logs I've sent has that flag enabled. In this test I only enabled the LOAD_CHUNK message as you requested, and the only line I got when I tried to create the island was this:

[18:16:59 INFO]: [SuperiorSkyblock2] ChunksProvider::loadChunk {islands, -422, -47} {SCHEMATIC_PLACE}

Doing /is tp after that did nothing. Nothing was shown on the console or the in-game chat, it just looks like the process got stuck. After that, I fully deleted the island with /is delete and tried to create another one, this time being successful. The message in the console is the same, the only difference are the island coordinates:

[18:17:46 INFO]: [SuperiorSkyblock2] ChunksProvider::loadChunk {islands, -422, -94} {SCHEMATIC_PLACE}

I'm also using the latest builds of both SuperiorSkyBlock2 and the OneBlock module, in Paper 1.20.4

OmerBenGera commented 2 months ago

Does it happen on a testing server (where only you are online), or does it only happen on a server with many players?

EditChris commented 2 months ago

Both cases. I've seen that it happens less frequently after at least one island creation got successful, but still can happen, as just that happened like that on my server. It's a bit random.

If you prefer it, is there any way we could talk more directly so we can get into the root of the problem quicker?

OmerBenGera commented 2 months ago

Hey, check out latest dev build, I added more debug messages. I want you to use /is admin debug CREATE_ISLAND as we did before, and send me the output (when it gets stuck)

EditChris commented 2 months ago

Ok, here's the result:

[17:29:22 INFO]: [SuperiorSkyblock2] GridManagerImpl::createIslandInternalAsync {Player} {0} {0} {} {true} {WINDSWEPT_HILLS} {oneblock}
[17:29:22 INFO]: [SuperiorSkyblock2] DefaultIslandCreationAlgorithm::createIsland {Player} {oneblock} {islands, -6000, 110, 7500}
[17:29:22 INFO]: [SuperiorSkyblock2] DefaultIslandCreationAlgorithm::createIsland Next Island Position {Location{world=CraftWorld{name=islands},x=-6750.0,y=110.0,z=7500.0,pitch=0.0,yaw=0.0}}
[17:29:23 INFO]: [SuperiorSkyblock2] GridManagerImpl::createIslandInternalAsync Creation Callback {Successfully created island}
[17:29:23 INFO]: [SuperiorSkyblock2] GridManagerImpl::createIslandInternalOnSuccessCallback Creation Callback {Registering new island}
[17:29:23 INFO]: [SuperiorSkyblock2] GridManagerImpl::null Creation Callback {Teleporting player}

The player tried creating the OneBlock island, all that output is what the console got, and the player wasn't teleported and couldn't teleport. After the player deleted the not-island they created and trying the process again, they were successful. The output for the successful creation is literally the same in everything, except the coordinates.

OmerBenGera commented 2 months ago

Ok, here's the result:

[17:29:22 INFO]: [SuperiorSkyblock2] GridManagerImpl::createIslandInternalAsync {Player} {0} {0} {} {true} {WINDSWEPT_HILLS} {oneblock}
[17:29:22 INFO]: [SuperiorSkyblock2] DefaultIslandCreationAlgorithm::createIsland {Player} {oneblock} {islands, -6000, 110, 7500}
[17:29:22 INFO]: [SuperiorSkyblock2] DefaultIslandCreationAlgorithm::createIsland Next Island Position {Location{world=CraftWorld{name=islands},x=-6750.0,y=110.0,z=7500.0,pitch=0.0,yaw=0.0}}
[17:29:23 INFO]: [SuperiorSkyblock2] GridManagerImpl::createIslandInternalAsync Creation Callback {Successfully created island}
[17:29:23 INFO]: [SuperiorSkyblock2] GridManagerImpl::createIslandInternalOnSuccessCallback Creation Callback {Registering new island}
[17:29:23 INFO]: [SuperiorSkyblock2] GridManagerImpl::null Creation Callback {Teleporting player}

The player tried creating the OneBlock island, all that output is what the console got, and the player wasn't teleported and couldn't teleport. After the player deleted the not-island they created and trying the process again, they were successful. The output for the successful creation is literally the same in everything, except the coordinates.

wait, is this the output for a successful or failed one? From what I can see, this is a successful creation. I need one that failed

EditChris commented 2 months ago

wait, is this the output for a successful or failed one? From what I can see, this is a successful creation. I need one that failed

It's from a failed one. The outputs for a successful and a failed creation are the same in everything except the coordinates because those change with each creation.

OmerBenGera commented 2 months ago

wait, is this the output for a successful or failed one? From what I can see, this is a successful creation. I need one that failed

It's from a failed one. The outputs for a successful and a failed creation are the same in everything except the coordinates because those change with each creation.

Hmm interesting... I published a new update, hopefully we will get more information that will help with solving the issue Do the same - /is admin debug as before and report back.

OmerBenGera commented 1 month ago

Any news regarding this?