Entity Culling Fabric/Forge

Entity Culling Fabric/Forge

80M Downloads

NullPointerException triggered

d-faure opened this issue ยท 5 comments

commented

https://github.com/tr7zw/EntityCulling-Fabric/blob/b29646e3b34ed87da6ca3e3e574056250dd07363/src/main/java/dev/tr7zw/entityculling/CullTask.java#L103

[11:57:51] [CullThread/INFO]: [STDERR]: java.lang.NullPointerException: Cannot invoke "dev.tr7zw.entityculling.access.Cullable.isForcedVisible()" because "cullable" is null
[11:57:51] [CullThread/INFO]: [STDERR]: 	at dev.tr7zw.entityculling.CullTask.run(CullTask.java:103)
[11:57:51] [CullThread/INFO]: [STDERR]: 	at java.base/java.lang.Thread.run(Unknown Source)```
commented

Eh what other kinds of mods do you use? And can you send a full log.

commented
commented

I guess this is a race condition happening on world load. It doesn't crash the culling or anything, but I will fix it in the next release to prevent confusion.

commented

In fact it occurred during the game as I was rushing away from a skeleton, looking around quickly to a better position and counterattack.
I also found this exception triggering rather weird since you were explicitly catching it. Perhaps it came as I finally killed the monster, and therefore invalidate the reference. I don't know.

commented
[04:28:53] [CullThread/INFO]: [STDERR]: java.lang.NullPointerException: Cannot invoke "dev.tr7zw.entityculling.access.Cullable.isForcedVisible()" because "cullable" is null
[04:28:53] [CullThread/INFO]: [STDERR]: 	at dev.tr7zw.entityculling.CullTask.run(CullTask.java:103)
[04:28:53] [CullThread/INFO]: [STDERR]: 	at java.base/java.lang.Thread.run(Thread.java:831)

I'm also getting it from time to time without a crash, but shows in the logs.

Mods:
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]+1.17
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]+dev.22
- [email protected]
- [email protected]
- [email protected]
- [email protected]+rev.8910694-dirty
- [email protected]