Cannot invoke "com.sk89q.worldedit.extent.clipboard.Clipboard.getOrigin()" because "clipboard" is null
Fabrimat opened this issue ยท 3 comments
Server Implementation
Paper
Server Version
1.21
Describe the bug
Probably releated to #2851.
Assuming that I have a folder of schematics called "bushes" created on 1.20.1.
This is an example schematic: 1.zip
Using the command /schem loadall bushes
and //paste
will generate this error in console:
An unexpected error while handling a FastAsyncWorldEdit command
java.lang.NullPointerException: Cannot invoke "com.sk89q.worldedit.extent.clipboard.Clipboard.getOrigin()" because "clipboard" is null
at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar/com.sk89q.worldedit.command.ClipboardCommands.place(ClipboardCommands.java:463) ~[FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar:?]
at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar/com.sk89q.worldedit.command.ClipboardCommands.paste(ClipboardCommands.java:536) ~[FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar:?]
at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar/com.sk89q.worldedit.command.ClipboardCommandsRegistration.cmd$_paste(ClipboardCommandsRegistration.java:352) ~[FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar:?]
at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar/org.enginehub.piston.CommandManager.execute(CommandManager.java:157) ~[FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar:?]
at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar/com.sk89q.worldedit.extension.platform.PlatformCommandManager.lambda$handleCommandOnCurrentThread$16(PlatformCommandManager.java:712) ~[FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar:?]
at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar/com.sk89q.worldedit.extension.platform.PlatformCommandManager.handleCommandTask(PlatformCommandManager.java:733) ~[FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar:?]
at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar/com.sk89q.worldedit.extension.platform.PlatformCommandManager.handleCommandOnCurrentThread(PlatformCommandManager.java:714) ~[FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar:?]
at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar/com.sk89q.worldedit.extension.platform.PlatformCommandManager.lambda$handleCommand$14(PlatformCommandManager.java:685) ~[FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar:?]
at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar/com.sk89q.worldedit.extension.platform.AbstractPlayerActor.lambda$runAction$1(AbstractPlayerActor.java:672) ~[FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar:?]
at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar/com.fastasyncworldedit.core.util.task.AsyncNotifyKeyedQueue.lambda$run$0(AsyncNotifyKeyedQueue.java:48) ~[FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar:?]
at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar/com.fastasyncworldedit.core.util.task.AsyncNotifyKeyedQueue.lambda$call$1(AsyncNotifyKeyedQueue.java:58) ~[FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar:?]
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[?:?]
at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar/com.fastasyncworldedit.core.util.task.KeyQueuedExecutorService$KeyRunner.lambda$run$0(KeyQueuedExecutorService.java:150) ~[FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar:?]
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1423) ~[?:?]
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387) ~[?:?]
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312) ~[?:?]
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843) ~[?:?]
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808) ~[?:?]
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188) ~[?:?]
When I use the command //replace 2 #fullcopy[bushes][true][true]
I will get the following error in chat:
(FAWE) Invalid value for <to> (Cannot invoke "com.sk89q.worldedit.extent.clipboard.Clipboard.getRegion()" because "c" is null), acceptable values are any pattern
and this in console:
[15:12:18 WARN]: java.lang.NullPointerException: Cannot invoke "com.sk89q.worldedit.extent.clipboard.io.ClipboardFormat.getReader(java.io.InputStream)" because "this.format" is null
[15:12:18 WARN]: at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar//com.fastasyncworldedit.core.extent.clipboard.LazyClipboardHolder.getClipboard(LazyClipboardHolder.java:40)
[15:12:18 WARN]: at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar//com.sk89q.worldedit.session.ClipboardHolder.getClipboards(ClipboardHolder.java:78)
[15:12:18 WARN]: at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar//com.fastasyncworldedit.core.function.pattern.RandomFullClipboardPattern.lambda$new$0(RandomFullClipboardPattern.java:43)
[15:12:18 WARN]: at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:273)
[15:12:18 WARN]: at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1708)
[15:12:18 WARN]: at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
[15:12:18 WARN]: at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
[15:12:18 WARN]: at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
[15:12:18 WARN]: at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
[15:12:18 WARN]: at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
[15:12:18 WARN]: at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
[15:12:18 WARN]: at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar//com.fastasyncworldedit.core.function.pattern.RandomFullClipboardPattern.<init>(RandomFullClipboardPattern.java:46)
[15:12:18 WARN]: at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar//com.fastasyncworldedit.core.extension.factory.parser.pattern.RandomFullClipboardPatternParser.parseFromInput(RandomFullClipboardPatternParser.java:96)
[15:12:18 WARN]: at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar//com.fastasyncworldedit.core.extension.factory.parser.pattern.RandomFullClipboardPatternParser.parseFromInput(RandomFullClipboardPatternParser.java:25)
[15:12:18 WARN]: at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar//com.fastasyncworldedit.core.extension.factory.parser.RichParser.parseFromInput(RichParser.java:114)
[15:12:18 WARN]: at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar//com.sk89q.worldedit.internal.registry.AbstractFactory.parseFromParsers(AbstractFactory.java:167)
[15:12:18 WARN]: at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar//com.sk89q.worldedit.internal.registry.AbstractFactory.parseWithoutRich(AbstractFactory.java:196)
[15:12:18 WARN]: at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar//com.fastasyncworldedit.core.extension.factory.parser.pattern.RichPatternParser.parseFromInput(RichPatternParser.java:146)
[15:12:18 WARN]: at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar//com.fastasyncworldedit.core.extension.factory.parser.pattern.RichPatternParser.parseFromInput(RichPatternParser.java:33)
[15:12:18 WARN]: at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar//com.sk89q.worldedit.internal.registry.AbstractFactory.parseFromInput(AbstractFactory.java:113)
[15:12:18 WARN]: at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar//com.sk89q.worldedit.extension.factory.PatternFactory.parseFromInput(PatternFactory.java:139)
[15:12:18 WARN]: at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar//com.sk89q.worldedit.extension.factory.PatternFactory.parseFromInput(PatternFactory.java:80)
[15:12:18 WARN]: at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar//com.sk89q.worldedit.command.argument.FactoryConverter.convert(FactoryConverter.java:151)
[15:12:18 WARN]: at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar//org.enginehub.piston.impl.CommandParser.conversionFailedException(CommandParser.java:190)
[15:12:18 WARN]: at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar//org.enginehub.piston.impl.CommandParser.parseRegularArgument(CommandParser.java:433)
[15:12:18 WARN]: at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar//org.enginehub.piston.impl.CommandParser.parse(CommandParser.java:342)
[15:12:18 WARN]: at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar//org.enginehub.piston.impl.CommandManagerImpl.parse(CommandManagerImpl.java:240)
[15:12:18 WARN]: at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar//org.enginehub.piston.CommandManager.execute(CommandManager.java:154)
[15:12:18 WARN]: at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar//com.sk89q.worldedit.extension.platform.PlatformCommandManager.lambda$handleCommandOnCurrentThread$16(PlatformCommandManager.java:712)
[15:12:18 WARN]: at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar//com.sk89q.worldedit.extension.platform.PlatformCommandManager.handleCommandTask(PlatformCommandManager.java:733)
[15:12:18 WARN]: at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar//com.sk89q.worldedit.extension.platform.PlatformCommandManager.handleCommandOnCurrentThread(PlatformCommandManager.java:714)
[15:12:18 WARN]: at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar//com.sk89q.worldedit.extension.platform.PlatformCommandManager.lambda$handleCommand$14(PlatformCommandManager.java:685)
[15:12:18 WARN]: at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar//com.sk89q.worldedit.extension.platform.AbstractPlayerActor.lambda$runAction$1(AbstractPlayerActor.java:672)
[15:12:18 WARN]: at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar//com.fastasyncworldedit.core.util.task.AsyncNotifyKeyedQueue.lambda$run$0(AsyncNotifyKeyedQueue.java:48)
[15:12:18 WARN]: at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar//com.fastasyncworldedit.core.util.task.AsyncNotifyKeyedQueue.lambda$call$1(AsyncNotifyKeyedQueue.java:58)
[15:12:18 WARN]: at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
[15:12:18 WARN]: at FastAsyncWorldEdit-Bukkit-2.12.1-SNAPSHOT-952.jar//com.fastasyncworldedit.core.util.task.KeyQueuedExecutorService$KeyRunner.lambda$run$0(KeyQueuedExecutorService.java:150)
[15:12:18 WARN]: at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1423)
[15:12:18 WARN]: at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
[15:12:18 WARN]: at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
[15:12:18 WARN]: at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
[15:12:18 WARN]: at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
[15:12:18 WARN]: at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)
To Reproduce
- Make a schematic on 1.20.1
- Move it to a 1.21 server
- Paste it
Expected behaviour
The schematic should be pasted as usual
Screenshots / Videos
No response
Error log (if applicable)
No response
Fawe Debugpaste
https://athion.net/ISPaster/paste/view/7002cc8a2c544386ba83b6daa834b853
Fawe Version
2.12.1-SNAPSHOT-952;d959778
Checklist
- I have included a Fawe debugpaste.
- I am using the newest build from https://ci.athion.net/job/FastAsyncWorldEdit/ and the issue still persists.
Anything else?
No response
The example schematic is a Sponge version 2 schematic, so must have been written on quite an old FAWE version... but it specifies version 1, so I do not think it was written by WE or FAWE...
We're not going to even attempt to support guessing the schematic version when the given version tag is wrong
It was made on FAWE, not sure about the version but it was not more than one year old
Yeah when I set the schematic version to 2
it's working fine. I'm also pretty sure FAWE has written its version and other stuff to schematics for a while now, so I do not think there's an actual FAWE issue here at all - the schematic (and presumably other schematics) are technically incorrect, and supporting schematics with an incorrectly defined version is just not worth it