You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Crash:
30.03 23:04:50 [Server] Server thread/EMERGENCY An unrecoverable error has occurred and the server has crashed. Creating a crash dump
30.03 23:04:50 [Server] Server thread/CRITICAL Error: "Call to a member function getAttribute() on null" (EXCEPTION) in "/src/pocketmine/entity/Human" at line 103
Steps to reproduce the issue
Random Crash every 5 - 15 minutes
OS and versions
PocketMine-MP: 1.6.2dev #0 [Protocol 105; API 3.0.0-ALPHA5]
PHP: 7.0.15
Server OS: Linux, linux
Game version: PE/Win10
Crashdump, backtrace or other files
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] */
Issue description
Crash:
30.03 23:04:50 [Server] Server thread/EMERGENCY An unrecoverable error has occurred and the server has crashed. Creating a crash dump
30.03 23:04:50 [Server] Server thread/CRITICAL Error: "Call to a member function getAttribute() on null" (EXCEPTION) in "/src/pocketmine/entity/Human" at line 103
Steps to reproduce the issue
Random Crash every 5 - 15 minutes
OS and versions
Crashdump, backtrace or other files
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(3681): pocketmine\entity\Human->saveNBT(boolean)
#2 /src/pocketmine/Server(2272): pocketmine\Player->save(boolean 1)
#3 /src/pocketmine/Server(2419): pocketmine\Server->doAutoSave(boolean)
#4 /src/pocketmine/Server(2152): pocketmine\Server->tick(boolean)
#5 /src/pocketmine/Server(2035): pocketmine\Server->tickProcessor(boolean)
#6 /src/pocketmine/Server(1655): pocketmine\Server->start(boolean)
#7 /src/pocketmine/PocketMine(493): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string phar:///home/minecraft/multicraft/servers/server1162/custom-phar.phar/, string /home/minecraft/multicraft/servers/server1162/, string /home/minecraft/multicraft/servers/server1162/plugins/)
#8 (1): require_once(string phar:///home/minecraft/multicraft/servers/server1162/custom-phar.phar/src/pocketmine/PocketMine.php)
The text was updated successfully, but these errors were encountered: