MineColonies

MineColonies

53M Downloads

[BUG] Guards causing server crash

efrainesquivel opened this issue ยท 1 comments

commented

Is there an existing issue for this?

  • I have searched the existing issues

Are you using the latest MineColonies Verison?

  • I am running the latest alpha version of MineColonies for my Minecraft version.

Did you check on the Wiki? or ask on Discord?

  • I checked the MineColonies Wiki and made sure my issue is not covered there. Or I was sent from discord to open an issue here.

Minecraft Version

1.19.2

MineColonies Version

1.0.1392-ALPHA

Structurize Version

1.0.491-ALPHA

Related Mods and their Versions

Forge Version: forge-1.19.2-43.2.6
BlockUI Version: 1.19-0.0.64-ALPHA
Domum Ornamentum Version: 1.19-1.0.76-ALPHA-universal

Current Behavior

After a random amount of time, a guard will cause the server to crash.

Expected Behavior

No server crashes.

Reproduction Steps

  1. Own a colony with guards in a barracks tower using version 1.0.1341-ALPHA on a server.
  2. Update to version 1.0.1392-ALPHA.
  3. Log in and stay in the colony for about 30 minutes.
  4. Server will crash with the exception "Accessing LegacyRandomSource from multiple threads".

Logs

https://gist.github.com/efrainesquivel/845e53d698e42e238e24e58965790671

Anything else?

This issue started occurring after I updated to version 1.0.1391-BETA from 1.0.1341-ALPHA. After several crashes, I updated to the current latest version 1.0.1392-ALPHA with the same results. No other mods were updated or added to the existing list of mods.

I know it's only guards that cause the server to crash because each crash report lists the entity with their name. The name matches one of the colony guards. You can also see in the crash report that they are wearing armor/weapons.

The issue only occurs if I'm in the colony. Looking at the stacktrace, this aligns with the client-side check in com.minecolonies.api.entity.citizen.AbstractCivilianEntity.java:114.

It does appear that the guards affected by this bug are older guards that were already in my colony before I updated (assuming citizen IDs are incremental). Not sure if that's helpful, but it's something I noticed. After each crash, I tried firing and then rehiring the affected guard as well as pausing and resetting. Before this latest crash, I fired and rehired every guard (60+) without success.

I have 14 other crash reports that I can provide; however, they are all similar to the one I've provided in the gist with the exception of the citizen entity being different.

  • Add a thumbs-up to the bug report if you are also affected. This helps the bug report become more visible to the team and doesn't clutter the comments.
  • Add a comment if you have any insights or background information that isn't already part of the conversation.
commented

fix pushed