PlayerWeakReference or its value is null
sgdc3 opened this issue ยท 11 comments
Using Paper 1.13.1 and the latest OCM build with default config.
[OldCombatMechanics] playerWeakReference or its value is null. This should NOT happen at this stage.Please report the error on github. (write@83518921)
What build is 'latest OCM build'? 'latest' is relative to where you got it from and when...
No it doesn't show any stacktrace sadly, probably you are logging it in the wrong way and it only shows the exceptio description line.
I am really tempted to just ignore those errors now. They should not have any adverse effect, but I am kinda dumbfounded that they keep appearing and not display only once. It will try to detach itself after each error, but it won't do anything if isClosed is true. The only way for that to become true is calling detach before, which schedules the removal.
It just makes no sense and I am not able to reproduce it. Even if I manually clear out the reference in the debugger, I only get the message once or twice (until the clear code runs):
[21:28:15 INFO]: FreezingFireball[/127.0.0.1:35864] logged in with entity id 290 at ([world]1.9772669089004107, 77.0, 141.09194256807228)
[21:28:27 WARN]: [OldCombatMechanics] playerWeakReference or its value is null. This should NOT happen at this stage.Please report the error on github. (read)
>Listening for transport dt_socket at address: 5005
The worst it could do if it somehow keeps being called (and I still have no idea how that even happens) would be wasting a few CPU cycles each time for the if and super call. It should finally be killed once the player leaves.
This message is spamming the console, please consider suppressing the warning, maybe with an option.
Yea, I think I will just ignore them by default. The listener should be automatically unregistered anyways after it sent a few messages.
I will just move the detach to a slightly earlier time and then let it swallow the error.
@sgdc3 Can you check if the message still comes up with the newest test build?