pmmp / PocketMine-MP

A server software for Minecraft: Bedrock Edition in PHP
https://pmmp.io
GNU Lesser General Public License v3.0
3.28k stars 1.55k forks source link

Server crashed #5779

Closed ahnsunggwan45 closed 1 year ago

ahnsunggwan45 commented 1 year ago

PocketMine-MP Crash Dump Tue May 30 16:37:44 KST 2023

PocketMine-MP version: 4.21.0 [Protocol 582] Git commit: ef40934d24748025d15d9b86acc28fbb82d6de6a PHP version: 8.2.4 OS: Linux, linux

Error: Array to string conversion File: pmsrc/vendor/netresearch/jsonmapper/src/JsonMapper Line: 255 Type: ErrorException Backtrace:

0 (): pocketmine\errorhandler\ErrorToExceptionHandler::handle(int 2, string[26] Array to string conversion, string[90] phar:///home/skhidc/hf/PocketMine-MP.phar/vendor/netresearch/jsonmapper/src/Json, int 255)

1 pmsrc/vendor/netresearch/jsonmapper/src/JsonMapper(255): settype(array[96], string[6] string)

2 pmsrc/src/network/mcpe/handler/LoginPacketHandler(187): JsonMapper->map(array[42], object pocketmine\network\mcpe\protocol\types\login\ClientData#1372570)

3 pmsrc/src/network/mcpe/handler/LoginPacketHandler(71): pocketmine\network\mcpe\handler\LoginPacketHandler->parseClientData(string[93323] eyJ4NXUiOiJNSFl3RUFZSEtvWkl6ajBDQVFZRks0RUVBQ0lEWWdBRXIrRlwvY2s1anZRT3FYY1pTdlR1)

4 pmsrc/vendor/pocketmine/bedrock-protocol/src/LoginPacket(105): pocketmine\network\mcpe\handler\LoginPacketHandler->handleLogin(object pocketmine\network\mcpe\protocol\LoginPacket#1114553)

5 pmsrc/src/network/mcpe/NetworkSession(433): pocketmine\network\mcpe\protocol\LoginPacket->handle(object pocketmine\network\mcpe\handler\LoginPacketHandler#436614)

6 pmsrc/src/network/mcpe/NetworkSession(377): pocketmine\network\mcpe\NetworkSession->handleDataPacket(object pocketmine\network\mcpe\protocol\LoginPacket#1114553, string[95896] ....F.......{"chain":["eyJ4NXUiOiJNSFl3RUFZSEtvWkl6ajBDQVFZRks0RUVBQ0lEWWdBRXIrR)

7 pmsrc/src/network/mcpe/raklib/RakLibInterface(198): pocketmine\network\mcpe\NetworkSession->handleEncoded(string[11891] .}.r..........z...Er..M.H..H....&&*x...H..$^:...e..'..:.....R"R%.t......X@"/;.^{)

8 pmsrc/vendor/pocketmine/raklib-ipc/src/RakLibToUserThreadMessageReceiver(42): pocketmine\network\mcpe\raklib\RakLibInterface->onPacketReceive(int 1030, string[11892] ..}.r..........z...Er..M.H..H....&&*x...H..$^:...e..'..:.....R"R%.t......X@"/;.^)

9 pmsrc/src/network/mcpe/raklib/RakLibInterface(122): raklib\server\ipc\RakLibToUserThreadMessageReceiver->handle(object pocketmine\network\mcpe\raklib\RakLibInterface#78502)

10 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(123): pocketmine\network\mcpe\raklib\RakLibInterface->pocketmine\network\mcpe\raklib{closure}()

11 pmsrc/src/TimeTrackingSleeperHandler(58): pocketmine\snooze\SleeperHandler->processNotifications()

12 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(82): pocketmine\TimeTrackingSleeperHandler->processNotifications()

13 pmsrc/src/Server(1688): pocketmine\snooze\SleeperHandler->sleepUntil(float 1685432264.9216)

14 pmsrc/src/Server(1068): pocketmine\Server->tickProcessor()

15 pmsrc/src/PocketMine(336): pocketmine\Server->__construct(object BaseClassLoader#2, object pocketmine\utils\MainLogger#5, string[16] /home/skhidc/hf/, string[24] /home/skhidc/hf/plugins/)

16 pmsrc/src/PocketMine(359): pocketmine\server()

17 pmsrc(11): require(string[60] phar:///home/skhidc/hf/PocketMine-MP.phar/src/PocketMine.php)

Code: [246] && !(is_array($jvalue) && $this->hasVariadicArrayType($accessor)) [247] ) { [248] if ($type === 'string' && is_object($jvalue)) { [249] throw new JsonMapper_Exception( [250] 'JSON property "' . $key . '" in class "' [251] . $strClassName . '" is an object and' [252] . ' cannot be converted to a string' [253] ); [254] } [255] settype($jvalue, $type); [256] $this->setProperty($object, $accessor, $jvalue); [257] continue; [258] } [259] [260] //FIXME: check if type exists, give detailed error message if not [261] if ($type === '') { [262] throw new JsonMapper_Exception( [263] 'Empty type at property "' [264] . $strClassName . '::$' . $key . '"' [265] );

dktapps commented 1 year ago

Fixed by 76749cbaa742151cca838156f50baca5e2eb55c3.