Laarryy / AdvancedEnchantments

Better Enchantments & Curses
MIT License
4 stars 7 forks source link

Plugin GUI's sometimes do not open #21

Closed NightFuryStrike closed 4 years ago

NightFuryStrike commented 4 years ago

Plugin version: '4.18.24 (Latest Jenkins Build, would put build # but your Jenkins page is giving me Error 522)' Server type: 'Paper Build #225' Server version: '1.14.4'

Describe the bug Sometimes, when opening a custom GUI from any plugin, there is a 25% chance that the GUI will not open. This isn't that big of an issue, but it can get annoying when you go through multiple layers deep into a GUI and it doesn't open (which causes loss of progress in whatever I was doing in it)

Expected behavior All plugin GUIs should open consistently.

To Reproduce

  1. Install the plugin (with ProtocolLib, I did not test without ProtocolLib)
  2. Install any plugin that opens a custom GUI
  3. Start server and attempt to open the GUI multiple times
  4. Observe the GUI sometimes not opening

Plugins I attached a video below, I run /pl in the video to show all plugins, and later on a test server with minimal plugins.

Screenshots/Video https://1drv.ms/v/s!AknzfCjeCluIoe1gPOdtqxTRYNoL1Q?e=Ay2ZQg

Additional context No errors in console with debugging enabled.

egg82 commented 4 years ago

Welp, that's not good. (Jenkins coming back soon, sorry about that)

I believe it's still somehow an issue with the OPEN_WINDOW packet in PLib, which has been driving me up the wall. This was the same packet tied to #19 as well. Apparently making it sync didn't actually solve the problem, it just buried it.

Since I don't modify the packet in any way (just read, and only on the MONITOR priority) it seems a very strange bug. I have to wonder if I'm somehow preventing the packet from being queued in netty or similar, and it goes out-of-order.

NightFuryStrike commented 4 years ago

Ah, that does sound very strange indeed. Thankfully regular players don't notice this issue much (on my server at least) unlike #19), so no rush on fixing it if it's giving you a lot of trouble!

I've noticed that some plugins that use custom GUIs appear to be immune to this issue, such as Shopkeepers, Buycraft, SuperTrailsPro, DeathChestPro, etc. The two plugins I've mainly noticed it happen with are CMI and Boss.