PrismarineJS / mineflayer-navigate

mineflayer plugin which gives bots a high level 3d navigating API using A*
59 stars 22 forks source link

Index out of range error in buffer.js caused by A* callback #25

Open Darker opened 9 years ago

Darker commented 9 years ago

This is an error that randomly occured while my bot was walking around the world (in Nether):

  buffer.js:506
      throw new RangeError('index out of range');
      ^
  RangeError: index out of range
      at checkOffset (buffer.js:506:11)
      at Buffer.readUInt8 (buffer.js:544:5)
      at nib (C:\Users\Jakub\node_modules\mineflayer\lib\plugins\blocks.js:116:31)
      at Bot.blockAt (C:\Users\Jakub\node_modules\mineflayer\lib\plugins\blocks.js:102:22)
      at properties (C:\Users\Jakub\node_modules\mineflayer-navigate\index.js:326:25)
      at C:\Users\Jakub\node_modules\mineflayer-navigate\index.js:309:20
      at Array.forEach (native)
      at Object.getNeighbors [as neighbor] (C:\Users\Jakub\node_modules\mineflayer-navigate\index.js:187:30)
      at aStar (C:\Users\Jakub\node_modules\a-star\index.js:52:28)
      at findPathSync (C:\Users\Jakub\node_modules\mineflayer-navigate\index.js:72:19)

Probably it's checking non-existent blocks or something like that. I don't know how to fix it :(

pr3mar commented 8 years ago

I got the same problem while parsing a binary file with ~12Mx28B records . Any help?

Darker commented 8 years ago

I don't think these errors are necessarily connected. Index out of range can mean anything.