how can i protect my plugin to crashes like hasPermission() on null or setComponents() on null or getName() on null in all of this crashes is not line or something only line in pocketmine source. e.g. Code: PocketMine-MP Crash Dump Sun Jul 26 18:56:04 UTC 2015 Error: Call to a member function getName() on null File: /src/pocketmine/level/Level__64bit Line: 2634 Type: E_ERROR Code: [2625] return (int) $this->time; [2626] } [2627] [2628] /** [2629] * Returns the Level name [2630] * [2631] * @return string [2632] */ [2633] public function getName(){ [2634] return $this->provider->getName(); [2635] } [2636] [2637] /** [2638] * Returns the Level folder name [2639] * [2640] * @return string [2641] */ [2642] public function getFolderName(){ [2643] return $this->folderName; [2644] } Backtrace: #0 (): pocketmine\Server->crashDump() PocketMine-MP version: 1.5dev #1255 [Protocol 27; API 1.12.0] Git commit: 0000000000000000000000000000000000000000 uname -a: Linux sith 3.19.0 #2 SMP Sat Jul 18 18:32:05 CEST 2015 x86_64 PHP Version: 5.6.4 Zend version: 2.6.0 OS : Linux, linux Loaded plugins: FastTransfer 1.0.2 by shoghicp for API(s) 1.12.0 AllServers 1.1 by hoyinm for API(s) 1.12.0 SimpleAuth 1.7.1 by PocketMine Team, shoghicp for API(s) 1.12.0 BedWars 1 by CreeperFace for API(s) 1.12.0
and when this happens? Spoiler PocketMine-MP Crash Dump Mon Jul 27 08:19:04 UTC 2015 Error: Call to a member function setComponents() on null File: /src/pocketmine/entity/Entity__64bit Line: 1427 Type: E_ERROR Code: [1418] $from = Position::fromObject($this, $this->level); [1419] $to = Position::fromObject($pos, $pos instanceof Position ? $pos->getLevel() : $this->level); [1420] $this->server->getPluginManager()->callEvent($ev = new EntityTeleportEvent($this, $from, $to)); [1421] if($ev->isCancelled()){ [1422] return \false; [1423] } [1424] $this->ySize = 0; [1425] $pos = $ev->getTo(); [1426] [1427] $this->setMotion($this->temporalVector->setComponents(0, 0, 0)); [1428] if($this->setPositionAndRotation($pos, $yaw === \null ? $this->yaw : $yaw, $pitch === \null ? $this->pitch : $pitch) !== \false){ [1429] $this->resetFallDistance(); [1430] $this->onGround = \true; [1431] [1432] $this->lastX = $this->x; [1433] $this->lastY = $this->y; [1434] $this->lastZ = $this->z; [1435] [1436] $this->lastYaw = $this->yaw; [1437] $this->lastPitch = $this->pitch; Backtrace: #0 (): pocketmine\Server->crashDump() PocketMine-MP version: 1.5dev #1255 [Protocol 27; API 1.12.0] Git commit: 0000000000000000000000000000000000000000 uname -a: Linux sith 3.19.0 #2 SMP Sat Jul 18 18:32:05 CEST 2015 x86_64 PHP Version: 5.6.4 Zend version: 2.6.0 OS : Linux, linux Loaded plugins: FastTransfer 1.0.2 by shoghicp for API(s) 1.12.0 AllServers 1.1 by hoyinm for API(s) 1.12.0 SimpleAuth 1.7.1 by PocketMine Team, shoghicp for API(s) 1.12.0 BedWars 1 by CreeperFace for API(s) 1.12.0
i only stay on one place without move and after few minutes server crashes with error setComponents() on null so please how can i repair it?
im wondering.... i dont see this by my server... get never this bug... but dont use any official plugins...only my own...
Hm i didnt try it but i have problem with PVP too is it simple auth bug? And on my local server i didnt see only any bug