Download CME is Bad — Minecraft Mods — MetaMods

CME is Bad

Active

Downloads

0

Last update

1 month ago

Versions

1.8 — 1.21.8
Client
Fabric
Forge
Neoforge
Libraries

CME is Bad - Concurrent Error Debugger for Minecraft

CME is Bad is a specialized mod for diagnosing elusive crashes in Java-based games caused by Concurrent Modification Exceptions (CME) and Index Out of Bounds Exceptions (IOOBE). Unlike standard error reports that only show the current thread stack trace, this tool provides a complete history of changes to the problematic collection.

How the Modification Works

When a critical error occurs, CME is Bad generates a detailed log of the target collection's loading and modification history, allowing precise identification of which thread and mod is causing the conflict. This is particularly useful in multithreaded scenarios common in modded Minecraft environments.

Getting Started

  1. Place the JAR file in your mods folder
  2. Add the following line to your Java Virtual Machine (JVM) arguments:
    -javaagent:mods/CMESuckMyDuck-<version>.jar=<class_full_name>;<field_name>;<type>;<phase>
  3. Launch the game - a detailed report will be generated on the next crash

Configuration Parameters

Main Agent Arguments

  • Class Full Name: Use slashes instead of dots (e.g., net/minecraft/client/audio/SoundEngine)
  • Field Name: Name of the monitored field in the target class (use SRG names for Forge)
  • Container Type: Supports List, Set, and Map
  • Phase: static for static fields, nonstatic for non-static fields

Usage Examples

CME in SoundEngine for Forge 1.16.5: -javaagent:mods/CMESuckMyDuck-1.0.0.jar=net/minecraft/client/audio/SoundEngine;field_217942_m;Map;nonstatic

CME in PotionBrewing for Forge 1.20.1: -javaagent:mods/CMESuckMyDuck-1.0.0.jar=net/minecraft/world/item/alchemy/PotionBrewing;f43494;List;static

Advanced Settings

Log Level

System property -Dcme_suck_my_duck.log_level=<level> controls log detail:

  • Level 1 (default) - logs only modifications
  • Level 0 - includes debug messages (not recommended, creates massive files)

ASM API Compatibility

For older Minecraft versions (e.g., 1.12.2), ASM API version adjustment may be needed: -Dcme_suck_my_duck.asm_api_version=5

File Size Limiting

Setting -Dcme_suck_my_duck.file_max_entries=<size> defines the maximum number of log entries (default 500). Only the last two pages of operations are preserved.

Constructor Whitelist

Allows filtering monitoring for frequently used containers: -Dcme_suck_my_duck.whitelist_constructor_stacktrace=<string>

CME is Bad transforms the complex task of debugging multithreaded errors into a clear and manageable process, saving time for modpack developers and experienced players alike.

CME Example from SimpleReloadInstance

Mod Log Example

Project members
Viola-Siemens

Viola-Siemens

Developer

Created: 19 Dec 2024

ID: 67905