Exceptions loading some .schematic files in 1.15.2
lixfel opened this issue ยท 4 comments
Versions
WorldEdit version: 7.1.0;8e55131 (Current bukkit.org version)
Platform version: Spigot 1.15.2
Tested in a clean environment with no other plugins.
Describe the bug
Some .schematic files (that load on a 1.12.2 server without issues) can't be loaded in 1.15.2.
This was observed with different schematics but does only affect some schematics.
To Reproduce
Try to load an affected schematic. I've attached two schematic files with relative similar content below. The schematic "works" works, the schematic "doesnt_work" is affected.
Expected behavior
The schematic should load.
Additional context
[10:13:30] [Server thread/INFO]: Lixfel issued server command: /schematic load doesnt_work
[10:13:30] [WorldEdit Task Executor - 0/ERROR]: Uncaught exception occurred in task: Loading schematic doesnt_work
java.lang.ArrayIndexOutOfBoundsException: 4098
at com.sk89q.worldedit.extent.clipboard.io.MCEditSchematicReader.read(MCEditSchematicReader.java:197) ~[?:?]
at com.sk89q.worldedit.command.SchematicCommands$SchematicLoadTask.call(SchematicCommands.java:303) ~[?:?]
at com.sk89q.worldedit.command.SchematicCommands$SchematicLoadTask.call(SchematicCommands.java:285) ~[?:?]
at com.sk89q.worldedit.command.util.AsyncCommandBuilder.runTask(AsyncCommandBuilder.java:139) ~[?:?]
at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:111) [spigot-1.15.2.jar:git-Spigot-6de3d4b-796eb15]
at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:58) [spigot-1.15.2.jar:git-Spigot-6de3d4b-796eb15]
at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:75) [spigot-1.15.2.jar:git-Spigot-6de3d4b-796eb15]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_211]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_211]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_211]
[10:13:46] [Server thread/INFO]: Lixfel issued server command: /schematic load works
The error is correct actually. Not sure where you got that schematic but the broken one has the wrong coords on TEs. It also has a "Platform: bukkit" tag which isn't something that WorldEdit writes.
Don't know that there's anything to fix here. At best we can just print a nicer message like "your schematic is broken", but arguably the stacktrace is actually more useful to find out what exactly is wrong.
The schematic (like multiple others) was created on our network with FAWE (worldedit sadly doesn't work nice with redstone mechanics due to block updates). Does the FAWE implementation of the MCEDIT schematic format differ from the WorldEdit implementation? If only the position of the tile entities is wrong I might be able to fix it locally on my own.
not our plugin, not our problem. no clue what (other) things they break in the format.
@wizjany Turns out there is a lot that FAWE broke in the format. I'm working on it now.