iTXTech / Genisys

Feature-rich server software for Minecraft: Pocket Edition & Windows 10 Edition Beta
https://itxtech.org/genisys/
GNU General Public License v3.0
435 stars 243 forks source link

getCount() on null #1386

Closed dries-c closed 8 years ago

dries-c commented 8 years ago

Issue description

[Server thread/CRITICAL]: Error: "Call to a member function getCount() on null" (EXCEPTION) in "/src/pocketmine/Player" at line 3346

Steps to reproduce the issue

/

OS and versions

Genisys Crash Dump Wed Jul 6 14:56:20 AKDT 2016

Error: Call to a member function getCount() on null
File: /src/pocketmine/Player
Line: 3346
Type: notice

Code:
[3337] 
[3338]              $canCraft = true;
[3339] 
[3340] 
[3341]              if($recipe instanceof ShapedRecipe){
[3342]                  for($x = 0; $x < 3 and $canCraft; ++$x){
[3343]                      for($y = 0; $y < 3; ++$y){
[3344]                          $item = $packet->input[$y * 3 + $x];
[3345]                          $ingredient = $recipe->getIngredient($x, $y);
[3346]                          if($item->getCount() > 0 and $item->getId() > 0){
[3347]                              if($ingredient == null){
[3348]                                  $canCraft = false;
[3349]                                  break;
[3350]                              }
[3351]                              if($ingredient->getId() != 0 and !$ingredient->deepEquals($item, $ingredient->getDamage() !== null, $ingredient->getCompoundTag() !== null)){
[3352]                                  $canCraft = false;
[3353]                                  break;
[3354]                              }
[3355] 
[3356]                          }elseif($ingredient !== null and $item->getId() !== 0){

Backtrace:
#0 /src/synapse/Synapse(225): synapse\Player->handleDataPacket(pocketmine\network\protocol\CraftingEventPacket object)
#1 /src/synapse/network/SynapseInterface(109): synapse\Synapse->handleDataPacket(pocketmine\network\protocol\CraftingEventPacket object)
#2 /src/synapse/network/SynapseInterface(80): synapse\network\SynapseInterface->handlePacket(string .....%.4...ce...G..%0.....t...:F.\..('...................)
#3 /src/synapse/Synapse(135): synapse\network\SynapseInterface->process(boolean)
#4 /src/pocketmine/Server(2972): synapse\Synapse->tick(boolean)
#5 /src/pocketmine/Server(2679): pocketmine\Server->tick(boolean)
#6 /src/pocketmine/Server(2557): pocketmine\Server->tickProcessor(boolean)
#7 /src/pocketmine/Server(2122): pocketmine\Server->start(boolean)
#8 /src/pocketmine/PocketMine(467): pocketmine\Server->__construct(pocketmine\CompatibleClassLoader object, pocketmine\utils\MainLogger object, string C:\Users\GameCraft\Desktop\Skywars\, string C:\Users\GameCraft\Desktop\Skywars\, string C:\Users\GameCraft\Desktop\Skywars\plugins\, string unknown)

Genisys version: 1.2dev #0 [Protocol 81; API 2.0.0]
uname -a: Windows NT WIN-MECD5UF08SO 6.2 build 9200 (Windows Server 2012 Standard Edition) AMD64
PHP version: 7.0.4
Zend version: 3.0.0
OS : WINNT, win

Server uptime: 22 minutes 17 seconds
Number of loaded worlds: 5
Players online: 12/70

Loaded plugins:
EconomyAPI 2.0.9 by onebone for API(s) 1.0.0, 1.1.0, 1.2.0, 1.2.1, 1.3.0, 1.3.1, 1.4.0, 1.4.1, 1.12.0, 1.13.0, 2.0.0
PerWorldChat 1.3 by EvolSoft for API(s) 1.10.0
PurePerms 1.3.0-BETA-1 by 64FF00 for API(s) 1.13.0
WorldProtect 2.2.0 by aliuly for API(s) 1.10.0, 1.12.0
UChatP 1.0.0 by MCrafters for API(s) 2.0.0
CustomAlerts 1.6 by EvolSoft for API(s) 1.12.0
SW_svile 0.6dev by svile for API(s) 2.0.0
PureChat 1.3.4-INDEV by 64FF00 for API(s) 1.11.0
PeratX commented 8 years ago

Wait for W10 Fix please.

dries-c commented 8 years ago

yes but it crash my server plz fix it

dries-c commented 8 years ago

my server crasht every 20 min its not normal

dktapps commented 8 years ago

1337