question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

np from getPositionOnTopOf can be null and causes crash

See original GitHub issue

This section of monitorMovement

https://github.com/Karang/mineflayer-pathfinder/blob/0aaee90102c7cbc030aa3a1ec350608eae0b8d53/index.js#L214-L220

can result in np being null, even after the ‘if null’ check and assignment on line 216.

It seems to be fixed by moving the use of np further down to here:

https://github.com/Karang/mineflayer-pathfinder/blob/0aaee90102c7cbc030aa3a1ec350608eae0b8d53/index.js#L270-L274

presumably because the instances where np is null is only true for the digging or placement sections (I think specifically the issue is with air blocks). Happy to put in a PR but want to check I’m on the right lines before I make any changes

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Karangcommented, Jul 15, 2020

Great, thanks. Have you tested that fix when you’re the opposite side of a river from the bot, so it has to swim to you? I applied that fix locally but was still getting it occasionally crashing and it seemed like swimming was the link between them. I’ll try and repro tomorrow if you’re not seeing it.

Edit: definitely still happens on some occasions. It’s when the bot is swimming or just about to swim I think.

Should be solved in 1.0.9

0reactions
Slord6commented, Jul 14, 2020

Great, thanks. Have you tested that fix when you’re the opposite side of a river from the bot, so it has to swim to you? I applied that fix locally but was still getting it occasionally crashing and it seemed like swimming was the link between them. I’ll try and repro tomorrow if you’re not seeing it.

Edit: definitely still happens on some occasions. It’s when the bot is swimming or just about to swim I think.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does Python crash when I try to sum this numpy array?
I can reproduce your segfault using numpy v1.8.2/PIL v1.1.7 installed from the Ubuntu repositories. If I install numpy 1.8.2 in a virtualenv ...
Read more >
clipping complex array crashes python · Issue #5354 - GitHub
import numpy as np >>> from numpy.fft import fft2 >>> size = 256 ... I have tried to remove the segmentation fault due...
Read more >
IS NULL error in Model Builder causes software crash
Hi folks, I'm using modelbuilder in ArcMap 10.3.1. I'm building a simple model to assign the neighborhood where a point is located.
Read more >
Null Dereference - OWASP Foundation
Null-pointer dereferences, while common, can generally be found and corrected in a simple way. They will always result in the crash of the...
Read more >
7 ways to null crash Android Kotlin without using - Medium
However, listed below are 7 possible ways that will crash your due to null (or something of that nature ) without using !!...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found