I had a problem with crashes mostly when opening effects with audio running. I solved (lessened) the problem by lowering my graphics acceleration 2 notches and changing to 16 bit color.
I never had a problem while closing Sonar, but something in the file save operation could be corrupt, I'd try reinstalling both windows and sonar. If you're running Windows XP or 2000 you should partition your hard drive and install a dual boot OS for your studio work.