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

depositall - NullPointerException #19

Closed
TheoRetisch1 opened this issue Oct 5, 2019 · 12 comments
Closed

depositall - NullPointerException #19

TheoRetisch1 opened this issue Oct 5, 2019 · 12 comments
Labels
bug Something isn't working

Comments

@TheoRetisch1
Copy link

If there are >= 8 blocks above a player >= 4 chests on top of each other, the following error occurs when sorting with depositall:
Thread-508/WARN]: Exception in thread "Thread-508" java.lang.NullPointerException
Screenshot: https://imgur.com/a/PPvar96

In all other constellations (lower height, fewer chests on top of each other) everything works fine.

AutomaticInventory 2.8.5
Paper 1.13.2 #648

@RoboMWM
Copy link
Member

RoboMWM commented Oct 5, 2019

Need the full stacktrace

@RoboMWM
Copy link
Member

RoboMWM commented Oct 5, 2019

Need the full stacktrace. If that's all that's printing, that means the full stacktrace was printed before, so either restart server and reproduce or look further back in logs

@TheoRetisch1
Copy link
Author

Thank you for the reply! You're right, here is the full stacktrace:
https://pastebin.com/9E5gTPtD

@RoboMWM
Copy link
Member

RoboMWM commented Oct 6, 2019

Uhh...... What's this? Sentry isn't in AutomaticInventory... Nor is this an error on the command...

@TheoRetisch1
Copy link
Author

TheoRetisch1 commented Oct 7, 2019

Well the first part of the error is caused for some reason by Easybackup. The second part by AutomaticInventory. However, EasyBackup is not the trigger, but only another consequence. With EasyBackup deactivated one get the same error, but only the last part of the error message: https://pastebin.com/BAWASaQv

@RoboMWM
Copy link
Member

RoboMWM commented Oct 9, 2019

Uh... getType is annotated as @NotNull and thus shouldn't ever return null...

Try reproducing without any other plugins installed?

@TheoRetisch1
Copy link
Author

Yes, the same error occurs also without plugins and also with the newest AutomaticInventory version using Paper 1.14.4.

@RoboMWM
Copy link
Member

RoboMWM commented Oct 10, 2019

Same error? Can you please paste the new stacktrace?

@TheoRetisch1
Copy link
Author

TheoRetisch1 commented Oct 10, 2019

The only difference is the thread number: https://pastebin.com/AHpdXKnB
(latest version, paper 1.14.4, no plugins enabled)

@RoboMWM
Copy link
Member

RoboMWM commented Oct 10, 2019

Line number is different to, which is what I was looking for. Thanks.

Will prepare a debug version

@RoboMWM
Copy link
Member

RoboMWM commented Oct 14, 2019

So ya that new stacktrace was helpful. Turns out the FindChestsThread will return null for Material if it searches out of bounds, but this null is never checked. There was no need to check before because Big_Scary's original code only checked if it was equal to a specific material, instead of calling a method on it.

@RoboMWM RoboMWM added the bug Something isn't working label Oct 14, 2019
@TheoRetisch1
Copy link
Author

Thank you it works perfectly fine!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants