jasonw4331 / MyPlot

Plot and protection plugin for PocketMine-MP
https://discord.gg/Qqcpp9Q
MIT License
102 stars 89 forks source link

Merge Bug #477

Open Jerbyyy0 opened 2 years ago

Jerbyyy0 commented 2 years ago

Issue description

I have claimed 4 plots for myself. Then I germerged one together. And then I tried to merge the other plots. Then I got kicked and the server crashed.

OS and versions

Other Plugins

MultiWorld v1.7.0, MyPlot v2.1.2

Error

[19:52:49.881] [Server thread/CRITICAL]: Exception: "Plot arguments cannot be the same plot or already be merged" (EXCEPTION) in "plugins/MyPlot.phar/src/MyPlot/task/RoadFillTask" at line 35
--- Stack trace ---
  #0 plugins/MyPlot.phar/src/MyPlot/MyPlot(560): MyPlot\task\RoadFillTask->__construct(object MyPlot\MyPlot#25901, object MyPlot\Plot#143888, object MyPlot\Plot#160964, false, int -1, int 256)
  #1 plugins/MyPlot.phar/src/MyPlot/subcommand/MergeSubCommand(99): MyPlot\MyPlot->mergePlots(object MyPlot\Plot#143888, int 3, int 256)
  #2 plugins/MyPlot.phar/src/MyPlot/Commands(197): MyPlot\subcommand\MergeSubCommand->execute(object pocketmine\player\Player#30190, array[1])
  #3 pmsrc/src/command/SimpleCommandMap(205): MyPlot\Commands->execute(object pocketmine\player\Player#30190, string[1] p, array[1])
  #4 pmsrc/src/Server(1446): pocketmine\command\SimpleCommandMap->dispatch(object pocketmine\player\Player#30190, string[15] p merge confirm)
  #5 pmsrc/src/player/Player(1410): pocketmine\Server->dispatchCommand(object pocketmine\player\Player#30190, string[15] p merge confirm)
  #6 pmsrc/src/network/mcpe/handler/InGamePacketHandler(747): pocketmine\player\Player->chat(string[16] /p merge confirm)
  #7 pmsrc/vendor/pocketmine/bedrock-protocol/src/CommandRequestPacket(51): pocketmine\network\mcpe\handler\InGamePacketHandler->handleCommandRequest(object pocketmine\network\mcpe\protocol\CommandRequestPacket#160953)
  #8 pmsrc/src/network/mcpe/NetworkSession(388): pocketmine\network\mcpe\protocol\CommandRequestPacket->handle(object pocketmine\network\mcpe\handler\InGamePacketHandler#98540)
  #9 pmsrc/src/network/mcpe/NetworkSession(351): pocketmine\network\mcpe\NetworkSession->handleDataPacket(object pocketmine\network\mcpe\protocol\CommandRequestPacket#160953, string[37] M./p merge confirm..Jn.....l.o...F...)
  #10 pmsrc/src/network/mcpe/raklib/RakLibInterface(182): pocketmine\network\mcpe\NetworkSession->handleEncoded(string[79] S.../P.M-JOUH..K.,.e....R.x.....]O;..10.O`.Y"..`..8i.C.G.[.j...d....8.#..&..h..)
  #11 pmsrc/vendor/pocketmine/raklib-ipc/src/RakLibToUserThreadMessageReceiver(42): pocketmine\network\mcpe\raklib\RakLibInterface->onPacketReceive(int 0, string[88] .4.x..]....@MQ. .......l..`It..5O~....cR..S..N.J...b.......p...jR]....&.`k.Zy...)
  #12 pmsrc/src/network/mcpe/raklib/RakLibInterface(112): raklib\server\ipc\RakLibToUserThreadMessageReceiver->handle(object pocketmine\network\mcpe\raklib\RakLibInterface#28586)
  #13 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(123): pocketmine\network\mcpe\raklib\RakLibInterface->pocketmine\network\mcpe\raklib\{closure}()
  #14 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(82): pocketmine\snooze\SleeperHandler->processNotifications()
  #15 pmsrc/src/Server(1698): pocketmine\snooze\SleeperHandler->sleepUntil(float 1654199569.9234)
  #16 pmsrc/src/Server(1063): pocketmine\Server->tickProcessor()
  #17 pmsrc/src/PocketMine(304): pocketmine\Server->__construct(object BaseClassLoader#3, object pocketmine\utils\MainLogger#2, string[10] /home/cb1/, string[18] /home/cb1/plugins/)
  #18 pmsrc/src/PocketMine(327): pocketmine\server()
  #19 pmsrc(11): require(string[54] phar:///home/cb1/PocketMine-MP.phar/src/PocketMine.php)
--- End of exception information ---
[19:52:49.881] [Server thread/EMERGENCY]: An unrecoverable error has occurred and the server has crashed. Creating a crash dump
[19:52:49.884] [Server thread/EMERGENCY]: Please upload the "/home/cb1/crashdumps/Thu_Jun_2-19.52.49-UTC_2022.log" file to the Crash Archive and submit the link to the Bug Reporting page. Give as much info as you can.
[19:52:50.094] [Server thread/EMERGENCY]: The crash dump has been automatically submitted to the Crash Archive. You can view it on https://crash.pmmp.io/view/6916113 or use the ID #6916113.
[19:52:50.094] [Server thread/EMERGENCY]: Forcing server shutdown
Jerbyyy0 commented 2 years ago

I now know how this happens. For example, I have plot a, plot b and plot c. I stand on plot a and merge it with plot b. In the time where the road is filled with plot a and plot b I try to merge plot a (on which I still stand) with plot c and then the server crashes and the error comes.