• SONAR
  • [resolved] sonarstd.exe still runs after I close and exit program
2014/01/01 07:48:32
JimmyBoy
Hi All,
 
I've noticed after I shutdown and close sonar X3d, I can't re-start the program again until I restart my PC. 
 
I later found after running task manager there is a sonarstd.exe process still running even after I shut it down.
 
I can simply end the process from task manger and then start sonar again...
 
I've dumped the process, ran a quick windows dump analysis, seems the sonarstd process is waiting for object call to ntdll to return...
 

 
ntdll!NtWaitForSingleObject+0xa:
00007ffe`98a665ba c3              ret
 
 
 
STACK_TEXT: 
00000000`0013fb48 00007ffe`96101148 : 00000000`00000000 00000000`0013fb90 00000000`0013fba0 00000000`0410f890 : ntdll!NtWaitForSingleObject+0xa
00000000`0013fb50 00007ffe`93078dbb : 00000000`000000c0 00000000`00000000 00000000`00000000 00000000`00000560 : KERNELBASE!WaitForSingleObjectEx+0x94
00000000`0013fbf0 00007ffe`93079280 : 00000000`028105a0 00000000`02876620 00000000`00000000 00000001`40f6d608 : wdmaud!CWAVRenderer::FreeResources+0x8f
00000000`0013fc20 00007ffe`93077771 : 00000000`00000000 00007ffe`90eb6d76 00000000`00000000 00000000`00000000 : wdmaud!CWAVRenderer::Shutdown+0x10
00000000`0013fc50 00007ffe`93077aed : 00000000`0013fcc0 00007ffe`90c16338 00000001`00000000 00000000`00000000 : wdmaud!CMIDISynthTask::MODMClose+0x1e
00000000`0013fc80 00007ffe`9306c2f4 : 00000000`0000000c 00007ffe`00000000 00000000`107e43a0 00000000`00000000 : wdmaud!SwModMessage+0xb5
00000000`0013fcb0 00007ffe`90ec6cc4 : 00000000`028716b0 00000000`0013fe80 00000000`00000000 00000000`00000000 : wdmaud!CBusIds::CBusIds+0x2818
00000000`0013fcf0 00000001`403c4426 : 00000000`028716b0 00000000`0013fe80 00000000`00000000 00000001`40f6d608 : WINMMBASE!midiOutClose+0x9c
00000000`0013fd30 00000001`403c43d4 : 00000000`028716b0 00000000`00000000 00000000`0013fe80 00000001`403c2cb2 : SONARSTD+0x3c4426
00000000`0013fd70 00000001`403c6334 : 00000000`00000000 00000000`00000000 ffffffff`fffffffe 00000000`00000000 : SONARSTD+0x3c43d4
00000000`0013fda0 00000001`4038748b : 00000000`00000000 00000000`00000000 ffffffff`fffffffe 00000001`411ef220 : SONARSTD+0x3c6334
00000000`0013fdd0 00000001`405995af : 00000001`411c3510 00000000`00000000 00000000`00000000 ffffffff`00000006 : SONARSTD+0x38748b
00000000`0013fe00 00000001`40596ed7 : 00000001`00000001 00000001`00000001 00000000`00000001 00000000`00000001 : SONARSTD+0x5995af
00000000`0013feb0 00007ffe`6d72cf4a : 00000000`00000001 00000000`043bad18 00000000`0013fee8 00000000`00000001 : SONARSTD+0x596ed7
00000000`0013fee0 00000001`404aa6f6 : 00000000`00000001 00000000`00000000 00000000`00000000 00000000`0000001f : mfc110u!AfxWinMain+0xa6
00000000`0013ff20 00007ffe`983515cd : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : SONARSTD+0x4aa6f6
00000000`0013ff60 00007ffe`98a443d1 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : kernel32!BaseThreadInitThunk+0xd
00000000`0013ff90 00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ntdll!RtlUserThreadStart+0x1d
 
 
 
0:000> ~* k
 
