Very often after a reset of a map, the server crash with this error, i checked and the maps is loaded, i don't know why :|. Some friends have the same problem.
It concerns that line
-> $chunk = $this->provider->getChunk($x, $z, $generate);
Oh and it's caused by .mcr worlds i think cause when the server crash it's caused by a map in .mcr world format and never by .mca worlds, is it possible to convert the worlds or to fix that ?
Please provide a proper crashdump.
Ok i going to send you one now ;)
This is the crashdumps 馃憤 @dktapps
```
Crash Dump Thu Dec 8 09:14:32 EST 2016
Error: Call to a member function getChunk() on null
File: /src/pocketmine/level/Level
Line: 2764
Type: notice
Code:
[2755] public function loadChunk(int $x, int $z, bool $generate = true) : bool{
[2756] if(isset($this->chunks[$index = Level::chunkHash($x, $z)])){
[2757] return true;
[2758] }
[2759]
[2760] $this->timings->syncChunkLoadTimer->startTiming();
[2761]
[2762] $this->cancelUnloadChunkRequest($x, $z);
[2763]
[2764] $chunk = $this->provider->getChunk($x, $z, $generate);
[2765] if($chunk === null){
[2766] if($generate){
[2767] throw new \InvalidStateException("Could not create new Chunk");
[2768] }
[2769] return false;
[2770] }
[2771]
[2772] if($this->provider->getProviderName() == "mcregion"){
[2773] if($chunk->getBiomeColor(0, 0) == [0, 0, 0]){
[2774] for($x = 0; $x < 16; ++$x){
Backtrace:
It makes my server so instable please fix it :|, this is the second error
Unloading level "BuildUHC1vs1(2)"
Preparing level "BuildUHC1vs1(2)"
Unloading level "BuildUHC1vs1(2)"
Preparing level "BuildUHC1vs1(2)"
Error: "Call to a member function startTiming() on null" (EXCEPTION) in "/src/pocketmine/level/format/mcregion/McRegion" at line 209
An unrecoverable error has occurred and the server has crashed. Creating a crash dump
Please upload the "/home/srv1/crashdumps
This error happens when i delete the $this->provider = null;
Please help @dktapps :(
Can you share the code you are using to perform these level unloads and reloads?
-
@dktapps
Please use ``` around code blocks in future.
done @dktapps
Is it possible to check if the chunk exist so the server will not crash or something like that ?
Do you have some news about that ? @dktapps
I haven't been able to identify what the cause of this bug may be. The issue appears to be that the level is retained after it's unloaded, which causes the unloaded level to be returned from Server->getLevelByName() instead of the newly loaded one. I can't identify what in the core could result in this happening, so I'm afraid that right now I can't help you. This will be investigated in more detail at a later date.
Sorry for bumping this, but didn't you fix it last time? There was a similar issue, and you implemented WeakPosition to address it.
It happens with mcpe 1.0 branch too, others servers have this issues we need it to ne fixed :(
I finally found the origin of the crash (not sure), when you teleport a player in a zone where the chunk aren't load for exemple (EnderPearl) the server crash.
@Misteboss Would you try to reproduce with branch issues/156 and report back what issues occur? Please make sure to set zend.assertions = 1 in your php.ini for testing.
Closing due to lack of response.
Most helpful comment
It happens with mcpe 1.0 branch too, others servers have this issues we need it to ne fixed :(