From 105d2a372ebac68787e890afdcbaa342cb085357 Mon Sep 17 00:00:00 2001 From: Phantomical Date: Thu, 16 Jul 2026 19:46:02 -0700 Subject: [PATCH 1/2] Disable EditorAnimatedPartsShipModified if DMOS is installed DMSoilMoisture.OnStop infinitely recurses and causes KSP to crash whenever it is called. The EditorAnimatedPartsShipModified patch ends up calling OnStop on pretty much every IScalarModule, so it ends up running into this crash where nothing else did before. Fixes #409 --- .../MMPatches/ModSupport/DMagicOrbitalScience.cfg | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 GameData/KSPCommunityFixes/MMPatches/ModSupport/DMagicOrbitalScience.cfg diff --git a/GameData/KSPCommunityFixes/MMPatches/ModSupport/DMagicOrbitalScience.cfg b/GameData/KSPCommunityFixes/MMPatches/ModSupport/DMagicOrbitalScience.cfg new file mode 100644 index 00000000..fdda07e3 --- /dev/null +++ b/GameData/KSPCommunityFixes/MMPatches/ModSupport/DMagicOrbitalScience.cfg @@ -0,0 +1,12 @@ +// DMSoilMoisture.OnStop causes a stack overflow when called. The +// EditorAnimatedPartsShipModified patch calls OnStop on all IScalarModules on +// the ship. It ends up triggering the stack overflow which then crashes KSP. +// +// We disable the patch if DMagicOrbitalScience is installed to avoid this. +// +// See https://github.com/KSPModdingLibs/KSPCommunityFixes/issues/409 + +@KSP_COMMUNITY_FIXES:NEEDS[DMagicOrbitalScience] +{ + @EditorAnimatedPartsShipModified = false +} From 383cadd05b663dd9ea9e8f813702e2c61e35d03c Mon Sep 17 00:00:00 2001 From: Phantomical Date: Sat, 18 Jul 2026 21:20:37 -0700 Subject: [PATCH 2/2] Add CHANGELOG entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c2688854..0b786728 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ##### Unreleased **Bug Fixes** - **EditorAnimatedPartsShipModified** : Fixed a memory leak ([issue #396](https://github.com/KSPModdingLibs/KSPCommunityFixes/issues/396)) where listeners were not properly cleaned up. +- **EditorAnimatedPartsShipModified** : This patch is now disabled if DMagic Orbital Science is installed because DMagic Orbital Science has a bug that causes a stack overflow crash if you ever call `DMSoilMoisture.OnStop`, which this patch does. ##### 1.41.1 **Bug Fixes**