Tonnanto / BasicQuests

A plugin for Spigot servers that implements randomly generated basic quests with rewards for players.
GNU General Public License v3.0
11 stars 4 forks source link

[0.3] Server thread freezes while waiting for chunk structure #5

Closed noiverre closed 1 year ago

noiverre commented 2 years ago

How to reproduce:

  1. Update to 0.3 from 0.2.1
  2. Get structure related quests

Log: https://paste.gg/p/anonymous/a1c64ecd63b8466cb07f722b4a7ead9c

Tonnanto commented 2 years ago

Thanks a lot for your report noiverre. Unfortunately I was not able to reproduce the issue :/ I used Paper 1.19 #61 and upgraded from BQ 0.2.1 to 0.3. Find structure quests worked on both versions without problems.

Some information that might help figuring this out:

Tonnanto commented 2 years ago

Found this in the documentation:

Finding unexplored structures can, and will, block if the world is looking in chunks that gave not generated yet. This can lead to the world temporarily freezing while locating an unexplored structure.

I might need to reduce the searching radius or add some kind of timeout. But first I will need to be able to reproduce the issue :)

Tonnanto commented 2 years ago

By the way: If this bug makes the game unplayable, you can temporarily disable find structure quests by commenting out the FIND_STRUCTURE section (3 lines) in the quest_generation/quest_types.yml file. That way you don't have to go back to v0.2.1 :) All active FindStructure Quests need to be reset with the /resetquests, /skipquest or /completequest command afterwards. Then all find structure quests will be gone.

noiverre commented 2 years ago

Thanks a lot for your report noiverre. Unfortunately I was not able to reproduce the issue :/ I used Paper 1.19 #61 and upgraded from BQ 0.2.1 to 0.3. Find structure quests worked on both versions without problems.

Some information that might help figuring this out:

  • How many players were online during the time?
  • What other plugins do you have installed?
  • What version was your world generated on?

It was 4 players, the other plugin that involves world and chunks are Worldguard, FAWE, Multiverse, BetterStructures, Infinite Parkour

The world was generated in 1.18.2 Paper server and upgraded to 1.19.0

Tonnanto commented 2 years ago

I was able to reproduce your issue after adding all the plugins you mentioned :) I greatly reduced the radius in which BasicQuests searches for nearby structures for find structure quests. This did indeed remove the issue on my setup. It should really improve performance without impacting the detection of found structures. Please let me know if v0.3.1 of BasicQuests fixes this issue on your server!

Tonnanto commented 1 year ago

This issue seems to not have appeared since version 0.3.1. I am going to close the issue as it seems to be fixed. Feel free to reopen it if it appears again :)