iTXTech / Genisys

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

NBT::putItemHelper() #451

Closed dries-c closed 8 years ago

dries-c commented 8 years ago

Server thread/CRITICAL]: TypeError: "Argument 1 passed to pocketmine\nbt\NBT::putItemHelper() must be an instance of pocketmine\item\Item, null given, called in /Users/Ronny/Desktop/V5/src/pocketmine/entity/Item.php on line 165" (EXCEPTION) in "/src/pocketmine/nbt/NBT" at line 83

PeratX commented 8 years ago

Code does not have problem

PeratX commented 8 years ago

More backtrace please

dries-c commented 8 years ago

Server thread/CRITICAL]: TypeError: "Argument 1 passed to pocketmine\item\Item::__construct() must be of the type integer, string given, called in /Users/Ronny/Desktop/V5/src/pocketmine/item/Item.php on line 1171" (EXCEPTION) in "/src/pocketmine/item/Item" at line 1209

dries-c commented 8 years ago

CrashDump_Sun_Feb_28-07.17.52-CET_2016.txt

PeratX commented 8 years ago

@Driesboy Paste it here

dries-c commented 8 years ago

ok

dries-c commented 8 years ago
Genisys Crash Dump Sun Feb 28 07:17:52 CET 2016

Error: Argument 1 passed to pocketmine\item\Item::__construct() must be of the type integer, string given, called in /Users/Ronny/Desktop/V5/src/pocketmine/item/Item.php on line 1171
File: /src/pocketmine/item/Item
Line: 1209
Type: notice

Code:
[1200]              }
[1201]          }else{
[1202]              $item = self::get($b[0] & 0xFFFF, $meta);
[1203]          }
[1204] 
[1205]          return $item;
[1206]      }
[1207]  }
[1208] 
[1209]  public function __construct(int $id, $meta = 0, int $count = 1, string $name = "Unknown"){
[1210]      $this->id = $id & 0xffff;
[1211]      $this->meta = $meta !== null ? $meta & 0xffff : null;
[1212]      $this->count = $count;
[1213]      $this->name = $name;
[1214]      if(!isset($this->block) and $this->id <= 0xff and isset(Block::$list[$this->id])){
[1215]          $this->block = Block::get($this->id, $this->meta);
[1216]          $this->name = $this->block->getName();
[1217]      }
[1218]  }
[1219] 

