Hi, My server keeps crashing every few hours with this crash log. This has been happening for a very long time and idk how to fix it. Crash dump: Code: PocketMine-MP Crash Dump Fri Dec 30 17:19:46 GMT 2016 Error: Object of class pocketmine\level\Level could not be converted to string File: /src/pocketmine/Server Line: 1080 Type: E_RECOVERABLE_ERROR Code: [1071] /** [1072] * @param string $name [1073] * [1074] * @return bool [1075] */ [1076] public function isLevelGenerated($name){ [1077] if(trim($name) === ""){ [1078] return false; [1079] } [1080] $path = $this->getDataPath() . "worlds/" . $name . "/"; [1081] if(!($this->getLevelByName($name) instanceof Level)){ [1082] [1083] if(LevelProviderManager::getProvider($path) === null){ [1084] return false; [1085] } [1086] } [1087] [1088] return true; [1089] } [1090] Backtrace: #0 (): pocketmine\Server->crashDump(boolean) PocketMine-MP version: 1.6.2dev #0 [Protocol 100; API 3.0.0-ALPHA1] 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 Please help.
Oops 1.6.2. It looks like somewhere in your server, or one of your plugins, tried to pass Level object through. Have you try removing all the Plugins for a moment?
I have no idea what this means. Probably will never be able to fix it :/ What sort of code using level stuff would cause this issue. I can then look thru plugin codes to see the culprit
shows your plugins list?(/plugins) i recon i can try to help and even fix that as if it is a quite simple careless mistake of not passing the name
clearlag, economy land just blind guesses no clear idea since anything could just check for if X level is loaded
Iv had clearlag and economy land for about a year and never did the server crash for this reason till about 1-2 months ago
How can you forget it if a broken one is right at the first post? And that reminds me that no-one ever has found out why tf they sometimes break on windows. I guess #BlameMicrosoftSoHard
what about the console backtrace? they often said XX/YY/Main on line X called Y...... and it works on windows; for me at least
How do I get a backtrace? I use a host where I only have access to the files and the php binary is not editable
Thanks i will enable that and see what it shows. meanwhile, after looking thru the plugins, the ColorMatch plugin is the only plugin where isLevelGenerated is used the most. its also a fairly recently installed plugin. Places iv found this: PHP: if(!$this->getServer()->isLevelGenerated($this->cfg->getNested('lobby.world'))){ $this->getServer()->generateLevel($this->cfg->getNested('lobby.world')); PHP: if(!$this->plugin->getServer()->isLevelGenerated($this->data['arena']['arena_world'])){ PHP: if(!$this->plugin->getServer()->isLevelGenerated($this->data['arena']['leave_position_world'])){
The ColorMatch plugin was the culprit. Any idea how I can fix this plugin to stop it crashing cos of this "isLevelGenerated" thing? Any help would be much appreciated
So how would I do that? like: if(!$this->plugin->getServer()->isLevelGenerated($this->getServer->getLevel("worldname")){ ?
Sorry I'm fairly new to all this so I don't really get how I would change the original code to what your saying. would this work? $level = $this->getServer()->getLevelByName($this->data['arena']['arena_world']); if(!$this->getServer()->isLevelGenerated($level); If I'm wrong please tell me what would be the exact code I would replace the original with. Sorry for the inconvinence.
no problem hm can you upload the code full code of the .php that is causing issue? you could try $level = $this->data['arena']['arena_world'];