.  0  Id: 2b18.29a4 Suspend: 0 Teb: 00007ff5`ffffc000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`0013fb48 00007ffe`96101148 ntdll!NtWaitForSingleObject+0xa
00000000`0013fb50 00007ffe`93078dbb KERNELBASE!WaitForSingleObjectEx+0x94
00000000`0013fbf0 00007ffe`93079280 wdmaud!CWAVRenderer::FreeResources+0x8f
00000000`0013fc20 00007ffe`93077771 wdmaud!CWAVRenderer::Shutdown+0x10
00000000`0013fc50 00007ffe`93077aed wdmaud!CMIDISynthTask::MODMClose+0x1e
00000000`0013fc80 00007ffe`9306c2f4 wdmaud!SwModMessage+0xb5
00000000`0013fcb0 00007ffe`90ec6cc4 wdmaud!CBusIds::CBusIds+0x2818
00000000`0013fcf0 00000001`403c4426 WINMMBASE!midiOutClose+0x9c
00000000`0013fd30 00000001`403c43d4 SONARSTD+0x3c4426
00000000`0013fd70 00000001`403c6334 SONARSTD+0x3c43d4
00000000`0013fda0 00000001`4038748b SONARSTD+0x3c6334
00000000`0013fdd0 00000001`405995af SONARSTD+0x38748b
00000000`0013fe00 00000001`40596ed7 SONARSTD+0x5995af
00000000`0013feb0 00007ffe`6d72cf4a SONARSTD+0x596ed7
00000000`0013fee0 00000001`404aa6f6 mfc110u!AfxWinMain+0xa6
00000000`0013ff20 00007ffe`983515cd SONARSTD+0x4aa6f6
00000000`0013ff60 00007ffe`98a443d1 kernel32!BaseThreadInitThunk+0xd
00000000`0013ff90 00000000`00000000 ntdll!RtlUserThreadStart+0x1d
 
   1  Id: 2b18.2adc Suspend: 0 Teb: 00007ff5`ffeb2000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`05fffe68 00007ffe`96101148 ntdll!NtWaitForSingleObject+0xa
00000000`05fffe70 00000001`40487269 KERNELBASE!WaitForSingleObjectEx+0x94
00000000`05ffff10 00007ffe`983515cd SONARSTD+0x487269
00000000`05ffff60 00007ffe`98a443d1 kernel32!BaseThreadInitThunk+0xd
00000000`05ffff90 00000000`00000000 ntdll!RtlUserThreadStart+0x1d
 
   2  Id: 2b18.2b20 Suspend: 0 Teb: 00007ff5`ffeb0000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`061ffb28 00007ffe`961012ee ntdll!NtWaitForMultipleObjects+0xa
00000000`061ffb30 00007ffe`97b943da KERNELBASE!WaitForMultipleObjectsEx+0xe1
00000000`061ffe10 00007ffe`9767166b user32!MsgWaitForMultipleObjects+0x14c
00000000`061ffec0 00007ffe`9767277c GdiPlus!BackgroundThreadProc+0x63
00000000`061fff30 00007ffe`983515cd GdiPlus!DllRefCountSafeThreadThunk+0x18
00000000`061fff60 00007ffe`98a443d1 kernel32!BaseThreadInitThunk+0xd
00000000`061fff90 00000000`00000000 ntdll!RtlUserThreadStart+0x1d
 
   3  Id: 2b18.cc Suspend: 0 Teb: 00007ff5`ffea6000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`0c50fdd8 00007ffe`913844a9 ntdll!NtWaitForMultipleObjects+0xa
00000000`0c50fde0 00007ffe`983515cd winmm!timeThread+0x8d
00000000`0c50ff60 00007ffe`98a443d1 kernel32!BaseThreadInitThunk+0xd
00000000`0c50ff90 00000000`00000000 ntdll!RtlUserThreadStart+0x1d
 
   4  Id: 2b18.2a58 Suspend: 0 Teb: 00007ff5`ffea4000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`0cbff6f8 00007ffe`961012ee ntdll!NtWaitForMultipleObjects+0xa
00000000`0cbff700 00007ffe`97eb23c2 KERNELBASE!WaitForMultipleObjectsEx+0xe1
00000000`0cbff9e0 00007ffe`97f3981e combase!WaitCoalesced+0x96 [d:\blue_gdr\com\published\comutils\coalescedwait.cxx @ 72]
00000000`0cbffc30 00007ffe`97eecd1e combase!CDllHost::MTAWorkerLoop+0x76 [d:\blue_gdr\com\combase\objact\dllhost.cxx @ 1021]
00000000`0cbffc80 00007ffe`97f110b5 combase!CDllHost::WorkerThread+0x122 [d:\blue_gdr\com\combase\objact\dllhost.cxx @ 939]
00000000`0cbffcc0 00007ffe`97f11255 combase!CRpcThread::WorkerLoop+0x31 [d:\blue_gdr\com\combase\dcomrem\threads.cxx @ 264]
00000000`0cbfff30 00007ffe`983515cd combase!CRpcThreadCache::RpcWorkerThreadEntry+0x46 [d:\blue_gdr\com\combase\dcomrem\threads.cxx @ 67]
00000000`0cbfff60 00007ffe`98a443d1 kernel32!BaseThreadInitThunk+0xd
00000000`0cbfff90 00000000`00000000 ntdll!RtlUserThreadStart+0x1d
 
   5  Id: 2b18.2be8 Suspend: 0 Teb: 00007ff5`ffea2000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`0ccffbd8 00007ffe`97b925c5 user32!NtUserGetMessage+0xa
