Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in pocketmine 5.12.0 #4

Closed
NdaruAjaa opened this issue Mar 12, 2024 · 0 comments
Closed

Crash in pocketmine 5.12.0 #4

NdaruAjaa opened this issue Mar 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@NdaruAjaa
Copy link

PocketMine-MP version: 5.12.0 [Protocol 649]
Git commit: a35c3406a8c602cb02c412173bd88534a1a418dd
PHP version: 8.2.13
OS: Linux, linux

THIS CRASH WAS CAUSED BY A PLUGIN
BAD PLUGIN: AggressiveOptz

Thread: Main
Error: Call to undefined method pocketmine\network\mcpe\protocol\types\inventory\ItemStack::getNbt()
File: plugins/AggressiveOptz_dev-26 (1).phar/src/muqsit/aggressiveoptz/component/defaults/NetworkItemOptimizationComponent
Line: 65
Type: Error
Backtrace:
#0 pmsrc/src/event/RegisteredListener(61): muqsit\aggressiveoptz\component\defaults\NetworkItemOptimizationComponent->muqsit\aggressiveoptz\component\defaults{closure}(object pocketmine\event\server\DataPacketSendEvent#72803)
#1 pmsrc/src/event/Event(63): pocketmine\event\RegisteredListener->callEvent(object pocketmine\event\server\DataPacketSendEvent#72803)
#2 pmsrc/src/network/mcpe/StandardPacketBroadcaster(47): pocketmine\event\Event->call()
#3 pmsrc/src/network/mcpe/StandardEntityEventBroadcaster(62): pocketmine\network\mcpe\StandardPacketBroadcaster->broadcastPackets(array[1], array[1])
#4 pmsrc/src/network/mcpe/StandardEntityEventBroadcaster(128): pocketmine\network\mcpe\StandardEntityEventBroadcaster->sendDataPacket(array[1], object pocketmine\network\mcpe\protocol\MobArmorEquipmentPacket#84687)
#5 pmsrc/src/entity/Human(519): pocketmine\network\mcpe\StandardEntityEventBroadcaster->onMobArmorChange(array[1], object slapper\entities\SlapperHuman#83124)
#6 plugins/Slapper/src/slapper/entities/SlapperHuman(86): pocketmine\entity\Human->sendSpawnPacket(object pocketmine\player\Player#127570)
#7 pmsrc/src/entity/Entity(1517): slapper\entities\SlapperHuman->sendSpawnPacket(object pocketmine\player\Player#127570)
#8 pmsrc/src/entity/Human(477): pocketmine\entity\Entity->spawnTo(object pocketmine\player\Player#127570)
#9 pmsrc/src/player/Player(785): pocketmine\entity\Human->spawnTo(object pocketmine\player\Player#127570)
#10 pmsrc/src/player/Player(843): pocketmine\player\Player->spawnEntitiesOnChunk(int 15, int 18)
#11 pmsrc/src/network/mcpe/NetworkSession(1115): pocketmine\player\Player->pocketmine\player{closure}()
#12 pmsrc/src/network/mcpe/compression/CompressBatchPromise(60): pocketmine\network\mcpe\NetworkSession->pocketmine\network\mcpe{closure}(object pocketmine\network\mcpe\compression\CompressBatchPromise#187930)
#13 pmsrc/src/network/mcpe/ChunkRequestTask(86): pocketmine\network\mcpe\compression\CompressBatchPromise->resolve(string[2475] ...}l.......s.....z..:.E@q.....!.......nR.x."!@A!.?hr..q..*p.?I.@...3.......1..)
#14 pmsrc/src/scheduler/AsyncPool(280): pocketmine\network\mcpe\ChunkRequestTask->onCompletion()
#15 pmsrc/src/timings/TimingsHandler(198): pocketmine\scheduler\AsyncPool->pocketmine\scheduler{closure}()
#16 pmsrc/src/scheduler/AsyncPool(279): pocketmine\timings\TimingsHandler->time(object Closure#188146)
#17 pmsrc/src/scheduler/AsyncPool(127): pocketmine\scheduler\AsyncPool->collectTasksFromWorker(int 6)
#18 pmsrc/src/TimeTrackingSleeperHandler(58): pocketmine\scheduler\AsyncPool->pocketmine\scheduler{closure}()
#19 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(120): pocketmine\TimeTrackingSleeperHandler->pocketmine{closure}()
#20 pmsrc/src/TimeTrackingSleeperHandler(77): pocketmine\snooze\SleeperHandler->processNotifications()
#21 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(79): pocketmine\TimeTrackingSleeperHandler->processNotifications()
#22 pmsrc/src/Server(1696): pocketmine\snooze\SleeperHandler->sleepUntil(float 1710257024.0784)
#23 pmsrc/src/Server(1066): pocketmine\Server->tickProcessor()
#24 pmsrc/src/PocketMine(350): pocketmine\Server->__construct(object pocketmine\thread\ThreadSafeClassLoader#6, object pocketmine\utils\MainLogger#3, string[16] /home/container/, string[24] /home/container/plugins/)
#25 pmsrc/src/PocketMine(373): pocketmine\server()
#26 pmsrc(11): require(string[60] phar:///home/container/PocketMine-MP.phar/src/PocketMine.php)

Code:
[56] $this->cleanItemStackNbt($nbt);
[57] }
[58] }elseif($packet instanceof MobArmorEquipmentPacket){
[59] foreach($targets as $target){
[60] if($packet->actorRuntimeId === $target->getPlayer()?->getId()){
[61] continue 2;
[62] }
[63] }
[64]
[65] $nbt = $packet->head->getItemStack()->getNbt();
[66] if($nbt !== null){
[67] $this->cleanItemStackNbt($nbt);
[68] }
[69] $nbt = $packet->chest->getItemStack()->getNbt();
[70] if($nbt !== null){
[71] $this->cleanItemStackNbt($nbt);
[72] }
[73] $nbt = $packet->legs->getItemStack()->getNbt();
[74] if($nbt !== null){
[75] $this->cleanItemStackNbt($nbt);

@Muqsit Muqsit closed this as completed in ab8e740 Mar 13, 2024
@Muqsit Muqsit added the bug Something isn't working label Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants