tedo0627 / RedstoneCircuit

This is the PocketMine plugin that implements the Redstone circuit.
GNU General Public License v3.0
84 stars 47 forks source link

Crash PMMP 1.16.0 #109

Closed TheMicCraft closed 1 year ago

TheMicCraft commented 1 year ago

Describe the bug Server crash due to changes in the new Pocketmine version.

OS and versions

Crashdump, backtrace or other files [Server thread/CRITICAL]: ErrorException: "file_get_contents(phar:///home/container/PocketMine-MP.phar/vendor/pocketmine/bedrock-data/block_id_map.json): Failed to open stream: phar error: "vendor/pocketmine/bedrock-data/block_id_map.json" is not a file in phar "/home/container/PocketMine-MP.phar"" (EXCEPTION) in "plugins/RedstoneCircuit.phar/src/tedo0627/redstonecircuit/block/BlockTable" at line 30 --- Stack trace ---

0 (): pocketmine\errorhandler\ErrorToExceptionHandler::handle(int 2, string[255] file_get_contents(phar:///home/container/PocketMine-MP.phar/vendor/pocketmine/be, string[101] phar:///home/container/plugins/RedstoneCircuit.phar/src/tedo0627/redstonecircuit, int 30)

1 plugins/RedstoneCircuit.phar/src/tedo0627/redstonecircuit/block/BlockTable(30): file_get_contents(string[90] phar:///home/container/PocketMine-MP.phar/vendor/pocketmine/bedrock-data/block_i)

2 pmsrc/src/utils/SingletonTrait(31): tedo0627\redstonecircuit\block\BlockTable->__construct()

3 pmsrc/src/utils/SingletonTrait(36): tedo0627\redstonecircuit\block\BlockTable::make()

4 plugins/RedstoneCircuit.phar/src/tedo0627/redstonecircuit/RedstoneCircuit(237): tedo0627\redstonecircuit\block\BlockTable::getInstance()

5 plugins/RedstoneCircuit.phar/src/tedo0627/redstonecircuit/RedstoneCircuit(186): tedo0627\redstonecircuit\RedstoneCircuit::registerMappings()

6 pmsrc/src/plugin/PluginBase(76): tedo0627\redstonecircuit\RedstoneCircuit->onLoad()

7 pmsrc/src/plugin/PluginManager(216): pocketmine\plugin\PluginBase->__construct(object pocketmine\plugin\PharPluginLoader#21863, object pocketmine\Server#12, object pocketmine\plugin\PluginDescription#22156, string[43] /home/container/plugin_data/RedstoneCircuit, string[51] phar:///home/container/plugins/RedstoneCircuit.phar, object pocketmine\plugin\DiskResourceProvider#22813)

8 pmsrc/src/plugin/PluginManager(368): pocketmine\plugin\PluginManager->internalLoadPlugin(string[44] /home/container/plugins/RedstoneCircuit.phar, object pocketmine\plugin\PharPluginLoader#21863, object pocketmine\plugin\PluginDescription#22156)

9 pmsrc/src/Server(1008): pocketmine\plugin\PluginManager->loadPlugins(string[24] /home/container/plugins/, int 0)

10 pmsrc/src/PocketMine(339): pocketmine\Server->__construct(object BaseClassLoader#5, object pocketmine\utils\MainLogger#2, string[16] /home/container/, string[24] /home/container/plugins/)

11 pmsrc/src/PocketMine(362): pocketmine\server()

12 pmsrc(11): require(string[60] phar:///home/container/PocketMine-MP.phar/src/PocketMine.php)

--- End of exception information ---

tedo0627 commented 1 year ago

I will check this issue when I have time

tedo0627 commented 1 year ago

I have fixed it. Thank you.

TheLemzz commented 1 year ago

THIS CRASH WAS CAUSED BY A PLUGIN

Error: file_get_contents(/root/pm/plugins/RedstoneCircuit-master (1)/resources\block_id_map.json): Failed to open stream: No such file or directory File: plugins/RedstoneCircuit-master (1)/src/tedo0627/redstonecircuit/block/BlockTable Line: 35 Type: ErrorException

I moved the block_id_map.json to the plugin's resources folder.

tedo0627 commented 1 year ago

I did not get that error in my environment. Please let me know your environment.

tedo0627 commented 1 year ago

I was able to reproduce this error on ubuntu

tedo0627 commented 1 year ago

I have fixed it. Thank you.

TheLemzz commented 1 year ago

Thank you very much! =)