00000000`0ccffbe0 00007ffe`97f14ce5 user32!GetMessageW+0x25
00000000`0ccffc10 00007ffe`97ee8d52 combase!CDllHost::STAWorkerLoop+0x5d [d:\blue_gdr\com\combase\objact\dllhost.cxx @ 1093]
00000000`0ccffc80 00007ffe`97f110b5 combase!CDllHost::WorkerThread+0xbe [d:\blue_gdr\com\combase\objact\dllhost.cxx @ 952]
00000000`0ccffcc0 00007ffe`97f11255 combase!CRpcThread::WorkerLoop+0x31 [d:\blue_gdr\com\combase\dcomrem\threads.cxx @ 264]
00000000`0ccfff30 00007ffe`983515cd combase!CRpcThreadCache::RpcWorkerThreadEntry+0x46 [d:\blue_gdr\com\combase\dcomrem\threads.cxx @ 67]
00000000`0ccfff60 00007ffe`98a443d1 kernel32!BaseThreadInitThunk+0xd
00000000`0ccfff90 00000000`00000000 ntdll!RtlUserThreadStart+0x1d
 
   6  Id: 2b18.f18 Suspend: 0 Teb: 00007ff5`ffea0000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`0cdffcf8 00007ffe`96101148 ntdll!NtWaitForSingleObject+0xa
00000000`0cdffd00 00000001`402aca09 KERNELBASE!WaitForSingleObjectEx+0x94
00000000`0cdffda0 00007ffe`6d6fd5f4 SONARSTD+0x2aca09
00000000`0cdffdd0 00007ffe`90bd3fef mfc110u!_AfxThreadEntry+0x100
00000000`0cdfff00 00007ffe`90bd4196 msvcr110!beginthreadex+0x107
00000000`0cdfff30 00007ffe`983515cd msvcr110!endthreadex+0x192
00000000`0cdfff60 00007ffe`98a443d1 kernel32!BaseThreadInitThunk+0xd
00000000`0cdfff90 00000000`00000000 ntdll!RtlUserThreadStart+0x1d
 
   7  Id: 2b18.291c Suspend: 0 Teb: 00007ff5`ffe9e000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`0d0ffcf8 00007ffe`96101148 ntdll!NtWaitForSingleObject+0xa