Backtrace:
#0 /src/pocketmine/nbt/NBT(111): pocketmine\item\Item::get(string minecraft:egg, integer 0, integer 1)
#1 /src/pocketmine/entity/Item(77): pocketmine\nbt\NBT::getItemHelper(pocketmine\nbt\tag\CompoundTag pocketmine\nbt\tag\CompoundTag{.pocketmine\nbt\tag\StringTag:minecraft:egg.pocketmine\nbt\tag\ByteTag:1.pocketmine\nbt\tag\ShortTag:0.})
#2 /src/pocketmine/entity/Entity(283): pocketmine\entity\Item->initEntity(boolean)
#3 /src/pocketmine/entity/Entity(445): pocketmine\entity\Entity->__construct(pocketmine\level\format\anvil\Chunk object, pocketmine\nbt\tag\CompoundTag pocketmine\nbt\tag\CompoundTag{.pocketmine\nbt\tag\EnumTag:pocketmine\nbt\tag\EnumTag{.pocketmine\nbt\tag\DoubleTag:-2.1219166526296E-286.pocketmine\nbt\tag\DoubleTag:-0.pocketmine\nbt\tag\DoubleTag:4.4107464531403E-287.}.pocketmine\nbt\tag\LongTag:-4672323505564592503.pocketmine\nbt\tag\ShortTag:5.pocketmine\nbt\tag\ByteTag:0.pocketmine\nbt\tag\ShortTag:300.pocketmine\nbt\tag\ByteTag:1.pocketmine\nbt\tag\IntTag:0.pocketmine\nbt\tag\IntTag:0.pocketmine\nbt\tag\EnumTag:pocketmine\nbt\tag\EnumTag{.pocketmine\nbt\tag\FloatTag:8.8661327362061.pocketmine\nbt\tag\FloatTag:0.}.pocketmine\nbt\tag\FloatTag:0.pocketmine\nbt\tag\CompoundTag:pocketmine\nbt\tag\CompoundTag{.pocketmine\nbt\tag\StringTag:minecraft:egg.pocketmine\nbt\tag\ByteTag:1.pocketmine\nbt\tag\ShortTag:0.}.pocketmine\nbt\tag\LongTag:7037937285957437522.pocketmine\nbt\tag\EnumTag:pocketmine\nbt\tag\EnumTag{.pocketmine\nbt\tag\DoubleTag:-305.06281755497.pocketmine\nbt\tag\DoubleTag:67.pocketmine\nbt\tag\DoubleTag:386.59616862218.}.pocketmine\nbt\tag\ShortTag:0.pocketmine\nbt\tag\ShortTag:65535.pocketmine\nbt\tag\StringTag:Item.pocketmine\nbt\tag\ShortTag:1241.})
#4 /src/pocketmine/level/format/generic/BaseFullChunk(148): pocketmine\entity\Entity::createEntity(string Item, pocketmine\level\format\anvil\Chunk object, pocketmine\nbt\tag\CompoundTag pocketmine\nbt\tag\CompoundTag{.pocketmine\nbt\tag\EnumTag:pocketmine\nbt\tag\EnumTag{.pocketmine\nbt\tag\DoubleTag:-2.1219166526296E-286.pocketmine\nbt\tag\DoubleTag:-0.pocketmine\nbt\tag\DoubleTag:4.4107464531403E-287.}.pocketmine\nbt\tag\LongTag:-4672323505564592503.pocketmine\nbt\tag\ShortTag:5.pocketmine\nbt\tag\ByteTag:0.pocketmine\nbt\tag\ShortTag:300.pocketmine\nbt\tag\ByteTag:1.pocketmine\nbt\tag\IntTag:0.pocketmine\nbt\tag\IntTag:0.pocketmine\nbt\tag\EnumTag:pocketmine\nbt\tag\EnumTag{.pocketmine\nbt\tag\FloatTag:8.8661327362061.pocketmine\nbt\tag\FloatTag:0.}.pocketmine\nbt\tag\FloatTag:0.pocketmine\nbt\tag\CompoundTag:pocketmine\nbt\tag\CompoundTag{.pocketmine\nbt\tag\StringTag:minecraft:egg.pocketmine\nbt\tag\ByteTag:1.pocketmine\nbt\tag\ShortTag:0.}.pocketmine\nbt\tag\LongTag:7037937285957437522.pocketmine\nbt\tag\EnumTag:pocketmine\nbt\tag\EnumTag{.pocketmine\nbt\tag\DoubleTag:-305.06281755497.pocketmine\nbt\tag\DoubleTag:67.pocketmine\nbt\tag\DoubleTag:386.59616862218.}.pocketmine\nbt\tag\ShortTag:0.pocketmine\nbt\tag\ShortTag:65535.pocketmine\nbt\tag\StringTag:Item.pocketmine\nbt\tag\ShortTag:1241.})
#5 /src/pocketmine/level/Level(2687): pocketmine\level\format\generic\BaseFullChunk->initChunk(boolean)
#6 /src/pocketmine/level/Level(660): pocketmine\level\Level->loadChunk(integer -20, integer 24)
#7 /src/pocketmine/Player(856): pocketmine\level\Level->registerChunkLoader(pocketmine\Player Player(2), integer -20, integer 24, boolean 1)
#8 /src/pocketmine/Player(2063): pocketmine\Player->sendNextChunk(boolean)
#9 /src/pocketmine/Server(2928): pocketmine\Player->checkNetwork(boolean)
#10 /src/pocketmine/Server(2618): pocketmine\Server->tick(boolean)
#11 /src/pocketmine/Server(2496): pocketmine\Server->tickProcessor(boolean)
#12 /src/pocketmine/Server(2029): pocketmine\Server->start(boolean)
#13 /src/pocketmine/PocketMine(465): pocketmine\Server->__construct(pocketmine\CompatibleClassLoader object, pocketmine\utils\MainLogger object, string /Users/Ronny/Desktop/V5/, string /Users/Ronny/Desktop/V5/, string /Users/Ronny/Desktop/V5/plugins/)

