For what it's worth, in case anyone else stumbles upon this like I did when I had a the same problem, I thought I'd post a simpler solution that I found.
When the problem occurred, the desktop / screen saver preferences wouldn't load, and neither would several other panes. I happened to notice in Activity Monitor, when viewing All Processes, that there was one taking a lot of CPU for no apparent reason. It was a process called Dock. I selected it and told it to Quit (didn't have to Force Quit, but that would probably work if Quit doesn't). It dropped my dock off the screen and got rid of my desktop wallpaper for a few seconds, then the Dock restarted, and wasn't taking full CPU any more. I also found I could open the desktop preferences pane again.
Later, the problem reoccurred, and even though Dock wasn't taking excessive CPU at the time, restarting Dock worked again to get me back into the preferences. Just thought I'd post here in case it helps someone else like it did me.