00000000`0d0ffd00 00000001`402aca09 KERNELBASE!WaitForSingleObjectEx+0x94
00000000`0d0ffda0 00007ffe`6d6fd5f4 SONARSTD+0x2aca09
00000000`0d0ffdd0 00007ffe`90bd3fef mfc110u!_AfxThreadEntry+0x100
00000000`0d0fff00 00007ffe`90bd4196 msvcr110!beginthreadex+0x107
00000000`0d0fff30 00007ffe`983515cd msvcr110!endthreadex+0x192
00000000`0d0fff60 00007ffe`98a443d1 kernel32!BaseThreadInitThunk+0xd
00000000`0d0fff90 00000000`00000000 ntdll!RtlUserThreadStart+0x1d
 
   8  Id: 2b18.710 Suspend: 0 Teb: 00007ff5`ffeb6000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`0464fcf8 00007ffe`96101148 ntdll!NtWaitForSingleObject+0xa
00000000`0464fd00 00000001`402aca09 KERNELBASE!WaitForSingleObjectEx+0x94
00000000`0464fda0 00007ffe`6d6fd5f4 SONARSTD+0x2aca09
00000000`0464fdd0 00007ffe`90bd3fef mfc110u!_AfxThreadEntry+0x100
00000000`0464ff00 00007ffe`90bd4196 msvcr110!beginthreadex+0x107
00000000`0464ff30 00007ffe`983515cd msvcr110!endthreadex+0x192
00000000`0464ff60 00007ffe`98a443d1 kernel32!BaseThreadInitThunk+0xd
00000000`0464ff90 00000000`00000000 ntdll!RtlUserThreadStart+0x1d
 

 
2014/01/01 07:52:00
JimmyBoy

0:000> !threads
Index TID   TEB    StackBase   StackLimit   DeAlloc   StackSize   ThreadProc
0 00000000000029a4 0x00007ff5ffffc000 0x0000000000140000 0x000000000011d000 0x0000000000040000 0x0000000000023000 0x0
1 0000000000002adc 0x00007ff5ffeb2000 0x0000000006000000 0x0000000005ffe000 0x0000000005f00000 0x0000000000002000 0x0
2 0000000000002b20 0x00007ff5ffeb0000 0x0000000006200000 0x00000000061fe000 0x0000000006100000 0x0000000000002000 0x0
3 00000000000000cc 0x00007ff5ffea6000 0x000000000c510000 0x000000000c50e000 0x000000000c410000 0x0000000000002000 0x0
4 0000000000002a58 0x00007ff5ffea4000 0x000000000cc00000 0x000000000cbfe000 0x000000000cb00000 0x0000000000002000 0x0
5 0000000000002be8 0x00007ff5ffea2000 0x000000000cd00000 0x000000000ccfc000 0x000000000cc00000 0x0000000000004000 0x0
6 0000000000000f18 0x00007ff5ffea0000 0x000000000ce00000 0x000000000cdf4000 0x000000000cd00000 0x000000000000c000 0x0
7 000000000000291c 0x00007ff5ffe9e000 0x000000000d100000 0x000000000d0f8000 0x000000000d000000 0x0000000000008000 0x0
8 0000000000000710 0x00007ff5ffeb6000 0x0000000004650000 0x0000000004648000 0x0000000004550000 0x0000000000008000 0x0
Total VM consumed by thread stacks 0x0004b000

2014/01/01 08:47:40
mudgel
Sometimes a MIDI device doesn't disconnect when you shut sonar down. If you have such a device trying disconnecting the USB cable before shutting down sonar. See if that works.

Without knowing more about the equipment you might have connected its hard to be more specific.
2014/01/01 09:26:21
chuckebaby
as mugel said I also think its a midi devise not letting go and the only real way to stop it is to do a hard reset of your PC
 
but I have found a way that shaves off a few minutes.
log off your PC, then log on, its almost like powering down/on but saves a lot of time.
look for a device in task manager that is still running, a midi driver perhaps.
then you will know your offender, m audio is the culprit mostly here.
 
have any m audio devices ?
2014/01/01 09:34:26
gcolbert
From some parts of the dump, it looks like Sonar is still sending audio to your audio interface.  Do you have a real long echo delay or something that keeps sending sound after the project ends?  Possibly feeding some input signal out to your soundcard even if a project is not playing?  You may want to consider turning off playing tails (trails) after project stops in preferences.
 
If manually stopping the "Audio Engine" before closing Sonar fixes the problem it is something in this neighborhood.
Glen
2014/01/01 10:26:13
robert_e_bone
Is it possible that you have one or more 32-bit plugins present in the project that is loaded when you close Sonar?  If so, it is quite possible that BitBridge may still be loaded in memory, and I believe it can hang a restart of Sonar until it gets flushed out of memory.  It is like it does not always disconnect.  I believe you would be able to see BitBridge in Task Manager, if this is the source of the issue.
 
Also, what happens if you close the project first and then terminate Sonar?  If this works, it may serve as an annoying workaround, but would be less the pain than having to restart.
 
Hope this helps, 
 
Bob Bone
 
2014/01/01 18:12:31
JimmyBoy
Hi All,
 
Thanks for your responses.
 
I don't have any USB Devices connected, I'm using internal PC sound card - just been messing around with virtual Midi Synth (CW TTS) and VSTi (Z3TA+2 interface) and routing midi tracks to them.
 
I quickly tried earlier this morning to try and replicate the problem and found that I couldn't, however I hadn't made any changes to my project which I've been testing/learning with, just haven't had the time today as I'm back to work already :(
 
Seems Sonar is waiting on wdmaud to respond before it will shutdown, I may look into running the !wdmaud cli against the current dump I have, (when I get the chance) to see if there is any more info..
 
wdmaud!CWAVRenderer::FreeResources+0x8f
wdmaud!CWAVRenderer::Shutdown+0x10
wdmaud!CMIDISynthTask::MODMClose+0x1e
wdmaud!SwModMessage+0xb5
wdmaud!CBusIds::CBusIds+0x2818
WINMMBASE!midiOutClose+0x9c
 
PS: To gcolbert, I will definitely try stopping the "Audio Engine", sounds like a good idea...
 
I'll see if the problem still exists when I finish my day job :)
 
Jim
 
 
 
 
2014/01/01 18:34:30
scook
It does not have to be an external device, SONAR is waiting on the interface driver.
2014/01/05 02:50:16
JimmyBoy
I've been able to reproduce this problem everytime by simply...
 
1. Create New Project
2. Delete Audio Tracks
3. Insert Midi Track
4. Import MIDI File
5. Drag From the Instruments the Cakewalk TTS_1 to create new Audio Track
6. Map the Output of the Midi track imported from step 4 to the Cakewalk TTS_1 Audio track
7. Play
8. Stop
9. Click on File Save
10. File Close
11. Click on exit
 
Then load up task manager and find the sonarstd.exe
 
You can create a dump of the process. Then end the process...
 
Use windbg(x64) to analyse the dmp that got generated
 

ntdll!NtWaitForSingleObject+0xa:
00007ff9`0e1565ba c3              ret
 
 
STACK_TEXT: 
00000000`0013fb48 00007ff9`0b661148 : 00000000`00000000 00000000`0013fb90 00000000`0013fba0 00000000`040ee3e0 : ntdll!NtWaitForSingleObject+0xa
00000000`0013fb50 00007ff8`f2ab8dbb : 00000000`000000c0 00000000`00000000 00000000`00000000 00000000`00000508 : KERNELBASE!WaitForSingleObjectEx+0x94
00000000`0013fbf0 00007ff8`f2ab9280 : 00000000`02830990 00000000`02870540 00000000`00000000 00000001`40f6d608 : wdmaud!CWAVRenderer::FreeResources+0x8f
00000000`0013fc20 00007ff8`f2ab7771 : 00000000`00000000 00007ff9`075a6d76 00000000`00000000 00000000`00000000 : wdmaud!CWAVRenderer::Shutdown+0x10
00000000`0013fc50 00007ff8`f2ab7aed : 00000000`0013fcc0 00007ff9`05b66338 00000001`00000000 00000000`00000000 : wdmaud!CMIDISynthTask::MODMClose+0x1e
00000000`0013fc80 00007ff8`f2aac2f4 : 00000000`0000000c 00007ff9`00000000 00000000`10cde690 00000000`00000000 : wdmaud!SwModMessage+0xb5
00000000`0013fcb0 00007ff9`075b6cc4 : 00000000`0287d280 00000000`0013fe80 00000000`00000000 00000000`00000000 : wdmaud!CBusIds::CBusIds+0x2818
00000000`0013fcf0 00000001`403c4426 : 00000000`0287d280 00000000`0013fe80 00000000`00000000 00000001`40f6d608 : WINMMBASE!midiOutClose+0x9c
00000000`0013fd30 00000001`403c43d4 : 00000000`0287d280 00000000`00000000 00000000`0013fe80 00000001`403c2cb2 : SONARSTD+0x3c4426
00000000`0013fd70 00000001`403c6334 : 00000000`00000000 00000000`00000000 ffffffff`fffffffe 00000000`00000000 : SONARSTD+0x3c43d4
00000000`0013fda0 00000001`4038748b : 00000000`00000000 00000000`00000000 ffffffff`fffffffe 00000001`411ef220 : SONARSTD+0x3c6334
00000000`0013fdd0 00000001`405995af : 00000001`411c3510 00000000`00000000 00000000`00000000 ffffffff`00000006 : SONARSTD+0x38748b
00000000`0013fe00 00000001`40596ed7 : 00000001`00000001 00000001`00000001 00000000`00000001 00000000`00000001 : SONARSTD+0x5995af
00000000`0013feb0 00007ff8`ef7bcf4a : 00000000`00000001 00000000`043c4158 00000000`0013fee8 00000000`00000001 : SONARSTD+0x596ed7
00000000`0013fee0 00000001`404aa6f6 : 00000000`00000001 00000000`00000000 00000000`00000000 00000000`0000001f : mfc110u!AfxWinMain+0xa6
00000000`0013ff20 00007ff9`0b9515cd : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : SONARSTD+0x4aa6f6
00000000`0013ff60 00007ff9`0e1343d1 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : kernel32!BaseThreadInitThunk+0xd
00000000`0013ff90 00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ntdll!RtlUserThreadStart+0x1d

STACK_COMMAND:  ~0s; .ecxr ; kb
FOLLOWUP_IP:
wdmaud!CWAVRenderer::FreeResources+8f
00007ff8`f2ab8dbb 488b4f10        mov     rcx,qword ptr [rdi+10h]

2014/01/05 03:03:06
Splat
I cannot reproduce so from my perspective I suspect it's probably system specific.
 
(Note Step 11 - To clarify I hit the X top right hand corner to close the app).
© 2026 APG vNext Commercial Version 5.1

Use My Existing Forum Account

Use My Social Media Account