We have one developer machine which crashes all applications whenever it is unlocked after being locked for a while (15-30min or more I think)
The machine will start throwing an generic XXX has encountered an error and needs to close error for every running process, including the standard services seen in task manager such as ccApp, svcHost, wuauclt, etc.
My suspicion is it is memory related since that machine only has 4GB of memory and usually multiple high-memory applications are open such as Project, Visio, Blend, Visual Studio, etc.
The machine is running XP SP3.
Bad RAM and/or swapfile issues would be my guess. When you switch user/lock unlock, a lot of things get moved around in memory.
I had a similar issue awhile back. We had some software that would play sound when the user was logging in after being locked. The manufacturer mounted the speaker right above the hard drive, and swap was in use. When the speaker blasted, it caused the hard drive to have read errors, and corrupted what ended up in memory.