![WorldEditCUI](https://media.forgecdn.net/avatars/thumbnails/75/514/256/256/636166153154339907.png)
Changing from //sel fuzzy to //sel cuboid freezes client
jonthesquirrel opened this issue ยท 5 comments
Using FastAsyncWorldEdit on the server, when I switch to //sel fuzzy it doesn't render anything in WorldeditCUI but it doesn't cause problems. However when I switch back to //sel cuboid the client freezes.
I've never heard of sel fuzzy. Bear in mind that if new features are added to WorldEdit then either someone has to PR the changes (like TomyLobo did with convex poly) or actually tell me about the new feature so I can add support for it.
That said, it shouldn't be possible for the server to send anything which freezes the client so that's definitely a bug. I'll look into it. I assume that the appropriate steps to replicate this are to just type //sel fuzzy
followed by //sel cuboid
since you didn't state anything else?
Here's references to fuzzy. It selects all connected blocks.
FastAsyncWorldEdit does add features like fuzzy on top of normal WorldEdit.
Yeah, just type //sel fuzzy followed by //sel cuboid to replicate it. I'm running Spigot, with FastAsyncWorldEdit installed instead of WorldEdit.
Oh it's an unofficial WorldEdit fork, explains why I couldn't find it.
So having tested with the fork version I see why it's crashing and it's caused by a bug with the unofficial fork, though I can at least stop it crashing the game. What's happening is this:
When you switch back to cuboid
mode after being in the fuzzy mode, the unofficial fork is sending these packets:
s|cuboid
p|0|2147483647|2147483647|2147483647|2147483647
p|1|-2147483648|-2147483648|-2147483648|2147483647
This is basically a region spanning Integer.MIN_VALUE
to Integer.MAX_VALUE
on all axes. WECUI crashes (actually doesn't crash, it's just gonna run for ages, by which time you'll time out of the game or your PC will run out of memory) trying to populate a the grid for that region. It's actually the Y axis which is the problem. WECUI is already smart enough to only draw lines in the X/Z plane for about 256 blocks away in each direction, which limits the complexity. It doesn't limit in the Y direction because normally you can't select outside the world bounds, but of course this is a selection which is 4.2 billion blocks high, and there's no limit on that axis so it's locking up.
I can fix this or at least mitigate the crash in WECUI, but the maintainer of the forked version needs to fix this on his end for the issue to go away entirely. It's worrying because I wonder what would happen without WECUI if you were to //sel cuboid
after using fuzzy mode and then issue a command. Would the command try to run on a selection which is effectively the entire map and thus crash the server instead?
This fix will be in the next point release, which is ready pending approval of #16