pmmp / PocketMine-MP

A server software for Minecraft: Bedrock Edition in PHP
https://pmmp.io
GNU Lesser General Public License v3.0
3.27k stars 1.55k forks source link

Server crashing constantly #495

Closed kabluinc closed 7 years ago

kabluinc commented 7 years ago

Issue description

Ever since updating to API3/Network branch, the servers been crashing like crazy. 1 of the crashes is happening almost every 20-30 minute

Steps to reproduce the issue

Random

OS and versions

Crashdump, backtrace or other files

First crash: (very often) 'PocketMine-MP Crash Dump Fri Mar 31 18:35:45 BST 2017

Error: Call to a member function getAttribute() on null File: /src/pocketmine/entity/Human Line: 103 Type: notice

Code: [94] @param string $str [95] @param string $skinId [96] */ [97] public function setSkin($str, $skinId){ [98] $this->skin = $str; [99] $this->skinId = $skinId; [100] } [101] [102] public function getFood() : float{ [103] return $this->attributeMap->getAttribute(Attribute::HUNGER)->getValue(); [104] } [105] [106] /* [107] WARNING: This method does not check if full and may throw an exception if out of bounds. [108] Use {@link Human::addFood()} for this purpose [109] [110] @param float $new [111] [112] @throws \InvalidArgumentException [113] /

Backtrace:

0 /src/pocketmine/entity/Human(411): pocketmine\entity\Human->getFood(boolean)

1 /src/pocketmine/Player(3640): pocketmine\entity\Human->saveNBT(boolean)

2 /src/pocketmine/Server(2258): pocketmine\Player->save(boolean 1)

3 /src/pocketmine/Server(2405): pocketmine\Server->doAutoSave(boolean)

4 /src/pocketmine/Server(2138): pocketmine\Server->tick(boolean)

5 /src/pocketmine/Server(2021): pocketmine\Server->tickProcessor(boolean)

6 /src/pocketmine/Server(1642): pocketmine\Server->start(boolean)

7 /src/pocketmine/PocketMine(493): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string phar://E:\UserFiles\GameServers\TC03428615845884033855301\PocketMine-MP.phar/, string E:\UserFiles\GameServers\TC03428615845884033855301\, string E:\UserFiles\GameServers\TC03428615845884033855301\plugins)

8 (1): require_once(string phar://E:/UserFiles/GameServers/TC03428615845884033855301/PocketMine-MP.phar/src/pocketmine/PocketMine.php)'

2nd crash: 'PocketMine-MP Crash Dump Fri Mar 31 21:32:13 BST 2017

Error: Call to a member function getItem() on null File: /src/pocketmine/tile/Chest Line: 78 Type: notice

Code: [69] [70] parent::close(); [71] } [72] } [73] [74] public function saveNBT(){ [75] $this->namedtag->Items = new ListTag("Items", []); [76] $this->namedtag->Items->setTagType(NBT::TAG_Compound); [77] for($index = 0; $index < $this->getSize(); ++$index){ [78] $this->setItem($index, $this->inventory->getItem($index)); [79] } [80] } [81] [82] /* [83] @return int [84] */ [85] public function getSize(){ [86] return 27; [87] } [88]

Backtrace:

0 /src/pocketmine/level/format/io/region/Anvil(85): pocketmine\tile\Chest->saveNBT(boolean)

1 /src/pocketmine/level/format/io/region/RegionLoader(163): pocketmine\level\format\io\region\Anvil->nbtSerialize(pocketmine\level\format\Chunk object)

2 /src/pocketmine/level/format/io/region/McRegion(316): pocketmine\level\format\io\region\RegionLoader->writeChunk(pocketmine\level\format\Chunk object)

3 /src/pocketmine/level/Level(977): pocketmine\level\format\io\region\McRegion->saveChunk(integer -1, integer -9)

4 /src/pocketmine/level/Level(965): pocketmine\level\Level->saveChunks(boolean)

5 /src/pocketmine/Server(2265): pocketmine\level\Level->save(boolean )

6 /src/pocketmine/Server(2405): pocketmine\Server->doAutoSave(boolean)

7 /src/pocketmine/Server(2138): pocketmine\Server->tick(boolean)

8 /src/pocketmine/Server(2021): pocketmine\Server->tickProcessor(boolean)

9 /src/pocketmine/Server(1642): pocketmine\Server->start(boolean)

10 /src/pocketmine/PocketMine(493): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string phar://E:\UserFiles\LIAMG\GameServers\TC03428615845884033855301\PocketMine-MP.phar/, string E:\UserFiles\GameServers\TC03428615845884033855301\, string E:\UserFiles\GameServers\TC03428615845884033855301\plugins)

11 (1): require_once(string phar://E:/UserFiles/GameServers/TC03428615845884033855301/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

PocketMine-MP version: 1.6.2dev #0 [Protocol 105; API 3.0.0-ALPHA5] Git commit: 0000000000000000000000000000000000000000 uname -a: Windows NT NS306121 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586 PHP Version: 7.0.10 Zend version: 3.0.0 OS : WINNT, win'

dktapps commented 7 years ago

I already fixed this issue, update your version. See closed issues.

dktapps commented 7 years ago

... and in future please provide a valid commit hash or Jenkins build number. A branch name is not a version.

kabluinc commented 7 years ago

Okay thx. Sorry I will look before creating an issue next time.