Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointer exception when picking up pocket computers using the mouse #637

Open
imevul opened this issue Jun 22, 2024 · 1 comment
Open
Labels
bug Something isn't working Priority-Medium
Milestone

Comments

@imevul
Copy link

imevul commented Jun 22, 2024

Describe

Some peripherals that require the peripheral itself being in the world cause nullpointer exceptions (and I believe sometimes also cause client disconnects) when you have a running program on a pocket computer and pick it up using the mouse, or put it in a backpack or similar. I've seen both the GeoScanner and PlayerDetector display this issue.

Steps to reproduce

  1. Create an Advanced Geo Pocket Computer or Advanced Player Detector Pocket Computer
  2. Run a program that has an infinite loop, and continually scans using the chosen peripheral. Either scan() or getPlayerPos()
  3. Pick it up with with your mouse. This will cause a nullpointer exception, and usually causes the program to crash as well.

Multiplayer?

Yes

Version

1.20.1-0.7.39r (Latest 1.20.1)

Minecraft, Forge and maybe other related mods versions

Forge 47.2.20 - Minecraft 1.20.1

Screenshots or Videos

No response

Crashlog/log

https://pastebin.com/XJLk38WS

@imevul imevul added bug Something isn't working needs review Needs review from an Contributor labels Jun 22, 2024
@imevul
Copy link
Author

imevul commented Jun 22, 2024

Example program that can be used for testing:

local pd = peripheral.find('playerDetector')
local playerName = 'YOURPLAYERNAMEHERE'

while true do
    pd.getPlayerPos(playerName)
    os.sleep(0.05)
end

@SirEndii SirEndii moved this to Todo in Advanced Peripherals Jul 3, 2024
@SirEndii SirEndii added Priority-Medium and removed needs review Needs review from an Contributor Priority-Medium labels Jul 3, 2024
@SirEndii SirEndii added this to the 0.7.x milestone Aug 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Priority-Medium
Projects
Development

No branches or pull requests

2 participants