Hi guys, I have finished my 1vs1 plugin. In my plugin I'm using signs for display some stats (free arenas, players in the queue..), and the stats often refresh on the sign. But there is only one error : clearChunkCache. Indeed, when I lunch my server, it crashes at randoms times by clearChunkCache. And the error is : Fatal error: Call to a member function clearChunkCache() on null in phar:///Users/Minifixio/Desktop/Server3/PocketMine-MP.phar/src/pocketmine/tile/Sign.php... Do you know it ? Is it a PockteMine bug or a bug of my plugin ? Have you already seen it ? Have you got a solution ? Please tell me because it's very important for my plugin. Thanks, Minifixio
Looks like you edited the pocketmine source. Does this error only occur when you launch the server with the plugin?
Most likely you made something in PocketMine internals null (e.g. Passed a null parameter), then PocketMine assumed the parameter is correct without checking it not null. Can you enable debug in pocketmine.yml and show us the stack trace?
Hi, I have activated the debug but I saw nothing... Here is the CrashDump file : Code: PocketMine-MP Crash Dump Tue Jul 7 21:42:08 UTC 2015 Error: Call to a member function clearChunkCache() on null File: /src/pocketmine/tile/Sign Line: 62 Type: E_ERROR Code: [53] public function setText($line1 = "", $line2 = "", $line3 = "", $line4 = ""){ [54] $this->namedtag->Text1 = new String("Text1", $line1); [55] $this->namedtag->Text2 = new String("Text2", $line2); [56] $this->namedtag->Text3 = new String("Text3", $line3); [57] $this->namedtag->Text4 = new String("Text4", $line4); [58] $this->spawnToAll(); [59] [60] if($this->chunk){ [61] $this->chunk->setChanged(); [62] $this->level->clearChunkCache($this->chunk->getX(), $this->chunk->getZ()); [63] } [64] [65] return \true; [66] } [67] [68] public function getText(){ [69] return [ [70] $this->namedtag["Text1"], [71] $this->namedtag["Text2"], [72] $this->namedtag["Text3"], Backtrace: #0 (): pocketmine\Server->crashDump() And here is the refreshSigns() function that makes my server crash : PHP: /** * Refresh all 1vs1 signs */ public function refreshSigns(){ foreach ($this->signTiles as $signTile){ $signTile->setText(OneVsOne::SIGN_TITLE, TextFormat::DARK_RED . TextFormat::BOLD . "-En attente: " . $this->getNumberOfPlayersInQueue(), TextFormat::DARK_RED . TextFormat::BOLD . "-Arenes: " . $this->getNumberOfFreeArenas(), TextFormat::GOLD . TextFormat::BOLD . "-+===+-"); } } Thanks for your help guys, Minifixio