A few questions for you.
1. Do you use on-board sound or an actual audio interface for Sonar? I ask, because you will achieve much better results by offloading all the analog/digital conversion to a dedicated audio interface, than by making your computer's CPU try to handle it.
2. Are you using ASIO4ALL? If so, be aware that a great many folks have had all sorts of errors - even just having it installed. It is at best a 'wrapper' that really uses WDM but presents itself to applications as ASIO.
3. If using ASIO drivers, if you have your default Windows Audio Device set to use the ASIO drivers of an audio interface, AND you launch Sonar, Windows and Sonar will fight over the drivers, and will likely be problematic. Even simple things like the audible sound of a mouse, can cause disruption/crashes. I have chosen to have only my high-end music applications, such as Sonar or the stand-alone versions of synths, to point to my audio interface, while I have the Windows Default Audio Device set to use my on-board sound chip. This way, I never have anything fighting over the ASIO drivers of the audio interface.
Bob Bone