FastAsyncWorldEdit

FastAsyncWorldEdit

152k Downloads

NullPointerException: Cannot invoke "java.nio.MappedByteBuffer.getChar(int)" because "this.byteBuffer" is null

Elb1to opened this issue ยท 2 comments

commented

Server Implementation

Paper

Server Version

1.21.1

Describe the bug

I have an arena reset system that basically copies the arena to a clipboard and then uses that clipboard to reset the arena after a game is ended.

This results in the arena not being reset (because the clipboard isn't pasted).

This started happening after I added some new arenas that were considerably bigger than other arenas I already had.

To Reproduce

  1. Players go in a match
  2. Players finish the match
  3. The arena state is set to unplayable
  4. The plugin then runs the task to reset the arena
  5. The arena is restored using it's Clipboard
  6. The arena is now playable again

Expected behaviour

What is expected to happen is that the arena should be properly reset after a Game/Match ends, the arena restoration is done using it's Clipboard (which is made on server startup). Each arena has it's own Clipboard.

Screenshots / Videos

No response

Error log (if applicable)

https://gist.github.com/Elb1to/95f26257d3e2eb2287056ce808153350

Fawe Debugpaste

https://athion.net/ISPaster/paste/view/592094506bbe43b9a0110ee7d7722fdd

Fawe Version

FastAsyncWorldEdit version 2.12.1-SNAPSHOT-965;e3fc35c

Checklist

Anything else?

No response

commented

That generally sounds like you doing something wrong, e.g. closing the Clipboard and using it again after.
You should at least provide your code - but this is not really the right place for support for that.

commented

You're correct about me using closing the Clipboard (I don't close it manually, but since I execute EditSessions and Clipboard operations inside try-catch it does indeed close the Clipboard automatically I assume).