MineColonies

MineColonies

65M Downloads

Client crash: MousePressed event for BO screen

TommyC81 opened this issue ยท 0 comments

commented

Is there an existing issue for this?

  • I have searched the existing issues.

Are you using the latest MineColonies Version?

  • I am running the latest beta/release version of MineColonies for my Minecraft version.
    I am also running the latest versions of other mods that are part of my problem.

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.

What were you playing at the time? Were you able to reproduce it in both settings?

  • Single Player
  • Multi Player

Minecraft Version

1.21

MineColonies Version

1.1.967-1.21.1-snapshot

Structurize Version

1.0.199-1.21.1-snapshot

Related Mods and their Versions

NeoForge 1.21.1-172

Current Behavior

Gave hay bale to builder (fulfill request), immediately frozen screen and client crash. Soft recovery, could re-connect immediately.

crash-2025-05-16_20.22.29-client.txt

Expected Behavior

Can give hay bale without crash.

Reproduction Steps

Use latest version (1.1.967-1.21.1-snapshot), give hay bale to builder, get crash.

Logs

See attached log.

Anything else?

Gemini 2.5 Pro breakdown of the crash report:

The Error:

    java.lang.NullPointerException: Cannot invoke "java.util.Collection.remove(Object)" because the return value of "java.util.Map.get(Object)" is null

    This is a very common Java error. It means the game's code tried to perform an action (in this case, .remove(Object)) on something that didn't exist (it was null).

    Specifically, it tried to get a list of items (a Collection) from a data storage structure (a Map) using a specific key. However, that key either wasn't in the map, or the list associated with that key was null. Then, it tried to remove an item from this non-existent list, leading to the crash.

What Caused It (The Code Path):

    Description: MousePressed event for BO screen

    XML res loc: minecolonies:gui/citizen/requests.xml (from "-- BO screen mouse event details --")

    This tells us the crash happened when you clicked your mouse (specifically, the left mouse button, GLFW mouse key value: 0) within a MineColonies GUI. The "BO screen" refers to a screen built with the BlockUI library, and the requests.xml points directly to the citizen requests window in MineColonies.

    The crash occurred in com.minecolonies.core.colony.buildings.views.AbstractBuildingView.onRequestedRequestComplete(...). This suggests you clicked a button related to completing or fulfilling a citizen's request.

    The problem seems to be that when trying to process the completion of this request, the mod couldn't find the necessary data (the collection of requests to remove the completed one from).

Key Mods Involved:

    [email protected]: This is the primary mod responsible. The version 1.1.967-1.21.1-snapshot is important. "Snapshot" means it's a development or pre-release version, which is more likely to contain bugs than a stable release.

    [email protected]: This is a library mod that MineColonies (and its dependency Structurize) uses to create its complex GUIs. It's also a "snapshot" version.

    structurize (likely also a snapshot, given the pattern, though not directly in the top lines of the stack trace) is a core dependency for MineColonies.

In Simple Terms:
You clicked a button in the MineColonies citizen request GUI (likely to fulfill a request or similar action). The MineColonies mod then tried to update its internal list of requests for that citizen or building, but it couldn't find the list it was looking for, or the specific request to remove wasn't properly tracked. This caused the game to crash.

Footer


Viewers

  • 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.