Mountain Lion has a confirmed bug with Macs using multiple displays, when the displays are connected to more than one video card. The symptoms of the bug are the logged in user may get forcibly logged out on a random basis, or applications may frequently unexpectedly quit.
The bug appears to be linked with changing Spaces, although some have reported it occurring when accessing features that override the entire display like Mission Control or Time Machine.
Most people experiencing this bug have Mac Pros with multiple video cards, however some owners of MacBook Pros using an external display have also been reported similar problems (models that have both an integrated Intel GPU and an NIVIDIA card).
It was hoped that the OS X 10.8.2 update would fix this bug. Initial reports are that it has for some, but not for all. Other workarounds include re-configuring the Mac so that multiple displays are only connected to one video card, or not using Spaces.