Genisys version: 1.1dev #0 [Protocol 45; API 2.0.0]
uname -a: Darwin iMac-van-Ronny-8.local 15.2.0 Darwin Kernel Version 15.2.0: Fri Nov 13 19:56:56 PST 2015; root:xnu-3248.20.55~2/RELEASE_X86_64 x86_64
PHP version: 7.0.2
Zend version: 3.0.0
OS : Darwin, mac

Loaded plugins:
加载的插件:
1vs1 0.0.6 by  for API(s) 1.0.0, 1.1.0
AdvancedKits 4.0.1 by luca28pet for API(s) 1.12.0
AdvertisingKick 1.0.0 by  for API(s) 1.0.0
BloodFX 1.1.0 by hoyinm14mc & CyberCube-HK Team for API(s) 1.12.0
Broadcaster 1.16 by EvolSoft for API(s) 1.12.0
ChatLogin 1.4 by EvolSoft for API(s) 1.11.0
ClearLagg 1.1.0 by LegendOfMCPE for API(s) 1.0.0
ColorMatch 1.1.1 by CreeperFace for API(s) 1.12.0
CustomAlerts 1.6 by EvolSoft for API(s) 1.12.0
DevTools 1.10.0 by PocketMine Team for API(s) 1.3.1
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
EconomyShop 2.0.7 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
GoogleAnalytics 1.0.0 by  for API(s) 1.0.0
HealthTag 1 by EnderKenji for API(s) 1.3.1
ItemCasePE 1.0.8 by aliuly for API(s) 1.10.0, 1.13.0
KillMoneyFix 1 by CrazedMiner for API(s) 1.8.0
LIAB 1.0.0 by aliuly for API(s) 1.10.0
LinkSlots 1.0.0 by kvetinac97 for API(s) 1.12.0
ManyWorlds 2.0.3 by aliuly for API(s) 2.0.0
MSpawns 1.5 by EvolSoft for API(s) 1.11.0
Parkour 2.0.0 by Driesboy for API(s) 1.0.0
PurePerms 1.3.0-BETA-1 by 64FF00 for API(s) 1.13.0
RestartMe 1.1.0 by Gamecrafter for API(s) 1.10.0
RocketPads 1.0.0 by Gamecrafter for API(s) 1.12.0
ServerAuth 2.13 by EvolSoft for API(s) 1.11.0
Slapper 1.2.9.3_PHP7 by jojoe77777 for API(s) 1.12.0
TapToDo 2.1.2 by Falk for API(s) 1.0.0
VIPSlots 0.0.4 by iJoshuaHD for API(s) 1.12.0
VoteReward 3.0.2 by LDX for API(s) 1.12.0, 2.0.0
WorldFixer 1 by CreeperFace for API(s) 1.12.0
WorldProtect 2.2.0 by aliuly for API(s) 1.10.0, 1.12.0
KillRate 2.1.1 by aliuly for API(s) 2.0.0
MyPlot 1 by Wies and Exxarion for API(s) 1.0.0
PureChat 1.3.4-INDEV by 64FF00 for API(s) 1.11.0
PeratX commented 8 years ago

Seems you are using a PC map!

dries-c commented 8 years ago

yes

dries-c commented 8 years ago

how i fix this

dries-c commented 8 years ago

its only if i go to a specific place not on join

PeratX commented 8 years ago

Yes. Read chunk -> spawn entity -> crash!

dries-c commented 8 years ago

clearlagg !!!

PeratX commented 8 years ago

I have push a commit to prevent this.

dries-c commented 8 years ago

ok

dries-c commented 8 years ago

work

dries-c commented 8 years ago

:+1:

gaoyichuan commented 8 years ago

@PeratX You are wrong. The code has bug. I have discussed with @PEMapModder about it and we got a possible solution

dries-c commented 8 years ago

ok

PeratX commented 8 years ago

A new fix has pushed