Closed bleuthoot-sven closed 4 months ago
While looking for the cause of this bug, I was able to narrow the issue down to this line:
I am not an expert in this, but I assume this happens because SignManager.reload()
gets called before it is initialized.
The constructor of SignManager
initializes BlueMapAPIConnector
. This constructor binds the onEnable
trigger to the onEnable
method in the BlueMapAPIConnector
class. onEnable
then gets called by the BlueMapAPI
and wants to run SignManager.reload()
, but the constructor has not finished executing yet. So the class does not exist yet and will cause it to fail.
Commenting that line out seemed to solve the issue without any side effects, but I don't know if this is actually the correct solution.
Thank you for this report and the debugging. I'll take a look and get an update out soon.
Unfortunately, I was unable to reproduce this. It seems like a race condition, however. I changed the SignManager singleton to be explicitly thread-safe instead of attempting to rely on the Java static initialization.
Here's an alpha release with that update: https://modrinth.com/mod/bluemap-sign-markers/version/1.21.1-0.3.4.24-alpha
I tried it again on a clean server, with only bluemap, fabric-api and the new version of bluemap-sign-markers installed. I still have the same issue that the server crashes, but the error message is different from last time:
Description of the bug
When I place as sign, the server crashes completely.
Steps to reproduce
Crashlog