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

Bug: BaseBlock NullpointerException #292

Closed
Shibva opened this issue Nov 12, 2023 · 1 comment
Closed

Bug: BaseBlock NullpointerException #292

Shibva opened this issue Nov 12, 2023 · 1 comment

Comments

@Shibva
Copy link

Shibva commented Nov 12, 2023

Describe the bug
when copying a Stargate base block of any kind, the game will crash with a lang.NullpointerException

To Reproduce
Steps to reproduce the behavior:

  1. place the Stargate base block in creative
  2. use select block while holding ctrl (default keybinds CTRL+MIddleClick); this will cause the block with stored NBT to be added to the players inventory
    Expected behavior
    The game to not crash; lel

Mod version
4.11.2.4

Additional context
this issue is the same plaguing #290 and #291 so fixing this issue will fix those by proxy.
I talked with a few people about it and with their collective efforts, I managed to get some key information on this bug. It is the following:

  • It's caused when the client attempts to read blockdata; the client and servers methods of getting NBT are different, the client method is the only one that's causing a NPE, while the server's is acting fine
  • the erroring line was added in 8856f5e (found by using Blame) [at this point, the erroring line in this segment of the crash reports stacktrace would be at line 1804
  • It's not caused by another mod; Crash Report was generated in a pure (JSG only) environment and was triggered using an in-game feature [block picking with NBT data save; ctrl+middleClick by default keybinds]
  • It's not really a serialization error, this may or may not be true but I asked a developer friend of mine to take a look at this they said something about the hashmap that's associated with gatePosMap returning as null sometimes (probably because the location is not cached; idk)

Crash Report (Just JSG):
crash-2023-11-12_01.20.05-client.txt

My whole JSG config (as .zip)
Generated Config (Default) was used

why am I reposting this?
because it's over a silly little bug and after talking about It I decided to attempt to have this bug patched by gathering as much info on it as possible to put a stake through its bugged heart. This is an high-effort Stargate mod and I can see that, and for such I wish to help keep it like that by providing as much detail as I can to increase the odds of it being fixed

Anything else?
just this
image

Hope all of this helps and thanks for taking the time to read this ^w^

@MineDragonCZ
Copy link
Member

Duplicate of #290

@MineDragonCZ MineDragonCZ marked this as a duplicate of #290 Nov 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants