Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved crashes without reason

Comments in 'Plugin Development' started by Creeperface, Jul 26, 2015.

  1. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    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
    
  2. tigerza118
    Offline

    tigerza118 Active Member

    Joined:
    Jan 31, 2015
    Posts:
    100
    Minecraft User:
    tigerza117
    new install pocketmine
  3. tigerza118
    Offline

    tigerza118 Active Member

    Joined:
    Jan 31, 2015
    Posts:
    100
    Minecraft User:
    tigerza117
    to pocketmine build 1244 it work
  4. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Don't call any functions on the Player after he has left the server or before he has spawned.
    Creeperface likes this.
  5. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    and when this happens?
    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
  6. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    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?
  7. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    or server crashes after start -,-
  8. Xenturio
    Offline

    Xenturio Active Member

    Joined:
    Sep 19, 2014
    Posts:
    333
    Minecraft User:
    Xenturio
    im wondering.... i dont see this by my server... get never this bug... but dont use any official plugins...only my own...
  9. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    Me too it is by my new bedwars
  10. Xenturio
    Offline

    Xenturio Active Member

    Joined:
    Sep 19, 2014
    Posts:
    333
    Minecraft User:
    Xenturio
  11. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    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
  12. Xenturio
    Offline

    Xenturio Active Member

    Joined:
    Sep 19, 2014
    Posts:
    333
    Minecraft User:
    Xenturio

Share This Page

Advertisement