FastAsyncWorldEdit

FastAsyncWorldEdit

245k Downloads

java.lang.IllegalStateException: SENDING_CHUNKS stored lock does not equal lock attempted to be unlocked?!

Closed this issue ยท 3 comments

commented

Server Implementation

Paper

Server Version

1.21.4

Describe the bug

The error occurs when using /p clear and sometimes ensures that the clear is not successfully completed. the error itself in the console only occurs if you do it correctly

To Reproduce

  1. Make a clean Server with the Latest Paper, Plotsquared and FAWE
  2. Generate a Default Plotworld
  3. claim yourself like 15 plots and merge them all
  4. after you merged them use /p clear on one of the plots
  5. if everything was made right the error should come in the console

Expected behaviour

No errors

Screenshots / Videos

No response

Error log (if applicable)

https://gist.github.com/lmMaxxx/b03345c337398b356b405431a9e3dc5a

Plot Debugpaste

https://athion.net/ISPaster/paste/view/aeaf560ebc0e4ebca0bf996139be3226

PlotSquared Version

plotsquared-bukkit-7.5.2-Premium

Checklist

Anything else?

No response

commented

I fixed it by changing the condition as follows:

// Original:
if (lock.writeWaiting || lock.lock.getReadLockCount() > 1 || lock.lock.isWriteLocked()) {

// Fixed:
if (lock.writeWaiting || lock.lock.getReadLockCount() == 1 || lock.lock.isWriteLocked()) {

In:
java/com/fastasyncworldedit/bukkit/adapter/NMSAdapter.java:184

commented

I fixed it by changing the condition as follows:

// Original:
if (lock.writeWaiting || lock.lock.getReadLockCount() > 1 || lock.lock.isWriteLocked()) {

// Fixed:
if (lock.writeWaiting || lock.lock.getReadLockCount() == 1 || lock.lock.isWriteLocked()) {

In:
java/com/fastasyncworldedit/bukkit/adapter/NMSAdapter.java:184

Ah yes, this code should be >= 1

commented

Fixed it in: #3199