Skip to content

ConcurrentModificationException due to non-thread-safe code ran during FMLCommonSetupEvent #38

@ChampionAsh5357

Description

@ChampionAsh5357

Looking at FMLCommonSetupEvent, the compostables map is updated. The map itself is a hashmap being updated during an asynchronous event. As such, a CME can be thrown if another mod, say for example, Twigs updates the compostables map at the same time.

This can be fixed by wrapping the non-thread-safe code using #enqueueWork provided by the event.

This issue was reported in the following Forge forum post.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions