PocketMine / PocketMine-MP

Legacy PocketMine-MP repository. Head to https://github.com/pmmp for up to date software.
https://www.pocketmine.net/
GNU Lesser General Public License v3.0
1.26k stars 660 forks source link

server crash build 1147 while joining client build 11 #3034

Closed vvzar closed 9 years ago

vvzar commented 9 years ago

PocketMine-MP Crash Dump Tue May 19 13:24:39 MSK 2015

Error: Call to a member function getX() on integer File: /src/pocketmine/level/Level Line: 803 Type: E_ERROR

Code: [794] $this->chunkTickList = []; [795] return; [796] } [797] [798] $chunksPerLoader = \min(200, \max(1, (int) ((($this->chunksPerTick - \count($this->loaders)) / \count($this->loaders)) + 0.5))); [799] $randRange = 3 + $chunksPerLoader / 30; [800] $randRange = $randRange > $this->chunkTickRadius ? $this->chunkTickRadius : $randRange; [801] [802] foreach($this->loaders as $loader){ [803] $chunkX = $loader->getX() >> 4; [804] $chunkZ = $loader->getZ() >> 4; [805] [806] $index = \PHP_INT_SIZE === 8 ? ((($x) & 0xFFFFFFFF) << 32) | (( $z) & 0xFFFFFFFF) : ($x) . ":" . ( $z); [807] $existingLoaders = \max(0, isset($this->chunkTickList[$index]) ? $this->chunkTickList[$index] : 0); [808] $this->chunkTickList[$index] = $existingLoaders + 1; [809] for($chunk = 0; $chunk < $chunksPerLoader; ++$chunk){ [810] $dx = \mt_rand(-$randRange, $randRange); [811] $dz = \mt_rand(-$randRange, $randRange); [812] $hash = \PHP_INT_SIZE === 8 ? ((($dx + $x) & 0xFFFFFFFF) << 32) | (( $dz + $z) & 0xFFFFFFFF) : ($dx + $x) . ":" . ( $dz + $z); [813] if(!isset($this->chunkTickList[$hash]) and isset($this->chunks[$hash])){

Backtrace:

0 (): pocketmine\Server->crashDump()

PocketMine-MP version: 1.5dev #1147 [Protocol 26; API 1.12.0] Git commit: 0000000000000000000000000000000000000000 uname -a: Linux mpe 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 PHP Version: 5.6.4 Zend version: 2.6.0 OS : Linux, linux

wu-vincent commented 9 years ago

the same

shoghicp commented 9 years ago

Fixed by 0c6d8b9