Muqsit / DimensionFix

Hacks to fix ghost blocks in dimensions
https://poggit.pmmp.io/ci/Muqsit/DimensionFix
12 stars 4 forks source link

Undefined array key 8 in DimensionSpecificCompressor:92 #2

Closed xerenahmed closed 1 year ago

xerenahmed commented 1 year ago
03-29 20:38:20.908 Server CRITICAL > Could not execute asynchronous task ChunkRequestTask: Task crashed
     1 2023-03-29 20:38:20.909 Server ERROR > [World: endisland] Failed preparing chunk 0 2, retrying
     2 2023-03-29 20:38:20.911 AsyncWorker#0 CRITICAL > ErrorException: "Undefined array key 8" (EXCEPTION) in "pmsrc/plugins/Others/others/DimensionFix/src/muqsit/dimensionfi       x/DimensionSpecificCompressor" at line 92
     3 --- Stack trace ---
     4   #0 pmsrc/plugins/Others/others/DimensionFix/src/muqsit/dimensionfix/DimensionSpecificCompressor(92): pocketmine\errorhandler\ErrorToExceptionHandler::handle(int 2, st       ring[21] Undefined array key 8, string[100] /root/sky/plugins/Others/others/DimensionFix/src/muqsit/dimensionfix/DimensionSp, int 92)
     5   #1 pmsrc/plugins/Others/others/DimensionFix/src/muqsit/dimensionfix/DimensionSpecificCompressor(53): muqsit\dimensionfix\DimensionSpecificCompressor->reduceBiomePalet       tesInPayload(object pocketmine\network\mcpe\protocol\serializer\PacketSerializerContext#102886, int 6, string[9933] ................... .....................i..........       ......... .A................, int 8)
     6   #2 pmsrc/src/network/mcpe/ChunkRequestTask(79): muqsit\dimensionfix\DimensionSpecificCompressor->compress(string[9942] .M:.....M................... ..................       ...i................... .A.......)
     7   #3 pmsrc/src/scheduler/AsyncTask(90): pocketmine\network\mcpe\ChunkRequestTask->onRun()
     8   #4 (): pocketmine\scheduler\AsyncTask->run()
--- End of exception information ---
2023-03-29 20:38:20.913 Server CRITICAL > Could not execute asynchronous task ChunkRequestTask: Task crashed
2023-03-29 20:38:20.913 Server ERROR > [World: endisland] Failed preparing chunk 0 2, retrying
xerenahmed commented 1 year ago

@Muqsit do you have any idea?

Likan-dep commented 1 year ago

@Muqsit do you have any idea?

I also had such an error, we will wait for an answer from @Muqsit

Likan-dep commented 1 year ago

i use NetherGames , @Muqsit you can write this plugin for NetherGames I will be grateful !

Muqsit commented 1 year ago

This issue arises from using a fixed translation mapping of blocksPerBit -> wordLen which at the moment only has 8 entries and therefore the 8th index is undefined: https://github.com/Muqsit/DimensionFix/blob/f2739c426cdf5c348e2e0be6a5ce2c6c5ef8bfe4/src/muqsit/dimensionfix/DimensionSpecificCompressor.php#L91