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 when loading the chunk whit a redstone system #86

Closed MrBlasyMSK closed 2 years ago

MrBlasyMSK commented 2 years ago

Describe the bug I tried to check my redstone system, the chunk was not loaded and when I went to the map it crashed.

To Reproduce Steps to reproduce the behavior:

  1. Creates a redstone system
  2. Restart the server
  3. Enter and load the chunk with the redstone system
  4. Crash

Screenshots or videos https://streamable.com/5c3pcs

OS and versions

Plugins

Plugins (5): AutoClearChunk v2.2.1, MultiWorld v1.7.0-beta4, RedstoneCircuit v3.0.4, VanillaGenerator v0.0.4, theSpawn v1.7.0

I can't test it with less plugins

Crashdump, backtrace or other files

PocketMine-MP Crash Dump Thu Mar 24 18:54:59 UTC 2022

Error: Undefined array key 13
File: plugins/RedstoneCircuit_dev-76.phar/src/tedo0627/redstonecircuit/block/BlockTable
Line: 69
Type: ErrorException

THIS CRASH WAS CAUSED BY A PLUGIN
BAD PLUGIN: RedstoneCircuit

Code:

Backtrace:
#0 plugins/RedstoneCircuit_dev-76.phar/src/tedo0627/redstonecircuit/block/BlockTable(69): pocketmine\errorhandler\ErrorToExceptionHandler::handle(integer 2, string[22] Undefined array key 13, string[108] phar:///home/container/plugins/RedstoneCircuit_dev-76.phar/src/tedo0627/redstone, integer 69)
#1 plugins/RedstoneCircuit_dev-76.phar/src/tedo0627/redstonecircuit/block/MovingBlockTrait(80): tedo0627\redstonecircuit\block\BlockTable->getStates(integer 251, integer 13)
#2 plugins/RedstoneCircuit_dev-76.phar/src/tedo0627/redstonecircuit/block/mechanism/BlockPiston(236): tedo0627\redstonecircuit\block\mechanism\BlockMoving->setMovingBlock(object tedo0627\redstonecircuit\block\power\BlockObserver#612625, object tedo0627\redstonecircuit\block\entity\BlockEntityObserver#612663)
#3 plugins/RedstoneCircuit_dev-76.phar/src/tedo0627/redstonecircuit/block/mechanism/BlockPiston(108): tedo0627\redstonecircuit\block\mechanism\BlockPiston->pull()
#4 pmsrc/src/world/World(850): tedo0627\redstonecircuit\block\mechanism\BlockPiston->onScheduledUpdate()
#5 pmsrc/src/world/World(807): pocketmine\world\World->actuallyDoTick(integer 323)
#6 pmsrc/src/world/WorldManager(362): pocketmine\world\World->doTick(integer 323)
#7 pmsrc/src/Server(1775): pocketmine\world\WorldManager->tick(integer 323)
#8 pmsrc/src/Server(1657): pocketmine\Server->tick()
#9 pmsrc/src/Server(1046): pocketmine\Server->tickProcessor()
#10 pmsrc/src/PocketMine(304): pocketmine\Server->__construct(object BaseClassLoader#2, object pocketmine\utils\MainLogger#3, string[16] /home/container/, string[24] /home/container/plugins/)
#11 pmsrc/src/PocketMine(327): pocketmine\server()
#12 pmsrc(11): require(string[60] phar:///home/container/PocketMine-MP.phar/src/PocketMine.php)

PocketMine-MP version: 4.2.4 [Protocol 486]
Git commit: 05a5e5eac126064583af2e892cb9b3cc0b0a88b6
uname -a: Linux 40988d2c-8e2a-4b5a-ab32-2bc6e7d3056e 5.4.0-100-generic #113-Ubuntu SMP Thu Feb 3 18:43:29 UTC 2022 x86_64
PHP Version: 8.0.16
Zend version: 4.0.16
OS: Linux, linux
Composer libraries: 
- adhocore/json-comment 1.1.2@fc2f76979f0a44a5f5bc2a2b600d0762fe0e78e7
- brick/math 0.9.3@ca57d18f028f84f777b2168cd1911b0dee2343ae
- daverandom/callback-validator unknown@unknown
- fgrosse/phpasn1 v2.4.0@eef488991d53e58e60c9554b09b1201ca5ba9296
- netresearch/jsonmapper v4.0.0@8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d
- pocketmine/bedrock-data 1.6.0+bedrock-1.18.10@e98c511584a7bd58a95986374d2df4b04c6a2ba0
- pocketmine/bedrock-protocol 8.0.1+bedrock-1.18.10@a740f6095b35278c0e0dac6db84a5e4d2456b113
- pocketmine/binaryutils 0.2.4@5ac7eea91afbad8dc498f5ce34ce6297d5e6ea9a
- pocketmine/callback-validator 1.0.3@64787469766bcaa7e5885242e85c23c25e8c55a2
- pocketmine/classloader 0.2.0@49ea303993efdfb39cd302e2156d50aa78209e78
- pocketmine/color 0.2.0@09be6ea6d76f2e33d6813c39d29c22c46c17e1d2
- pocketmine/errorhandler 0.6.0@dae214a04348b911e8219ebf125ff1c5589cc878
- pocketmine/locale-data 2.4.3@4d0b081f1a79407e087968ea76aaf330db6ea2b5
- pocketmine/log 0.4.0@e6c912c0f9055c81d23108ec2d179b96f404c043
- pocketmine/log-pthreads 0.4.0@61f709e8cf36bcc24e4efe02acded680a1ce23cd
- pocketmine/math 0.4.2@aacc3759a508a69dfa5bc4dfa770ab733c5c94bf
- pocketmine/nbt 0.3.2@3e0d9ef6b6c5fb45e3745a121296e75631b3eefe
- pocketmine/pocketmine-mp 4.2.4@05a5e5eac126064583af2e892cb9b3cc0b0a88b6
- pocketmine/raklib 0.14.3@4798576fec0364266dce23b368a7fec5e5de7927
- pocketmine/raklib-ipc 0.1.1@922a6444b0c6c7daaa5aa5a832107e1ec4738aed
- pocketmine/snooze 0.3.1@0ac8fc2a781c419a1f64ebca4d5835028f59e29b
- ramsey/collection 1.2.2@cccc74ee5e328031b15640b51056ee8d3bb66c0a
- ramsey/uuid 4.2.3@fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df
- rhumsaa/uuid unknown@unknown
- symfony/polyfill-ctype v1.25.0@30885182c981ab175d4d034db0f6f469898070ab
- symfony/polyfill-php80 v1.25.0@4407588e0d3f1f52efb65fbe92babe41f37fe50c
- symfony/polyfill-php81 v1.25.0@5de4ba2d41b15f9bd0e19b2ab9674135813ec98f
- webmozart/assert 1.10.0@6964c76c7804814a842473e0c8fd15bab0f18e25
- webmozart/path-util 2.3.0@d939f7edc24c9a1bb9c0dee5cb05d8e859490725
tedo0627 commented 2 years ago

I can confirm this bug. I will fix it.

tedo0627 commented 2 years ago

I have fixed it. Thank you.