Processing monitoring and Settlers of Catan save failure

process monitor finding Catan issues
Some versions of Bigfish Games’ Settlers of Catan (a faithful reproduction of the board game) have a strange issue, in which under certain operating contexts, it will not save a game. The error message reported is a generic and not-at-all useful ” an error has occurred while saving “. I suspected this was due to the fact that it failed to create a savegame directory, and indeed, a bit of sleuthing indicates that on Windows XP, the directory at C:\Documents and Settings\All Users\Application Data\Microsoft\MSN Games\Catan is missing (obviously on Vista, this would be somewhere else – probably C:\Users\…). Instead of creating this directory, Catan simply fails to save the game. The program runs fine otherwise.

Of course, it was not obvious where Catan was trying to save its games – finding out that missing directory was the culprit took a bit of investigation. I took a wild stab at the start by creating a “save” directory in its own program files directory. No such luck. Time to bring out the big guns.

A number of ways could have been used, but one is to use the awesome Sysinternals tool Process Monitor, or Procmon.exe. It tracks events and calls from a process, such as filesystem accesses, and has advanced filtering capability to organize and show only the events of interest to a debugging human.

With ProcMon, I simply filtered on the Catan process and tried to save a game as foo. Then, viewing the event log (screenshot 1), it was obvious that CreateFile calls to create foo.sav failed, with the exact target path specified. A quick Windows Explorer excursion confirms that the path does not exist. Creating that directory, of course, solved the savegame problem.

The moral of the story is that ProcMon is a fine tool for tracking mysterious interactions between an application and a system. For something like failing to make a saved game (in this narrow gamig context) or various system-related errors in general (especially when you lack the source code to debug in depth), it sometimes pays to examine the exact sequence of calls and events that led up to the failure. The solution could be very trivial, if you only knew what and where things failed.

Turning off the Unused Icons Wizard

Having been pestered by the Windows XP Desktop Cleaning Wizard one too many times, I wanted to turn the bloody thing off. Turns out it was under Display -> Desktop tab -> Customize Desktop -> a check box to turn off the wizard.

Interesting that a system maintenance service is actually controlled by a setting in the same tab that sets my Desktop picture – a similar jarring mix of purposes would be rare to find in a Mac system preference panel. I ended up having to Google “unused icons” and “Windows” to find out this little piece of information.

In a timed fire event like this, a logical “opt-out” solution would have been to have the rather intrusive wizard offer an option to deactivate itself – permanently if necessary. Instead, I had to go hunt down the magical control that triggers this wizard once some number of days. This is really poorly designed, but rather symptomatic of typical Windows UIs for preferences.

Without strong cues, users tend to overlook settings that are deeply hidden. A check box on a tab, from a dialog box that is opened by some button, on a tab of a control panel, is already pushing it. Who usually explores beyond what he can skim at a glance from a control panel window? Who actually drills down regularly into all those “Advanced” and “Properties” buttons, which hide dialog boxes, which themselves possess tabs (or, dear god, another “Properties” button that opens up yet another dialog)? The problem is compounded by the fact that there lacks a sufficiently powerful search interface to find the specific setting you want from the operating system.

Conventional wisdom holds that most users never change preferences from their defaults. I keep wondering if it’s that they simply can’t find the damn thing in a reasonable amount of time, or have enough cues to know that these things can be changed. The Desktop Cleaning Wizard certainly never hinted that its presence can be made to go away. If I were a less motivated user, I’d probably settle for ignoring the notification until it goes away on its own.