ErrorAnalyzer
Add buttons to close or copy the error message. Enhance error message to helps identify possible problematic mod, or guide to corrupted machines. Error analysis: Add buttons to close or copy the error message. Assist in finding mods or buildings that may cause errors
Screenshots 1 screenshots
About this mod Author’s original text
Error Analyzer
A diagnostic tool for Dyson Sphere Program that enhances error reporting and helps identify possible problematic mods.
Features
- Close button: The top-left X button can close the error window and continue playing. (Note: the autosave is still disabled).
- Copy button: The middle button can copy the error message to the clipboard in style format.
- Inspect button: Left click to navigate to the erroring machine, right click to toggle the DEBUG tracking mode.
- Enhance Message: Show the possible candidates of the mods that may cause the error, and related patches on the stack trace.
Usage
Understanding Error Messages
When an error occurs, you'll see an enhanced error message with:
- Game version and loaded mod plugins count
- Possible mod candidates that might be causing the issue
- Error details with a cleaned-up stack trace
- Details of any related Harmony patches
Troubleshooting Mods
The error dialog will show "possible candidates" for problematic mods. This isn't always conclusive, but provides a good starting point for troubleshooting. Try:
- Disabling the suggested mods (if it is not save-dependent)
- Updating mods to their latest versions
- Checking for known conflicts between the identified mods
Navigating to Problem Entities
If an entity (factory machines, belt, etc.) is identified as part of the running error:
- Click on the [Inspect button] to enter DEBUG mode (the button will turn green)
- When the error occur again, it will capture the location and move mecha to that entity in the game world
- If the entity is not on the same planet, a navigation line will guide to the planet
- Some types of entity can only be tracked in single-threaded mode
Sharing Error Information
To report errors to mod developers:
- When an error occurs, click the [Copy button] in the dialog
- Hold Shift while clicking to include the full mod list if need
- Paste the copied text in Discord, GitHub issues, or mod forums
Example
Below is an example of the error message that can be copied to your clipboard:
Error report: Game version 0.10.32.25783 with 10 mods used.
possible candidates: [ErrorAnalyzer1.3.0][ErrorTester1.0.0]
IndexOutOfRangeException: Index was outside the bounds of the array.
StationComponent.DetermineDispatch (float shipSailSpeed, float shipWarpSpeed, int shipCarries, int priorityIndex, StationComponent gStationPool, FactoryProductionStat factoryStatPool, PlanetFactory factories, GalaxyData galaxy, TrafficStatistics tstat); (IL_0DB2)
GalacticTransport.GameTick (long time); (IL_00FD)
GameData.GameTick (long time); (IL_01DC)
GameMain.FixedUpdate (); (IL_017B)
[== Mods on stack trace ==]: [ErrorAnalyzer]
void ErrorAnalyzer.Testing.Plugin::DetermineDispatch_Postfix(); DetermineDispatch(Postfix)
Explanation:
- The first line shows the current game version and how many mod plugins loaded.
- The second line shows the mod plugins that may be involved ([ErrorAnalyzer1.3.0][ErrorTester1.0.0]).
- The error was caused by a IndexOutOfRangeException in StationComponent.DetermineDispatch function.
- "Mods on stack trace" shows the assembly name that appear on the stack trace.
- Under it shows the harmony patches on the stack trace. In this case, ErrorAnalyzer.Testing.Plugin::DetermineDispatch_Postfix() is harmony postfix to StationComponent.DetermineDispatch, which is likely the cause of the error.
Notes:
- The namespace of the function typically corresponds to the mod name and the assembly name.
- The functions listed in the patch section may not directly relate to the error’s root cause. Generally, functions higher in the stack are more likely to be the cause, but other patches not listed in the stack trace may also be involved.
- Removing the erroring machine may or may not solve the issues, so backup the save before dismantling. Sometimes you'll need more powerful purge tools e.g. Re-intialize planet in UXAssist. If they still not work then you'll have to roll back to the previous normal save.
- When the following
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.
Install these first, or the mod will not work: