The missing MCM

Recently I received a report from one of my testers about an unusual bug. They reported that the MCM (Mod Configuration Menu) was missing. I found this to be a very odd report. Yagisan’s Expanded Skyrim is configured in such a way that the MCM must load, before Yagisan’s Expanded Skyrim can configure itself and run. They reported that the mod was working correctly, but there was no MCM. They were not sure how long the menu had been missing, as it had not been checked for some time.

Confirmation

I needed to reproduce this bug myself for confirmation. As I had not touched the MCM script in months, I doubted it was something I did. I suspected it was probably a user error such as an old SkyUI. I loaded up the current version and watched the diagnostic messages scroll away. Everything looked fine. Then I opened the MCM. There was no menu at all. My tester had found a real bug, and with this I had three sudden insights. Firstly, no one uses the MCM to customise Yagisan’s Expanded Skyrim. Secondly, no one knew exactly how long this bug had existed. Thirdly, I need more coffee.

The search begins

I looked into the papyrus log for any clues that could help me pinpoint the error. One line stood out among all the others:

[10/20/2015 - 02:22:17AM] [YES_Companions_SmartCasting_Config <YES_Companions_SmartCast_MCM (B9241B05)>]: Registered  at MCM.

I understood from this that the MCM loaded but did not display. I looked at the current status of Yagisan’s Expanded Skrim. There was no obvious error that I could see. I needed a way to go back, and find out when this bug was introduced, so I could stomp it.  Unfortunately I don’t have a DeLorean. That left only one other option – subversion.

We have to go back!

From the day I began Yagisan’s Expanded Skyrim I have regularly used subversion to do version control in anticipation of a day like this. I knew the bug was in the current revision, 790. The MCM wasn’t created until revision 174. After drinking large quantities of coffee, strapping a flux capacitor to my laptop and accelerating to 88 miles per hour, I arrived back at revision 495, the approximated midpoint between broken (790) and working (174). A not so quick build and install later, I could see the MCM. The bug was in a later revision. Next stop was revision 643. Again the MCM was here. I moved forward to the next mid point, revision 714. A MCM. Revision 760. A MCM. Revision 782. No MCM. Had I gone too far ? By revision 782 the bug had manifested itself. I went back, 770, a MCM. Forward, smaller hops now. 776 MCM. 779 MCM. 780 MCM. 781 No MCM.

Grays Sports Almanac

Er the bug. The bug had been identified as revision 781. I looked into the log to search for clues. There was only a single check in. The esp. The creation kit can be a fineky beast. Going back to revision 780 I took a copy of the last known working esp. I then loaded 780, and 781 into TES5edit and started searching for what was different.

There it was. The elusive missing MCM bug. When saving the esp an important property had been deleted. The logs did not mention deleting any properties, so how this came to be missing is still a mystery. I went back to revision 790. I saved and checked in my current work to revision 791. Opening up the creation kit, I carefully recreated the missing properties and loaded it in game. Success, a MCM appeared. My task complete, I checked in revision 792. Fixed the MCM.