Riven crash on save/load
After completing realMyst (and enjoying it a lot), I decided to get the sequal, Riven.
Riven was originally written for Windows 98 and has a number of known problems running on Windows XP, Windows Vista and Windows 7. Most of the problems have been fixed through patches, changes to settings or other work-arounds.
At first Riven wouldn’t launch, so I tried changing compatibility mode to Windows 95 – which sorted that problem out. The next problem I encountered after playing for a while; I decided it would be a good idea to save the game, which is exactly when disaster struck. Riven packed up completely, no error dialogues, no crash dumps, it just disappeared from the screen and returned me to the desktop.
I tried to save and load a few more times but each time the same result, so I did a bit of Googling and discovered a few people with a similar problem on various forums. Some people had managed to fix their problem simply by creating a new game folder and and copying the files across, as follows:
- Navigate to C:\program files\
- Create a new Riven directory.
- Copy the contents of the old Riven directory (except the “data” folder) to the new Riven directory.
- In the new Riven directory create a new folder named “data”.
- Copy the contents of the old “data” folder into the new one.
This particular procedure didn’t work for me, so I decided to investigate further and fired up my favourite debugger, OlyDbg; as riven needed to be run in compatibility mode, I decided to run OllyDbg in the same mode and then launch Riven from there. Unexpectedly, however, as soon as I clicked”File>Open”, OllyDbg crashed, leading me to believe there was perhaps a problem with the GetOpenFileName API in compatibility mode.
Changing tack, I launched Riven in compatibility mode and OllyDbg in “ordinary” mode and attached the debugger. I then set a breakpoint on Comdlg32.dll’s GetOpenFileName export and proceeded to attempt to open a saved game in Riven. The breakpoint triggered, indicating that the program was crashing after the call, not before – this was a good sign as it meant that there was probably an unhandled return value or something similar.
After setting a breakpoint on the ret instruction at the end of the API stub, I pressed Run and Olly immediately returned with an access violation (attempting to access 0x000004). I tried repeating the steps a few times to see if it was always the same error – it was. I decided the best course of action was to look at the parameters being passed in via pOpenfilename and check that the structure was valid, when I noticed that the current module was “GrooveUT”. Bringing up the Executable Modules window, I quickly spotted “c:\Program Files\Microsoft Office\Office12\GrooveUtil.dll”.
Why is an office component loaded into Riven? GroveUtil is a shell extension that can be used for syncing files and is part of the Groove application, but for some unknown reason it is loaded into every running application.
Since I don’t use Groove I decided to uninstall it:
- Open “Control Panel”.
- Open “Add or Remove Programs”.
- Scroll down to “Microsoft Office” (I am using 2007).
- Click “Change”.
- Remove the component “Microsoft Office Groove”.
- Restart your computer.
- Enjoy Riven.
Update: This fixed the OllyDbg crashing under compatibility mode bug also.
Update 2: Official Microsoft instructions for uninstalling Groove: http://support.microsoft.com/kb/907504 – Thanks to Paul W.