BlockHorizons / InvSee

A PocketMine-MP plugin that lets you view and modify offline and online players' inventories in real-time!
https://poggit.pmmp.io/p/InvSee
Apache License 2.0
30 stars 14 forks source link

Error: Unmapped ID/metadata combination 856:0 #33

Closed teracube closed 3 years ago

teracube commented 3 years ago

PocketMine-MP version: 3.17.0 [Protocol 422] https://poggit.pmmp.io/r/95959/InvSee_dev-35.phar

PocketMine-MP Crash Dump Wed Dec 23 16:46:38 CET 2020

Error: Unmapped ID/metadata combination 856:0
File: src/pocketmine/network/mcpe/convert/ItemTranslator
Line: 149
Type: InvalidArgumentException

A PLUGIN WAS INVOLVED IN THIS CRASH
BAD PLUGIN: InvSee v1.0.0

Code:
[140]    */
[141]   public function toNetworkId(int $internalId, int $internalMeta) : array{
[142]       if(isset($this->complexCoreToNetMapping[$internalId][$internalMeta])){
[143]           return [$this->complexCoreToNetMapping[$internalId][$internalMeta], 0];
[144]       }
[145]       if(array_key_exists($internalId, $this->simpleCoreToNetMapping)){
[146]           return [$this->simpleCoreToNetMapping[$internalId], $internalMeta];
[147]       }
[148] 
[149]       throw new \InvalidArgumentException("Unmapped ID/metadata combination $internalId:$internalMeta");
[150]   }
[151] 
[152]   /**
[153]    * @return int[]
[154]    * @phpstan-return array{int, int}
[155]    */
[156]   public function fromNetworkId(int $networkId, int $networkMeta, ?bool &$isComplexMapping = null) : array{
[157]       if(isset($this->complexNetToCoreMapping[$networkId])){
[158]           if($networkMeta !== 0){
[159]               throw new \UnexpectedValueException("Unexpected non-zero network meta on complex item mapping");

Backtrace:
#0 src/pocketmine/network/mcpe/NetworkBinaryStream(260): pocketmine\network\mcpe\convert\ItemTranslator->toNetworkId(integer 856, integer 0)
#1 src/pocketmine/network/mcpe/protocol/types/inventory/ItemStackWrapper(57): pocketmine\network\mcpe\NetworkBinaryStream->putSlot(object pocketmine\item\Item)
#2 src/pocketmine/network/mcpe/protocol/InventoryContentPacket(52): pocketmine\network\mcpe\protocol\types\inventory\ItemStackWrapper->write(object pocketmine\network\mcpe\protocol\InventoryContentPacket)
#3 src/pocketmine/network/mcpe/protocol/DataPacket(127): pocketmine\network\mcpe\protocol\InventoryContentPacket->encodePayload()
#4 src/pocketmine/network/mcpe/RakLibInterface(244): pocketmine\network\mcpe\protocol\DataPacket->encode()
#5 src/pocketmine/Player(3321): pocketmine\network\mcpe\RakLibInterface->putPacket(object pocketmine\Player, object pocketmine\network\mcpe\protocol\InventoryContentPacket, boolean , boolean )
#6 src/pocketmine/Player(3338): pocketmine\Player->sendDataPacket(object pocketmine\network\mcpe\protocol\InventoryContentPacket, boolean , boolean )
#7 src/pocketmine/inventory/BaseInventory(446): pocketmine\Player->dataPacket(object pocketmine\network\mcpe\protocol\InventoryContentPacket)
#8 src/pocketmine/inventory/ContainerInventory(61): pocketmine\inventory\BaseInventory->sendContents(array[1])
#9 plugins/InvSee_dev-35.phar/src/BlockHorizons/InvSee/libs/muqsit/invmenu/inventories/BaseFakeInventory(83): pocketmine\inventory\ContainerInventory->onOpen(object pocketmine\Player)
#10 src/pocketmine/inventory/BaseInventory(406): BlockHorizons\InvSee\libs\muqsit\invmenu\inventories\BaseFakeInventory->onOpen(object pocketmine\Player)
#11 plugins/InvSee_dev-35.phar/src/BlockHorizons/InvSee/libs/muqsit/invmenu/inventories/BaseFakeInventory(78): pocketmine\inventory\BaseInventory->open(object pocketmine\Player)
#12 src/pocketmine/Player(4067): BlockHorizons\InvSee\libs\muqsit\invmenu\inventories\BaseFakeInventory->open(object pocketmine\Player)
#13 plugins/InvSee_dev-35.phar/src/BlockHorizons/InvSee/libs/muqsit/invmenu/inventories/BaseFakeInventory(135): pocketmine\Player->addWindow(object BlockHorizons\InvSee\inventories\InvSeePlayerInventory)
#14 plugins/InvSee_dev-35.phar/src/BlockHorizons/InvSee/libs/muqsit/invmenu/tasks/DelayedFakeBlockDataNotifyTask(42): BlockHorizons\InvSee\libs\muqsit\invmenu\inventories\BaseFakeInventory->onFakeBlockDataSendSuccess(object pocketmine\Player)
#15 src/pocketmine/scheduler/TaskHandler(137): BlockHorizons\InvSee\libs\muqsit\invmenu\tasks\DelayedFakeBlockDataNotifyTask->onRun(integer 6129914)
#16 src/pocketmine/scheduler/TaskScheduler(179): pocketmine\scheduler\TaskHandler->run(integer 6129914)
#17 src/pocketmine/plugin/PluginManager(654): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(integer 6129914)
#18 src/pocketmine/Server(2391): pocketmine\plugin\PluginManager->tickSchedulers(integer 6129914)
#19 src/pocketmine/Server(2154): pocketmine\Server->tick()
#20 src/pocketmine/Server(1994): pocketmine\Server->tickProcessor()
#21 src/pocketmine/Server(1588): pocketmine\Server->start()
#22 src/pocketmine/PocketMine(273): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[16] /home/container/, string[24] /home/container/plugins/)
#23 src/pocketmine/PocketMine(304): pocketmine\server()
#24 (11): require(string[71] phar:///home/container/PocketMine-MP.phar/src/pocketmine/PocketMine.php)
Muqsit commented 3 years ago

This is the result of a transaction with an item that is off the bounds that PMMP supports than an issue with InvSee.