Crash on world join, please fix #2

Closed
opened 2018-07-16 11:41:13 +00:00 by Ad5001 · 0 comments
Owner

Original issue #2 by FienixEC created at 2017-10-26T01:24:33Z

Error: Argument 2 passed to pocketmine\level\generator\GeneratorRegisterTask::__construct() must be an instance of pocketmine\level\generator\Generator, null given, called in phar:///home/tcagame/waffle/1/PocketMine-MP.phar/src/pocketmine/level/Level.php on line 392
File: src/pocketmine/level/generator/GeneratorRegisterTask
Line: 41
Type: notice

Code:
[32]
[33] class GeneratorRegisterTask extends AsyncTask{
[34]
[35] public $generator;
[36] public $settings;
[37] public $seed;
[38] public $levelId;
[39] public $worldHeight = Level::Y_MAX;
[40]
[41] public function __construct(Level $level, Generator $generator){
[42] $this->generator = \get_class($generator);
[43] $this->settings = \serialize($generator->getSettings());
[44] $this->seed = $level->getSeed();
[45] $this->levelId = $level->getId();
[46] $this->worldHeight = $level->getWorldHeight();
[47] }
[48]
[49] public function onRun(){
[50] BlockFactory::init();
[51] Biome::init();

Backtrace:
#0 src/pocketmine/level/Level(392): pocketmine\level\generator\GeneratorRegisterTask->__construct(pocketmine\level\Level object, NULL )
#1 src/pocketmine/level/generator/PopulationTask(147): pocketmine\level\Level->registerGenerator()
#2 src/pocketmine/scheduler/AsyncPool(164): pocketmine\level\generator\PopulationTask->onCompletion(pocketmine\Server object)
#3 src/pocketmine/scheduler/ServerScheduler(342): pocketmine\scheduler\AsyncPool->collectTasks()
#4 src/pocketmine/Server(2506): pocketmine\scheduler\ServerScheduler->mainThreadHeartbeat(integer 1618)
#5 src/pocketmine/Server(2253): pocketmine\Server->tick()
#6 src/pocketmine/Server(2132): pocketmine\Server->tickProcessor()
#7 src/pocketmine/Server(1714): pocketmine\Server->start()
#8 src/pocketmine/PocketMine(558): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string phar:///home/tcagame/waffle/1/PocketMine-MP.phar/, string /home/tcagame/waffle/1/, string /home/tcagame/waffle/1/plugins/)
#9 /home/tcagame/waffle/1/PocketMine-MP.phar(1): require(string phar:///home/tcagame/waffle/1/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

PocketMine-MP version: 1.7dev #321 [Protocol 137; API 3.0.0-ALPHA9]

Original issue [#2](https://github.com/Ad5001/Spherable/issues/2) by [FienixEC](https://github.com/FienixEC) created at 2017-10-26T01:24:33Z Error: Argument 2 passed to pocketmine\level\generator\GeneratorRegisterTask::__construct() must be an instance of pocketmine\level\generator\Generator, null given, called in phar:///home/tcagame/waffle/1/PocketMine-MP.phar/src/pocketmine/level/Level.php on line 392 File: src/pocketmine/level/generator/GeneratorRegisterTask Line: 41 Type: notice Code: [32] [33] class GeneratorRegisterTask extends AsyncTask{ [34] [35] public $generator; [36] public $settings; [37] public $seed; [38] public $levelId; [39] public $worldHeight = Level::Y_MAX; [40] [41] public function __construct(Level $level, Generator $generator){ [42] $this->generator = \get_class($generator); [43] $this->settings = \serialize($generator->getSettings()); [44] $this->seed = $level->getSeed(); [45] $this->levelId = $level->getId(); [46] $this->worldHeight = $level->getWorldHeight(); [47] } [48] [49] public function onRun(){ [50] BlockFactory::init(); [51] Biome::init(); Backtrace: #0 src/pocketmine/level/Level(392): pocketmine\level\generator\GeneratorRegisterTask->__construct(pocketmine\level\Level object, NULL ) #1 src/pocketmine/level/generator/PopulationTask(147): pocketmine\level\Level->registerGenerator() #2 src/pocketmine/scheduler/AsyncPool(164): pocketmine\level\generator\PopulationTask->onCompletion(pocketmine\Server object) #3 src/pocketmine/scheduler/ServerScheduler(342): pocketmine\scheduler\AsyncPool->collectTasks() #4 src/pocketmine/Server(2506): pocketmine\scheduler\ServerScheduler->mainThreadHeartbeat(integer 1618) #5 src/pocketmine/Server(2253): pocketmine\Server->tick() #6 src/pocketmine/Server(2132): pocketmine\Server->tickProcessor() #7 src/pocketmine/Server(1714): pocketmine\Server->start() #8 src/pocketmine/PocketMine(558): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string phar:///home/tcagame/waffle/1/PocketMine-MP.phar/, string /home/tcagame/waffle/1/, string /home/tcagame/waffle/1/plugins/) #9 /home/tcagame/waffle/1/PocketMine-MP.phar(1): require(string phar:///home/tcagame/waffle/1/PocketMine-MP.phar/src/pocketmine/PocketMine.php) PocketMine-MP version: 1.7dev #321 [Protocol 137; API 3.0.0-ALPHA9]
Ad5001 self-assigned this 2018-07-16 11:41:13 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Ad5001/Spherable#2
No description provided.