Skip to content
This repository has been archived by the owner on Dec 28, 2018. It is now read-only.

Argument 1 passed to pocketmine\scheduler\TaskScheduler::cancelTask() must be of the type integer, null given #21

Open
isoz opened this issue Dec 27, 2018 · 0 comments

Comments

@isoz
Copy link

isoz commented Dec 27, 2018

Server crashes.

Versions

This server is running PocketMine-MP 3.5.1 for Minecraft: Bedrock Edition v1.8.0 (protocol version 313)

Crashdump or console errors

Error: Argument 1 passed to pocketmine\scheduler\TaskScheduler::cancelTask() must be of the type integer, null given, called in /home/gaia/plugins/EssentialsPE/src/EssentialsPE/BaseFiles/BaseAPI.php on line 2105
File: src/pocketmine/scheduler/TaskScheduler
Line: 107
Type: TypeError

Code:
[98] 	 * @return null|TaskHandler
[99] 	 */
[100] 	public function scheduleDelayedRepeatingTask(Task $task, int $delay, int $period){
[101] 		return $this->addTask($task, $delay, $period);
[102] 	}
[103] 
[104] 	/**
[105] 	 * @param int $taskId
[106] 	 */
[107] 	public function cancelTask(int $taskId){
[108] 		if(isset($this->tasks[$taskId])){
[109] 			try{
[110] 				$this->tasks[$taskId]->cancel();
[111] 			}finally{
[112] 				unset($this->tasks[$taskId]);
[113] 			}
[114] 		}
[115] 	}
[116] 
[117] 	public function cancelAllTasks(){

Backtrace:
#0 EssentialsPE/src/EssentialsPE/BaseFiles/BaseAPI(2105): pocketmine\scheduler\TaskScheduler->cancelTask(NULL )
#1 EssentialsPE/src/EssentialsPE/BaseFiles/BaseAPI(2085): EssentialsPE\BaseFiles\BaseAPI->cancelTPRequestTask(pocketmine\Player object)
#2 EssentialsPE/src/EssentialsPE/Tasks/TPRequestTask(31): EssentialsPE\BaseFiles\BaseAPI->removeTPRequest(pocketmine\Player object)
#3 src/pocketmine/scheduler/TaskHandler(159): EssentialsPE\Tasks\TPRequestTask->onRun(integer 30205)
#4 src/pocketmine/scheduler/TaskScheduler(199): pocketmine\scheduler\TaskHandler->run(integer 30205)
#5 src/pocketmine/plugin/PluginManager(614): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(integer 30205)
#6 src/pocketmine/Server(2522): pocketmine\plugin\PluginManager->tickSchedulers(integer 30205)
#7 src/pocketmine/Server(2275): pocketmine\Server->tick()
#8 src/pocketmine/Server(2139): pocketmine\Server->tickProcessor()
#9 src/pocketmine/Server(1715): pocketmine\Server->start()
#10 src/pocketmine/PocketMine(249): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string /home/gaia/, string /home/gaia/plugins/)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant