LegendOfMCPE / EssentialsPE

Port of Bukkit Essentials for @PocketMine Servers (Moved to @poggit-orphanage)
GNU General Public License v3.0
99 stars 21 forks source link

TPRequestTask Crash #144

Closed BobbyTowers closed 9 years ago

BobbyTowers commented 9 years ago
PocketMine-MP Crash Dump Sun Aug 9 22:18:47 ACT 2015

Error: Call to a member function hasPermission() on null
File: /src/pocketmine/Player__32bit
Line: 439
Type: E_ERROR

Code:
[430]       return $this->perm->isPermissionSet($name);
[431]   }
[432] 
[433]   /**
[434]    * @param permission\Permission|string $name
[435]    *
[436]    * @return bool
[437]    */
[438]   public function hasPermission($name){
[439]       return $this->perm->hasPermission($name);
[440]   }
[441] 
[442]   /**
[443]    * @param Plugin $plugin
[444]    * @param string $name
[445]    * @param bool   $value
[446]    *
[447]    * @return permission\PermissionAttachment
[448]    */
[449]   public function addAttachment(Plugin $plugin, $name = \null, $value = \null){

Backtrace:
#0 /src/pocketmine/Server__32bit(0): pocketmine\Server->crashDump()
#1 /EssentialsPE.phar/src/EssentialsPE/BaseFiles/BaseSession(66): pocketmine\Player->hasPermission()
#2 /EssentialsPE.phar/src/EssentialsPE/Loader(832): EssentialsPE\BaseFiles\BaseSession->__construct()
#3 /EssentialsPE.phar/src/EssentialsPE/Loader(873): EssentialsPE\Loader->createSession()
#4 /EssentialsPE.phar/src/EssentialsPE/Loader(1958): EssentialsPE\Loader->getSession()
#5 /EssentialsPE.phar/src/EssentialsPE/Tasks/TPRequestTask(27): EssentialsPE\Loader->removeTPRequest()
#6 /src/pocketmine/scheduler/TaskHandler(150): EssentialsPE\Tasks\TPRequestTask->onRun()
#7 /src/pocketmine/scheduler/ServerScheduler(247): pocketmine\scheduler\TaskHandler->run()
#8 /src/pocketmine/Server__32bit(2494): pocketmine\scheduler\ServerScheduler->mainThreadHeartbeat()
#9 /src/pocketmine/Server__32bit(2300): pocketmine\Server->tick()
#10 /src/pocketmine/Server__32bit(2178): pocketmine\Server->tickProcessor()
#11 /src/pocketmine/Server__32bit(1778): pocketmine\Server->start()
#12 /src/pocketmine/PocketMine(464): pocketmine\Server->__construct()
#13 (1): ()
#14 (0): {main}()

PocketMine-MP version: 1.5dev #1258 [Protocol 27; API 1.12.0]
Git commit: 0000000000000000000000000000000000000000
uname -a: Windows NT SERVERMACHINE 6.1 build 7601 (Windows 7 Business Edition Service Pack 1) i586
PHP Version: 5.6.4
Zend version: 2.6.0
OS : WINNT, win

Loaded plugins:
ASR 2.0.1 by iJoshuaHD for API(s) 1.9.0, 1.10.0, 1.11.0
BasicHUD 1.0.6 by aliuly for API(s) 1.12.0
ClearLagg 1.1.0 by LegendOfMCPE for API(s) 1.0.0
CombatLogger 1.2.0 by Lambo for API(s) 1.12.0
CustomAlerts 1.6 by EvolSoft for API(s) 1.12.0
EssentialsPE 1.1.1 by LegendsOfMCPE Team for API(s) 1.12.0
FurnaceIndicator 1.2 by onebone for API(s) 1.6.0
InventoryClear 1.3 by CrazedMiner for API(s) 1.11.0
InvSee 0.0.1 by tschrock (tschrock123@gmail.com) for API(s) 1.0.0
ItemCloud 1.3 by onebone for API(s) 1.4.0
KeepInventory 1.2.0 by boybook for API(s) 1.0.0
MagicTelePortal 1.3.2 by aliuly for API(s) 1.10.0
ManyWorlds 2.0.1 by aliuly for API(s) 1.10.0
NoFlyHack 1.0.0 by Guillaume351 for API(s) 1.0.0
PeacefulSpawn 2.4 by LDX for API(s) 1.3.1, 1.4.0
PocketGuard 2.1.1 by MinecrafterJPN for API(s) 1.10.0
PurePerms 1.1.8 by 64FF00 for API(s) 1.12.0
RandomItem 4.2 by LDX for API(s) 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0
SignStatus 2 by xpyctum for API(s) 1.0.0
SimpleAuth 1.7.1 by PocketMine Team, shoghicp for API(s) 1.12.0
SimpleMessages 1.2 by Dutok for API(s) 1.0.0
TimeCommander 2 by LDX for API(s) 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0
TimeRanks 1.0.2 by luca28pet for API(s) 1.12.0
VanishNP 1.0.0 by iksaku for API(s) 1.12.0
VoteBan 1.0.2 by GmWM for API(s) 1.12.0
VoteReward 2.1 by LDX for API(s) 1.0.0, 1.1.0, 1.2.0, 1.3.0
WorldProtect 2.1.0 by aliuly for API(s) 1.10.0, 1.12.0
PureChat 1.2.7 by 64FF00 for API(s) 1.11.0
BobbyTowers commented 9 years ago

Was it something I did wrong?

BobbyTowers commented 9 years ago

Never mind.

PEMapModder commented 9 years ago

It seems like this issue happens when a teleport request expires but the player has already quitted the server.

A possible solution is to check if player is online in TPRequestTask.

Thanks for supplying a usable crash dump.

BobbyTowers commented 9 years ago

You're welcome, thank you for replying.

alicheek commented 9 years ago

This is still happening it seems on 1.1.2

falkirks commented 9 years ago

I did a quick fix in c99f97dd6262d7386acf32c3cc90f2aa59705afa. I am not sure if this completely fixes the issue.