Closed ghost closed 4 years ago
no thats no longer important, just fix these errors if you can, they all happen when around 4 player play the game continuously, (using master branch)
sometimes after the game is finished not all the item frames get cleared and whenn they play in that game it doesn't go well, like sometimes you just lose before the game ends and sometimes you put the right pattern to win but it counts it as a loss.
here are all the errors i got:
this one was getting spammed alot:
[TicTacToe] A Game has been attempted to be constructed with an Arena which is either occupied or (more likely) its level got unloaded!
and after it showed like 5 times in the console this error came up kicking the player with 'internal server error'
ErrorException: "Invalid argument supplied for foreach()" (EXCEPTION) in "plugins/TicTacToe-masterr/src/robske_110/TTT/Game/Game" at line 160
2020-04-12 [07:08:09] [Server thread/DEBUG]: #0 plugins/TicTacToe-masterr/src/robske_110/TTT/Game/Game(160): pocketmine\utils\Utils::errorExceptionHandler(integer 2, string[39] Invalid argument supplied for foreach(), string[105] /home/minecraft/multicraft/servers/server22957/plugins/TicTacToe-masterr/src/rob, integer 160, array[1])
2020-04-12 [07:08:09] [Server thread/DEBUG]: #1 plugins/TicTacToe-masterr/src/robske_110/TTT/Game/Game(143): robske_110\TTT\Game\Game->getPlayerWithSymbol(string[1] X)
2020-04-12 [07:08:09] [Server thread/DEBUG]: #2 plugins/TicTacToe-masterr/src/robske_110/TTT/Game/Game(62): robske_110\TTT\Game\Game->checkForWin()
2020-04-12 [07:08:09] [Server thread/DEBUG]: #3 plugins/TicTacToe-masterr/src/robske_110/TTT/EventListener(30): robske_110\TTT\Game\Game->onGameMove(integer 19, object pocketmine\block\ItemFrame, object pocketmine\item\Item)
2020-04-12 [07:08:09] [Server thread/DEBUG]: #4 src/pocketmine/plugin/MethodEventExecutor(38): robske_110\TTT\EventListener->onItemFrameItemSet(object pocketmine\event\player\PlayerInteractEvent)
2020-04-12 [07:08:09] [Server thread/DEBUG]: #5 src/pocketmine/plugin/RegisteredListener(98): pocketmine\plugin\MethodEventExecutor->execute(object robske_110\TTT\EventListener, object pocketmine\event\player\PlayerInteractEvent)
2020-04-12 [07:08:09] [Server thread/DEBUG]: #6 src/pocketmine/event/Event(95): pocketmine\plugin\RegisteredListener->callEvent(object pocketmine\event\player\PlayerInteractEvent)
2020-04-12 [07:08:09] [Server thread/DEBUG]: #7 src/pocketmine/level/Level(1919): pocketmine\event\Event->call()
2020-04-12 [07:08:09] [Server thread/DEBUG]: #8 src/pocketmine/Player(2454): pocketmine\level\Level->useItemOn(object pocketmine\math\Vector3, object pocketmine\item\Item, integer 4, object pocketmine\math\Vector3, object pocketmine\Player, boolean 1)
2020-04-12 [07:08:09] [Server thread/DEBUG]: #9 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(151): pocketmine\Player->handleInventoryTransaction(object pocketmine\network\mcpe\protocol\InventoryTransactionPacket)
2020-04-12 [07:08:09] [Server thread/DEBUG]: #10 src/pocketmine/network/mcpe/protocol/InventoryTransactionPacket(178): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleInventoryTransaction(object pocketmine\network\mcpe\protocol\InventoryTransactionPacket)
2020-04-12 [07:08:09] [Server thread/DEBUG]: #11 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(111): pocketmine\network\mcpe\protocol\InventoryTransactionPacket->handle(object pocketmine\network\mcpe\PlayerNetworkSessionAdapter)
2020-04-12 [07:08:09] [Server thread/DEBUG]: #12 src/pocketmine/network/mcpe/protocol/BatchPacket(123): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleDataPacket(object pocketmine\network\mcpe\protocol\InventoryTransactionPacket)
2020-04-12 [07:08:09] [Server thread/DEBUG]: #13 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(111): pocketmine\network\mcpe\protocol\BatchPacket->handle(object pocketmine\network\mcpe\PlayerNetworkSessionAdapter)
2020-04-12 [07:08:09] [Server thread/DEBUG]: #14 src/pocketmine/Player(3161): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleDataPacket(object pocketmine\network\mcpe\protocol\BatchPacket)
2020-04-12 [07:08:09] [Server thread/DEBUG]: #15 src/pocketmine/network/mcpe/RakLibInterface(169): pocketmine\Player->handleDataPacket(object pocketmine\network\mcpe\protocol\BatchPacket)
2020-04-12 [07:08:09] [Server thread/DEBUG]: #16 vendor/pocketmine/raklib/src/server/ServerHandler(99): pocketmine\network\mcpe\RakLibInterface->handleEncapsulated(string[20] 51.235.210.128 40514, object raklib\protocol\EncapsulatedPacket, integer 0)
2020-04-12 [07:08:09] [Server thread/DEBUG]: #17 src/pocketmine/network/mcpe/RakLibInterface(109): raklib\server\ServerHandler->handlePacket()
2020-04-12 [07:08:09] [Server thread/DEBUG]: #18 src/pocketmine/network/mcpe/RakLibInterface(99): pocketmine\network\mcpe\RakLibInterface->process()
2020-04-12 [07:08:09] [Server thread/DEBUG]: #19 vendor/pocketmine/snooze/src/SleeperHandler(123): pocketmine\network\mcpe\RakLibInterface->pocketmine\network\mcpe\{closure}()
2020-04-12 [07:08:09] [Server thread/DEBUG]: #20 vendor/pocketmine/snooze/src/SleeperHandler(85): pocketmine\snooze\SleeperHandler->processNotifications()
2020-04-12 [07:08:09] [Server thread/DEBUG]: #21 src/pocketmine/Server(2349): pocketmine\snooze\SleeperHandler->sleepUntil(double 1586664489.2162)
2020-04-12 [07:08:09] [Server thread/DEBUG]: #22 src/pocketmine/Server(2203): pocketmine\Server->tickProcessor()
2020-04-12 [07:08:09] [Server thread/DEBUG]: #23 src/pocketmine/Server(1785): pocketmine\Server->start()
2020-04-12 [07:08:09] [Server thread/DEBUG]: #24 src/pocketmine/PocketMine(268): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[47] /home/minecraft/multicraft/servers/server22957/, string[55] /home/minecraft/multicraft/servers/server22957/plugins/)
2020-04-12 [07:08:09] [Server thread/DEBUG]: #25 src/pocketmine/PocketMine(291): pocketmine\server()
2020-04-12 [07:08:09] [Server thread/DEBUG]: #26 (1): require(string[109] phar:///home/minecraft/multicraft/jar/versions/PocketMine/PocketMine1.14-1.phar/)
then after a couple of more games and more "arena is either occupied or the level is unloaded!" message this error came up crashing the loser:
12.04 07:30:48 [Server] Server thread/DEBUG #0 plugins/TicTacToe-masterr/src/robske_110/TTT/Game/Game(276): pocketmine\utils\Utils::errorExceptionHandler(integer 8, string[20] Undefined offset: -1, string[105] /plugins/TicTacToe-masterr/src/rob, integer 276, array[2])
12.04 07:30:48 [Server] Server thread/DEBUG #1 plugins/TicTacToe-masterr/src/robske_110/TTT/Game/Game(150): robske_110\TTT\Game\Game->end(integer -1)
12.04 07:30:48 [Server] Server thread/DEBUG #2 plugins/TicTacToe-masterr/src/robske_110/TTT/Game/Game(62): robske_110\TTT\Game\Game->checkForWin()
12.04 07:30:48 [Server] Server thread/DEBUG #3 plugins/TicTacToe-masterr/src/robske_110/TTT/EventListener(30): robske_110\TTT\Game\Game->onGameMove(integer 32, object pocketmine\block\ItemFrame, object pocketmine\item\Item)
12.04 07:30:48 [Server] Server thread/DEBUG #4 src/pocketmine/plugin/MethodEventExecutor(38): robske_110\TTT\EventListener->onItemFrameItemSet(object pocketmine\event\player\PlayerInteractEvent)
12.04 07:30:48 [Server] Server thread/DEBUG #5 src/pocketmine/plugin/RegisteredListener(98): pocketmine\plugin\MethodEventExecutor->execute(object robske_110\TTT\EventListener, object pocketmine\event\player\PlayerInteractEvent)
12.04 07:30:48 [Server] Server thread/DEBUG #6 src/pocketmine/event/Event(95): pocketmine\plugin\RegisteredListener->callEvent(object pocketmine\event\player\PlayerInteractEvent)
12.04 07:30:48 [Server] Server thread/DEBUG #7 src/pocketmine/level/Level(1919): pocketmine\event\Event->call()
12.04 07:30:48 [Server] Server thread/DEBUG #8 src/pocketmine/Player(2454): pocketmine\level\Level->useItemOn(object pocketmine\math\Vector3, object pocketmine\item\Item, integer 4, object pocketmine\math\Vector3, object pocketmine\Player, boolean 1)
12.04 07:30:48 [Server] Server thread/DEBUG #9 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(151): pocketmine\Player->handleInventoryTransaction(object pocketmine\network\mcpe\protocol\InventoryTransactionPacket)
12.04 07:30:48 [Server] Server thread/DEBUG #10 src/pocketmine/network/mcpe/protocol/InventoryTransactionPacket(178): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleInventoryTransaction(object pocketmine\network\mcpe\protocol\InventoryTransactionPacket)
12.04 07:30:48 [Server] Server thread/DEBUG #11 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(111): pocketmine\network\mcpe\protocol\InventoryTransactionPacket->handle(object pocketmine\network\mcpe\PlayerNetworkSessionAdapter)
12.04 07:30:48 [Server] Server thread/DEBUG #12 src/pocketmine/network/mcpe/protocol/BatchPacket(123): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleDataPacket(object pocketmine\network\mcpe\protocol\InventoryTransactionPacket)
12.04 07:30:48 [Server] Server thread/DEBUG #13 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(111): pocketmine\network\mcpe\protocol\BatchPacket->handle(object pocketmine\network\mcpe\PlayerNetworkSessionAdapter)
12.04 07:30:48 [Server] Server thread/DEBUG #14 src/pocketmine/Player(3161): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleDataPacket(object pocketmine\network\mcpe\protocol\BatchPacket)
12.04 07:30:48 [Server] Server thread/DEBUG #15 src/pocketmine/network/mcpe/RakLibInterface(169): pocketmine\Player->handleDataPacket(object pocketmine\network\mcpe\protocol\BatchPacket)
12.04 07:30:48 [Server] Server thread/DEBUG #16 vendor/pocketmine/raklib/src/server/ServerHandler(99): pocketmine\network\mcpe\RakLibInterface->handleEncapsulated(string[19] 188.70.50.169 20800, object raklib\protocol\EncapsulatedPacket, integer 0)
12.04 07:30:48 [Server] Server thread/DEBUG #17 src/pocketmine/network/mcpe/RakLibInterface(109): raklib\server\ServerHandler->handlePacket()
12.04 07:30:48 [Server] Server thread/DEBUG #18 src/pocketmine/network/mcpe/RakLibInterface(99): pocketmine\network\mcpe\RakLibInterface->process()
12.04 07:30:48 [Server] Server thread/DEBUG #19 vendor/pocketmine/snooze/src/SleeperHandler(123): pocketmine\network\mcpe\RakLibInterface->pocketmine\network\mcpe\{closure}()
12.04 07:30:48 [Server] Server thread/DEBUG #20 vendor/pocketmine/snooze/src/SleeperHandler(85): pocketmine\snooze\SleeperHandler->processNotifications()
12.04 07:30:48 [Server] Server thread/DEBUG #21 src/pocketmine/Server(2349): pocketmine\snooze\SleeperHandler->sleepUntil(double 1586665848.958)
12.04 07:30:48 [Server] Server thread/DEBUG #22 src/pocketmine/Server(2203): pocketmine\Server->tickProcessor()
12.04 07:30:48 [Server] Server thread/DEBUG #23 src/pocketmine/Server(1785): pocketmine\Server->start()
12.04 07:30:48 [Server] Server thread/DEBUG #24 src/pocketmine/PocketMine(268): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[47] /, string[55] /plugins/)
12.04 07:30:48 [Server] Server thread/DEBUG #25 src/pocketmine/PocketMine(291): pocketmine\server()
12.04 07:30:48 [Server] Server thread/DEBUG #26 (1): require(string[109] phar:///jar/versions/PocketMine/PocketMine1.14-1.phar/)
all those errors started when the plugin didn't clear all the item frame items, so maybe start with that?
if you don't feel like fixing please say so, just don't leave me on hold
Unfortunately I couldn't yet find the root cause for these issues, but I made some improvements in logging and checking in the dev branch, if you could try to use that version (poggit build a phar here: https://poggit.pmmp.io/r/82184/TicTacToe_dev-14.phar ). Item frames should only be cleared on game start anyways, and that should really be working reliably.
well, maybe. I am no longer really active in the PM community. However I might have some free time and could quickly implement something, what would be a small thing that's important? #14 maybe?