Freeze when reviewing sound files

When reviewing multiple sound files with the internal dopus player, dopus freezes after a while.

I have to say I do this very fast. I switch with the keyboard cursor keys between files and I've defined a shortcut to open the audio player. When I do an intense review session, dopus usually freezes after 2-3 minutes. But it's not 100% reproducible.

Is there anything I can do after the freeze happened, so you guys can track it down? I.e. starting VS, attaching to the dopus thread, break and send you the call stack? Would that be of any help?

Kind regards,
Skeeve

The problem could be in Opus or it could be in the system codecs involved.

If you want to send us a dump, we can probably use it to see where things are going wrong. Here's how:

While it's happening, please go to Task Manager, then the Details tab, right-click dopus.exe and select Create Dump File.

Do that 4 or 5 times, and it should create something like:

C:\Users\<username>\AppData\Local\Temp\dopus.DMP
C:\Users\<username>\AppData\Local\Temp\dopus (2).DMP
C:\Users\<username>\AppData\Local\Temp\dopus (3).DMP
C:\Users\<username>\AppData\Local\Temp\dopus (4).DMP
C:\Users\<username>\AppData\Local\Temp\dopus (5).DMP

The files will be large, but compress well.

If sending more than one file, using the 7z format instead of zip will give a much reduced size. You can do this via the Archive Files button in Opus.

Please zip or 7z the files and email them to crashdumps@gpsoft.com.au

This happened now again during intense tests.

I've created dumps by following your guide and sent a mail to the provided address.

Thanks,
Kind regards,
Skeeve

Did you get the mail with the dumps?

Kind regards,
Skeeve

Is it possible to check if disabling/uninstalling Bullguard has any effect?

There's nothing conclusive in the dumps, but BgAgent.dll does seem to have been injected into the callstack somehow in two of the threads that look involved, which makes me wonder if it is triggering some kind of problem. It's not a DLL I would expect to be in either code-path, but it looks like some kind of security tool so it may patch/hook various APIs and perhaps that is going wrong in some way.

Hi Leo,

Many thanks for your analyse.

Good point, the security software (Bullguard) definitely seems to be involved in this. I've added an exception to bullguard, that excludes the dopus process from all realtime checks and I couldn't reproduce the issue any longer so far. (It usually happened every 2-3 minutes in extensive tests)

It even seems to have effects to other issues I've had. If you're interested I keep you up to date, but still want test this for some time.

Thanks again,

Kind regards,
Skeeve

1 Like

I had this problem in the past, and still happens after upgrade to version 12, but only on my older PC running Windows 7. It has multiple audio devices, WinMM sees 11 stereo outs in total, in case it matters. The call stacks looked like it's related to unloading a sound driver.

The most reliable way to reproduce

  1. Open a folder with short (~0.5s) wav files
  2. Internal sound player enabled, set to auto-close on finish
  3. Play many sounds in quick succession, about 5 per second
  • DOpus usually freezes within ~10 seconds, but it's unpredictable.

Some of the sound player windows also fail to close on finish, even no freezing has occurred.

I'm not really comfortable with sending a full minidump - contains all kinds of personal info, file names etc. But I copied the thread info if it helps.

Threads and call stacks
Main Thread          Main Thread                dopus.exe!000000013fbf6550
>	ntdll.dll!ZwWaitForSingleObject()
 	KERNELBASE.dll!WaitForSingleObjectEx()
 	dopus.exe!000000013fbf6550()
 	dopus.exe!000000013f87f795()
 	dopus.exe!000000013f87f3b4()
 	dopus.exe!000000013fb9744e()
 	dopus.exe!000000013fb9da84()
 	user32.dll!UserCallWinProcCheckWow()
 	user32.dll!DispatchMessageWorker()
 	dopus.exe!000000013fba93cb()
 	dopus.exe!000000013fba34d0()
 	dopus.exe!000000013fba292b()
 	dopus.exe!000000014025e182()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

RPC Thread           RPC Callback Thread        ole32.dll!000007fefe2dd828
>	ntdll.dll!ZwDelayExecution()
 	KERNELBASE.dll!SleepEx()
 	ole32.dll!CROIDTable::WorkerThreadLoop(void * param) Line 1345
 	ole32.dll!CRpcThread::WorkerLoop() Line 257
 	ole32.dll!CRpcThreadCache::RpcWorkerThreadEntry(void * param) Line 63
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        crypt32.dll thread         crypt32.dll!000007fefd249bb0
>	ntdll.dll!ZwWaitForSingleObject()
 	ntdll.dll!RtlpWaitOnCriticalSection()
 	ntdll.dll!RtlEnterCriticalSection()
 	ntdll.dll!LdrUnloadDll()
 	KERNELBASE.dll!FreeLibrary()
 	crypt32.dll!FreeDllWaitForCallback(void *,unsigned char)
 	crypt32.dll!ILS_WaitForThreadProc(void *)
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        dopus.exe thread           dopus.exe!000000013f3f9cc5
>	ntdll.dll!ZwWaitForSingleObject()
 	KERNELBASE.dll!WaitForSingleObjectEx()
 	dopus.exe!000000013f3f9cc5()
 	dopus.exe!000000013f3f9c09()
 	dopus.exe!0000000140264b74()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        dopuslib.dll thread        dopus.exe!000000013f458339
>	user32.dll!NtUserGetMessage()
 	user32.dll!GetMessageW()
 	dopus.exe!000000013f458339()
 	dopuslib.dll!000007fee1f4a124()
 	dopuslib.dll!000007fee200b02c()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        dopuslib.dll thread        dopus.exe!000000013f7168fd
>	user32.dll!NtUserGetMessage()
 	user32.dll!GetMessageW()
 	dopus.exe!000000013f7168fd()
 	dopuslib.dll!000007fee1f4a124()
 	dopuslib.dll!000007fee200b02c()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        dopuslib.dll thread        dopus.exe!000000013f7b6b6f
>	user32.dll!ZwUserMessageCall()
 	user32.dll!SendMessageWorker()
 	user32.dll!SendMessageW()
 	dopus.exe!000000013f7b6b6f()
 	dopus.exe!000000013f7b6627()
 	dopus.exe!000000013f7b4626()
 	dopus.exe!000000013f768be5()
 	user32.dll!UserCallWinProcCheckWow()
 	user32.dll!DispatchMessageWorker()
 	dopus.exe!000000013fdc7157()
 	dopuslib.dll!000007fee1f4a124()
 	dopuslib.dll!000007fee200b02c()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        dopuslib.dll thread        dopus.exe!000000013f7d9627
>	ntdll.dll!ZwWaitForSingleObject()
 	KERNELBASE.dll!WaitForSingleObjectEx()
 	dopus.exe!000000013f7d9627()
 	dopus.exe!000000013f7d92c9()
 	dopuslib.dll!000007fee1f4a124()
 	dopuslib.dll!000007fee200b02c()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        dopuslib.dll thread        dopus.exe!000000013f81e254
>	user32.dll!NtUserGetMessage()
 	user32.dll!GetMessageW()
 	dopus.exe!000000013f81e254()
 	dopuslib.dll!000007fee1f4a124()
 	dopuslib.dll!000007fee200b02c()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        dopuslib.dll thread        dopus.exe!000000013f9a276e
>	user32.dll!NtUserGetMessage()
 	user32.dll!GetMessageW()
 	dopus.exe!000000013f9a276e()
 	dopuslib.dll!000007fee1f4a124()
 	dopuslib.dll!000007fee200b02c()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        dopuslib.dll thread        dopus.exe!000000013f9ace7d
>	user32.dll!ZwUserWaitMessage()
 	dopus.exe!000000013f9ace7d()
 	dopus.exe!000000013f9ac95a()
 	dopus.exe!000000013f9ac7d1()
 	dopuslib.dll!000007fee1f4a124()
 	dopuslib.dll!000007fee200b02c()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        dopuslib.dll thread        dopus.exe!000000013f9e5001
>	user32.dll!NtUserGetMessage()
 	user32.dll!GetMessageW()
 	dopus.exe!000000013f9e5001()
 	dopuslib.dll!000007fee1f4a124()
 	dopuslib.dll!000007fee200b02c()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        dopuslib.dll thread        dopus.exe!000000013fbd9e84
>	ntdll.dll!ZwWaitForSingleObject()
 	KERNELBASE.dll!WaitForSingleObjectEx()
 	dopus.exe!000000013fbd9e84()
 	kernel32.dll!UnhandledExceptionFilter()
 	ntdll.dll!string "Enabling heap debug options\n"()
 	ntdll.dll!__C_specific_handler()
 	ntdll.dll!RtlpExecuteHandlerForException()
 	ntdll.dll!RtlDispatchException()
 	ntdll.dll!KiUserExceptionDispatch()
 	dopuslib.dll!000007fee201fb12()
 	dopuslib.dll!000007fee20200da()
 	dopuslib.dll!000007fee201fefa()
 	ntdll.dll!RtlProcessFlsData()
 	ntdll.dll!LdrShutdownThread()
 	ntdll.dll!RtlExitUserThread()
 	KERNELBASE.dll!FreeLibraryAndExitThread()
 	kernel32.dll!FreeLibraryAndExitThreadStub()
 	dopuslib.dll!000007fee200b1bf()
 	dopuslib.dll!000007fee200b469()
 	dopuslib.dll!000007fee200b033()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        dopuslib.dll thread        dopus.exe!000000013fbee5db
>	user32.dll!NtUserGetMessage()
 	user32.dll!GetMessageW()
 	dopus.exe!000000013fbee5db()
 	dopus.exe!000000013fbee4e9()
 	dopuslib.dll!000007fee1f4a124()
 	dopuslib.dll!000007fee200b02c()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        dopuslib.dll thread        dopus.exe!000000013fc410f4
>	ntdll.dll!NtWaitForMultipleObjects()
 	KERNELBASE.dll!WaitForMultipleObjectsEx()
 	kernel32.dll!WaitForMultipleObjectsExImplementation()
 	user32.dll!RealMsgWaitForMultipleObjectsEx()
 	user32.dll!MsgWaitForMultipleObjectsEx()
 	user32.dll!MsgWaitForMultipleObjects()
 	dopus.exe!000000013fc410f4()
 	dopus.exe!000000013fc40717()
 	dopuslib.dll!000007fee1f4a124()
 	dopuslib.dll!000007fee200b02c()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        dopuslib.dll thread        dopus.exe!000000013fd0a57d
>	ntdll.dll!NtWaitForMultipleObjects()
 	KERNELBASE.dll!WaitForMultipleObjectsEx()
 	kernel32.dll!WaitForMultipleObjectsExImplementation()
 	user32.dll!RealMsgWaitForMultipleObjectsEx()
 	user32.dll!MsgWaitForMultipleObjectsEx()
 	user32.dll!MsgWaitForMultipleObjects()
 	dopus.exe!000000013fd0a57d()
 	dopuslib.dll!000007fee1f4a124()
 	dopuslib.dll!000007fee200b02c()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        dopuslib.dll thread        dopus.exe!000000013fd10d79
>	user32.dll!NtUserGetMessage()
 	user32.dll!GetMessageW()
 	dopus.exe!000000013fd10d79()
 	dopuslib.dll!000007fee1f4a124()
 	dopuslib.dll!000007fee200b02c()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        dopuslib.dll thread        dopus.exe!000000013fd111e7
>	ntdll.dll!NtWaitForMultipleObjects()
 	KERNELBASE.dll!WaitForMultipleObjectsEx()
 	kernel32.dll!WaitForMultipleObjectsExImplementation()
 	user32.dll!RealMsgWaitForMultipleObjectsEx()
 	user32.dll!MsgWaitForMultipleObjectsEx()
 	dopus.exe!000000013fd111e7()
 	dopuslib.dll!000007fee1f4a124()
 	dopuslib.dll!000007fee200b02c()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        dopuslib.dll thread        dopus.exe!000000013fd129f4
>	user32.dll!NtUserGetMessage()
 	user32.dll!GetMessageW()
 	dopus.exe!000000013fd129f4()
 	dopuslib.dll!000007fee1f4a124()
 	dopuslib.dll!000007fee200b02c()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        dopuslib.dll thread        dopus.exe!000000013fd17d8e
>	user32.dll!ZwUserWaitMessage()
 	dopus.exe!000000013fd17d8e()
 	dopuslib.dll!000007fee1f4a124()
 	dopuslib.dll!000007fee200b02c()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        dopuslib.dll thread        dopus.exe!000000013fd1d70a
>	user32.dll!ZwUserWaitMessage()
 	dopus.exe!000000013fd1d70a()
 	dopuslib.dll!000007fee1f4a124()
 	dopuslib.dll!000007fee200b02c()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        dopuslib.dll thread        dopus.exe!000000013fd486b5
>	user32.dll!NtUserGetMessage()
 	user32.dll!GetMessageW()
 	dopus.exe!000000013fd486b5()
 	dopuslib.dll!000007fee1f4a124()
 	dopuslib.dll!000007fee200b02c()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        dopuslib.dll thread        dopus.exe!000000013fddb266
>	user32.dll!NtUserGetMessage()
 	user32.dll!GetMessageW()
 	dopus.exe!000000013fddb266()
 	dopuslib.dll!000007fee1f4a124()
 	dopuslib.dll!000007fee200b02c()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        dopuslib.dll thread        dopus.exe!000000013fe0740b
>	user32.dll!NtUserGetMessage()
 	user32.dll!GetMessageW()
 	dopus.exe!000000013fe0740b()
 	dopus.exe!000000013fe072a1()
 	dopuslib.dll!000007fee1f4a124()
 	dopuslib.dll!000007fee200b02c()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        dopuslib.dll thread        dopus.exe!000000013fe3838d
>	user32.dll!ZwUserWaitMessage()
 	dopus.exe!000000013fe3838d()
 	dopus.exe!000000013fe381ec()
 	dopuslib.dll!000007fee1f4a124()
 	dopuslib.dll!000007fee200b02c()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        dopuslib.dll thread        dopus.exe!000000013fe4fd9b
>	ntdll.dll!NtWaitForMultipleObjects()
 	KERNELBASE.dll!WaitForMultipleObjectsEx()
 	kernel32.dll!WaitForMultipleObjectsExImplementation()
 	user32.dll!RealMsgWaitForMultipleObjectsEx()
 	user32.dll!MsgWaitForMultipleObjectsEx()
 	user32.dll!MsgWaitForMultipleObjects()
 	dopus.exe!000000013fe4fd9b()
 	dopus.exe!000000013fe4ebe4()
 	dopuslib.dll!000007fee1f4a124()
 	dopuslib.dll!000007fee200b02c()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        dopuslib.dll thread        dopuslib.dll!000007fee1f2db28
>	ntdll.dll!ZwWaitForSingleObject()
 	KERNELBASE.dll!WaitForSingleObjectEx()
 	dopuslib.dll!000007fee1f2db28()
 	dopuslib.dll!000007fee1f4a124()
 	dopuslib.dll!000007fee200b02c()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        dopus.exe thread           dopuslib.dll!000007fee201fa34
>	ntdll.dll!ZwWaitForSingleObject()
 	ntdll.dll!RtlpWaitOnCriticalSection()
 	ntdll.dll!RtlEnterCriticalSection()
 	dopuslib.dll!000007fee201fa34()
 	dopuslib.dll!000007fee201fec6()
 	dopuslib.dll!000007fee2020581()
 	dopuslib.dll!000007fee200e401()
 	dopuslib.dll!000007fee1fac81a()
 	dopuslib.dll!000007fee1facb49()
 	dopuslib.dll!000007fee1facd7c()
 	ntdll.dll!LdrpInitializeThread()
 	ntdll.dll!_LdrpInitialize()
 	ntdll.dll!LdrInitializeThunk()

Worker Thread        winmm.dll thread           dopuslib.dll!000007fee201fafc
>	ntdll.dll!ZwWaitForSingleObject()
 	ntdll.dll!RtlpWaitOnCriticalSection()
 	ntdll.dll!RtlEnterCriticalSection()
 	dopuslib.dll!000007fee201fafc()
 	dopuslib.dll!000007fee20200da()
 	dopuslib.dll!000007fee201fefa()
 	ntdll.dll!RtlProcessFlsData()
 	ntdll.dll!LdrShutdownThread()
 	ntdll.dll!RtlExitUserThread()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        winmm.dll thread           dopuslib.dll!000007fee201fafc
>	ntdll.dll!ZwWaitForSingleObject()
 	ntdll.dll!RtlpWaitOnCriticalSection()
 	ntdll.dll!RtlEnterCriticalSection()
 	dopuslib.dll!000007fee201fafc()
 	dopuslib.dll!000007fee20200da()
 	dopuslib.dll!000007fee201fefa()
 	ntdll.dll!RtlProcessFlsData()
 	ntdll.dll!LdrShutdownThread()
 	ntdll.dll!RtlExitUserThread()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        DropboxExt64.49.0.dll thread        DropboxExt64.49.0.dll!000007feea9d964b
>	ntdll.dll!ZwFsControlFile()
 	KERNELBASE.dll!ConnectNamedPipe()
 	DropboxExt64.49.0.dll!000007feea9d964b()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        GdiPlus.dll thread         GdiPlus.dll!000007fef5202d8c
>	ntdll.dll!NtWaitForMultipleObjects()
 	KERNELBASE.dll!WaitForMultipleObjectsEx()
 	kernel32.dll!WaitForMultipleObjectsExImplementation()
 	user32.dll!RealMsgWaitForMultipleObjectsEx()
 	user32.dll!MsgWaitForMultipleObjectsEx()
 	user32.dll!MsgWaitForMultipleObjects()
 	GdiPlus.dll!BackgroundThreadProc(void *)
 	GdiPlus.dll!DllRefCountSafeThreadThunk(void *)
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        dopuslib.dll thread        mciwave.dll!000007feecb45100
>	ntdll.dll!ZwWaitForSingleObject()
 	ntdll.dll!RtlpWaitOnCriticalSection()
 	ntdll.dll!RtlEnterCriticalSection()
 	mciwave.dll!mciDriverEntry()
 	mciwave.dll!DriverProc()
 	winmm.dll!InternalBroadcastDriverMessage()
 	winmm.dll!mciSendSingleCommand()
 	winmm.dll!mciSendCommandInternal()
 	winmm.dll!mciSendCommandW()
 	msvfw32.dll!MCIWndStatus()
 	msvfw32.dll!MCIWndProc()
 	user32.dll!UserCallWinProcCheckWow()
 	user32.dll!SendMessageWorker()
 	user32.dll!SendMessageW()
 	msvfw32.dll!MCIWndiTimerStuff()
 	msvfw32.dll!MCIWndProc()
 	user32.dll!UserCallWinProcCheckWow()
 	user32.dll!DispatchMessageWorker()
 	user32.dll!IsDialogMessageW()
 	dopus.exe!000000013fc17741()
 	dopus.exe!000000013fc17338()
 	dopus.exe!000000013f91a47a()
 	dopuslib.dll!000007fee1f4a124()
 	dopuslib.dll!000007fee200b02c()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        dopuslib.dll thread        mciwave.dll!000007feecb45100
>	ntdll.dll!ZwWaitForSingleObject()
 	ntdll.dll!RtlpWaitOnCriticalSection()
 	ntdll.dll!RtlEnterCriticalSection()
 	mciwave.dll!mciDriverEntry()
 	mciwave.dll!DriverProc()
 	winmm.dll!InternalBroadcastDriverMessage()
 	winmm.dll!mciSendSingleCommand()
 	winmm.dll!mciSendCommandInternal()
 	winmm.dll!mciSendCommandW()
 	msvfw32.dll!MCIWndStatus()
 	msvfw32.dll!MCIWndProc()
 	user32.dll!UserCallWinProcCheckWow()
 	user32.dll!SendMessageWorker()
 	user32.dll!SendMessageW()
 	msvfw32.dll!MCIWndiTimerStuff()
 	msvfw32.dll!MCIWndProc()
 	user32.dll!UserCallWinProcCheckWow()
 	user32.dll!DispatchMessageWorker()
 	user32.dll!IsDialogMessageW()
 	dopus.exe!000000013fc17741()
 	dopus.exe!000000013fc17338()
 	dopus.exe!000000013f91a47a()
 	dopuslib.dll!000007fee1f4a124()
 	dopuslib.dll!000007fee200b02c()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        winmm.dll thread           mciwave.dll!000007feecb45bcc
>	user32.dll!NtUserGetMessage()
 	user32.dll!GetMessageW()
 	mciwave.dll!TaskBlock()
 	mciwave.dll!mwTask()
 	winmm.dll!mmStartTask()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        MMDevAPI.dll thread        MMDevAPI.dll!000007fefb9b35be
>	ntdll.dll!NtWaitForMultipleObjects()
 	KERNELBASE.dll!WaitForMultipleObjectsEx()
 	kernel32.dll!WaitForMultipleObjectsExImplementation()
 	user32.dll!RealMsgWaitForMultipleObjectsEx()
 	user32.dll!MsgWaitForMultipleObjectsEx()
 	MMDevAPI.dll!CDeviceEnumerator::PnpNotificationThread(void)
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        dopuslib.dll thread        msctf.dll!000007fefe7eacd2
>	ntdll.dll!ZwWaitForSingleObject()
 	ntdll.dll!RtlpWaitOnCriticalSection()
 	ntdll.dll!RtlEnterCriticalSection()
 	ntdll.dll!LdrLockLoaderLock()
 	KERNELBASE.dll!GetModuleFileNameW()
 	user32.dll!SetWinEventHook()
 	msctf.dll!CThreadInputMgr::SetFocusEventHook(void)
 	msctf.dll!CThreadInputMgr::Resume(void)
 	msctf.dll!CThreadInputMgr::ActivateEx_P(unsigned long *,unsigned long)
 	msctf.dll!CicBridge::ActivateIMMX(class TLS *,struct ITfThreadMgr_P *,unsigned long,unsigned long)
 	msctf.dll!CtfImeCreateThreadMgr()
 	imm32.dll!CtfImmTIMActivate()
 	imm32.dll!InternalImmLockIMC()
 	imm32.dll!ImmSetActiveContext()
 	user32.dll!FocusSetIMCContext()
 	user32.dll!ImeSystemHandler()
 	user32.dll!ImeWndProcWorker()
 	user32.dll!__fnDWORD()
 	ntdll.dll!KiUserCallbackDispatcherContinue()
 	user32.dll!ZwUserSetWindowPos()
 	dopus.exe!000000013f91a708()
 	dopus.exe!000000013f91a5d6()
 	user32.dll!UserCallDlgProcCheckWow()
 	user32.dll!DefDlgProcWorker()
 	user32.dll!InternalCreateDialog()
 	user32.dll!CreateDialogIndirectParamAorW()
 	user32.dll!CreateDialogIndirectParamW()
 	dopus.exe!000000013fc195a5()
 	dopus.exe!000000013f91a3d1()
 	dopuslib.dll!000007fee1f4a124()
 	dopuslib.dll!000007fee200b02c()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        msiltcfg.dll thread        msiltcfg.dll!000007feeabe21d6
>	ntdll.dll!NtWaitForMultipleObjects()
 	KERNELBASE.dll!WaitForMultipleObjectsEx()
 	kernel32.dll!WaitForMultipleObjects()
 	msiltcfg.dll!WorkerThread(void *)
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        ntdll.dll thread           ntdll.dll!00000000775f9e3a
>	ntdll.dll!NtWaitForMultipleObjects()
 	ntdll.dll!TppWaiterpThread()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        ntdll.dll thread           ntdll.dll!00000000775fb0ca
>	ntdll.dll!ZwTraceControl()
 	ntdll.dll!EtwpNotificationThread()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        ntdll.dll thread           ntdll.dll!00000000775fb18a
>	ntdll.dll!ZwWaitForWorkViaWorkerFactory()
 	ntdll.dll!TppWorkerThread()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        ntdll.dll thread           ntdll.dll!00000000775fb18a
>	ntdll.dll!ZwWaitForWorkViaWorkerFactory()
 	ntdll.dll!TppWorkerThread()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        ntdll.dll thread           ntdll.dll!00000000775fb18a
>	ntdll.dll!ZwWaitForWorkViaWorkerFactory()
 	ntdll.dll!TppWorkerThread()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        ntdll.dll thread           ntdll.dll!00000000775fb18a
>	ntdll.dll!ZwWaitForWorkViaWorkerFactory()
 	ntdll.dll!TppWorkerThread()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        ntdll.dll thread           ntdll.dll!00000000775fb18a
>	ntdll.dll!ZwWaitForWorkViaWorkerFactory()
 	ntdll.dll!TppWorkerThread()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        shlwapi.dll thread         shell32.dll!000007fefd5468e8
>	user32.dll!NtUserGetMessage()
 	user32.dll!GetMessageW()
 	shell32.dll!MessagePumpThreadProc(void *)
 	shlwapi.dll!WrapperThreadProc(void *)
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        winmm.dll thread           wdmaud.drv!000007fee6e72756
>	ntdll.dll!ZwWaitForSingleObject()
 	KERNELBASE.dll!WaitForSingleObjectEx()
 	wdmaud.drv!CWorker::`scalar deleting destructor'(unsigned int)
 	wdmaud.drv!CWaveHandle::~CWaveHandle(void)
 	wdmaud.drv!CWxd::Close(class CWaveHandle *)
 	wdmaud.drv!wodMessage(unsigned long,unsigned long,unsigned __int64,unsigned __int64,unsigned __int64)
 	winmm.dll!waveOutClose()
 	msacm32.drv!mapWaveClose()
 	msacm32.drv!wodMessage()
 	winmm.dll!waveOutClose()
 	mciwave.dll!mwTask()
 	winmm.dll!mmStartTask()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        wdmaud.drv thread          wdmaud.drv!000007fee6e72949
>	ntdll.dll!ZwWaitForSingleObject()
 	ntdll.dll!RtlpWaitOnCriticalSection()
 	ntdll.dll!RtlEnterCriticalSection()
 	ntdll.dll!LdrGetDllHandleEx()
 	ntdll.dll!LdrGetDllHandle()
 	KERNELBASE.dll!GetModuleHandleForUnicodeString()
 	KERNELBASE.dll!BasepGetModuleHandleExW()
 	KERNELBASE.dll!GetModuleHandleW()
 	ole32.dll!wCoUninitialize(COleTls & Tls, int fHostThread) Line 2832
 	ole32.dll!CoUninitialize() Line 2629
 	wdmaud.drv!CWorker::_StaticThreadProc(void *)
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        dopuslib.dll thread        winmm.dll!000007fef03f66cf
>	ntdll.dll!ZwWaitForSingleObject()
 	ntdll.dll!RtlpWaitOnCriticalSection()
 	ntdll.dll!RtlEnterCriticalSection()
 	winmm.dll!InternalFreeDriver()
 	winmm.dll!DrvClose()
 	winmm.dll!mciCloseDevice()
 	winmm.dll!mciSendSingleCommand()
 	winmm.dll!mciSendCommandInternal()
 	winmm.dll!mciSendCommandW()
 	msvfw32.dll!MCIWndiClose()
 	msvfw32.dll!MCIWndProc()
 	user32.dll!UserCallWinProcCheckWow()
 	user32.dll!DispatchClientMessage()
 	user32.dll!__fnDWORD()
 	ntdll.dll!KiUserCallbackDispatcherContinue()
 	user32.dll!ZwUserDestroyWindow()
 	dopus.exe!000000013f91a8a8()
 	dopus.exe!000000013f91a606()
 	user32.dll!UserCallDlgProcCheckWow()
 	user32.dll!DefDlgProcWorker()
 	user32.dll!DefDlgProcW()
 	user32.dll!UserCallWinProcCheckWow()
 	user32.dll!CallWindowProcAorW()
 	user32.dll!CallWindowProcW()
 	comctl32.dll!CallOriginalWndProc()
 	comctl32.dll!CallNextSubclassProc()
 	comctl32.dll!DefSubclassProc()
 	dopus.exe!000000013f40a03c()
 	comctl32.dll!CallNextSubclassProc()
 	comctl32.dll!MasterSubclassProc()
 	user32.dll!UserCallWinProcCheckWow()
 	user32.dll!DispatchClientMessage()
 	user32.dll!__fnDWORD()
 	ntdll.dll!KiUserCallbackDispatcherContinue()
 	user32.dll!ZwUserDestroyWindow()
 	dopus.exe!000000013f91ab6a()
 	dopus.exe!000000013f91b1f2()
 	dopus.exe!000000013f91a671()
 	user32.dll!UserCallDlgProcCheckWow()
 	user32.dll!DefDlgProcWorker()
 	user32.dll!DefDlgProcW()
 	user32.dll!UserCallWinProcCheckWow()
 	user32.dll!CallWindowProcAorW()
 	user32.dll!CallWindowProcW()
 	comctl32.dll!CallOriginalWndProc()
 	comctl32.dll!CallNextSubclassProc()
 	comctl32.dll!DefSubclassProc()
 	dopus.exe!000000013f40a03c()
 	comctl32.dll!CallNextSubclassProc()
 	comctl32.dll!MasterSubclassProc()
 	user32.dll!UserCallWinProcCheckWow()
 	user32.dll!SendMessageWorker()
 	user32.dll!SendMessageW()
 	msvfw32.dll!MCIWndiTimerStuff()
 	msvfw32.dll!MCIWndProc()
 	user32.dll!UserCallWinProcCheckWow()
 	user32.dll!DispatchMessageWorker()
 	user32.dll!IsDialogMessageW()
 	dopus.exe!000000013fc17741()
 	dopus.exe!000000013fc17338()
 	dopus.exe!000000013f91a47a()
 	dopuslib.dll!000007fee1f4a124()
 	dopuslib.dll!000007fee200b02c()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

Worker Thread        dopuslib.dll thread        winmm.dll!000007fef03f675f
>	ntdll.dll!ZwWaitForSingleObject()
 	ntdll.dll!RtlpWaitOnCriticalSection()
 	ntdll.dll!RtlEnterCriticalSection()
 	ntdll.dll!LdrUnloadDll()
 	KERNELBASE.dll!FreeLibrary()
 	winmm.dll!InternalFreeDriver()
 	winmm.dll!DrvClose()
 	winmm.dll!mciCloseDevice()
 	winmm.dll!mciSendSingleCommand()
 	winmm.dll!mciSendCommandInternal()
 	winmm.dll!mciSendCommandW()
 	msvfw32.dll!MCIWndiClose()
 	msvfw32.dll!MCIWndProc()
 	user32.dll!UserCallWinProcCheckWow()
 	user32.dll!DispatchClientMessage()
 	user32.dll!__fnDWORD()
 	ntdll.dll!KiUserCallbackDispatcherContinue()
 	user32.dll!ZwUserDestroyWindow()
 	dopus.exe!000000013f91a8a8()
 	dopus.exe!000000013f91a606()
 	user32.dll!UserCallDlgProcCheckWow()
 	user32.dll!DefDlgProcWorker()
 	user32.dll!DefDlgProcW()
 	user32.dll!UserCallWinProcCheckWow()
 	user32.dll!CallWindowProcAorW()
 	user32.dll!CallWindowProcW()
 	comctl32.dll!CallOriginalWndProc()
 	comctl32.dll!CallNextSubclassProc()
 	comctl32.dll!DefSubclassProc()
 	dopus.exe!000000013f40a03c()
 	comctl32.dll!CallNextSubclassProc()
 	comctl32.dll!MasterSubclassProc()
 	user32.dll!UserCallWinProcCheckWow()
 	user32.dll!DispatchClientMessage()
 	user32.dll!__fnDWORD()
 	ntdll.dll!KiUserCallbackDispatcherContinue()
 	user32.dll!ZwUserDestroyWindow()
 	dopus.exe!000000013f91ab6a()
 	dopus.exe!000000013f91b1f2()
 	dopus.exe!000000013f91a671()
 	user32.dll!UserCallDlgProcCheckWow()
 	user32.dll!DefDlgProcWorker()
 	user32.dll!DefDlgProcW()
 	user32.dll!UserCallWinProcCheckWow()
 	user32.dll!CallWindowProcAorW()
 	user32.dll!CallWindowProcW()
 	comctl32.dll!CallOriginalWndProc()
 	comctl32.dll!CallNextSubclassProc()
 	comctl32.dll!DefSubclassProc()
 	dopus.exe!000000013f40a03c()
 	comctl32.dll!CallNextSubclassProc()
 	comctl32.dll!MasterSubclassProc()
 	user32.dll!UserCallWinProcCheckWow()
 	user32.dll!SendMessageWorker()
 	user32.dll!SendMessageW()
 	msvfw32.dll!MCIWndiTimerStuff()
 	msvfw32.dll!MCIWndProc()
 	user32.dll!UserCallWinProcCheckWow()
 	user32.dll!DispatchMessageWorker()
 	user32.dll!IsDialogMessageW()
 	dopus.exe!000000013fc17741()
 	dopus.exe!000000013fc17338()
 	dopus.exe!000000013f91a47a()
 	dopuslib.dll!000007fee1f4a124()
 	dopuslib.dll!000007fee200b02c()
 	kernel32.dll!BaseThreadInitThunk()
 	ntdll.dll!RtlUserThreadStart()

My guess is it's an audio driver issue.

The stacks show it's hanging within the Windows code while trying to close a driver. (The word "driver" in the logged function names may not literally mean the hardware driver there, but is probably still something that ultimately depends on the hardware driver in either case.)

That would also explain why it only goes wrong on one machine, assuming the same files were tested on the other machine.

I would try updating the driver from the motherboard / sound card OEM, or getting the driver from the sound chipset manufacturer, depending on the type of sound hardware. (Sometimes you have both options, and one may work better than the other.) The sound (and video) drivers that come with Windows and Windows Update are often not great.

Changing the driver isn't a feasible solution for me. I'm using kX project (3rd party FOSS driver) with an Audigy 2 card. It works perfectly with all other applications - good for music production, even allows programmable DSP, unlike Creative's old crappy driver.

There's one thread apparently stuck in some exception handler. Does Opus perhaps log exceptions somewhere to give a better clue?

I tested changing the default sound device to an external FireWire box, completely different driver. Same thing happens with Opus. Maybe it's something that only occurs on older Windows versions, but there's this creeping suspicion that a an obscure bug is still hiding, waiting to resurface :smiley:

This thread is almost 5 years old so "old Windows versions" today would have been current back then, and the code involved was written for even older versions and used by people on them for a long time without many similar reports.

The original thread we're on the end of turned out to be a problem caused by security software, and only seen by one person.

That's what process snapshots are for. We can look at them if you send them.

I dug a bit more into this. The problem occurs on Win10 too, but with a proper crash notification instead of deadlock, and it takes far longer to crash than in Win7.

If you use gflags, the Windows debugging tool, to "Enable page heap" for dopus.exe, and play any wav file with auto-close on finish, there is always an access violation in dopus.playsndthread in MSVFW32!MCIWndiTimerStuff. It tries to update the trackbar after the window is already destroyed. It only happens with auto-close, and if user didn't stop and restart playback,

With page heap validation off in gflags, that thread seems to die silently, but afterwards there's something wrong with heap blocks, e.g.

HEAP[dopus.exe]: HEAP: Free Heap block 4f7d420 modified at 4f7d4b8 after it was freed

These can be reproduced 100% on both systems.

After lots of repetition on Win10 you get an access violation crash from what looks like decrementing an atomic counter. Win7 looks the same, but the exception handler causes a deadlock between 3 threads:

  1. Exception handler, waiting for thread 2.
  2. Waiting for LdrpLoaderLock in order to start
  3. Holds LdrpLoaderLock, waits for a CritSect that (1) acquired just before the access violation.

The exact instruction that causes access violation varies between tries, but it's always been of the form:
lock xadd dword ptr [rcx],eax, closely after calling EnterCriticalSection

Thanks! I will take a look to see if there's something we can do on our side to avoid that happening.

We've fixed that for the next beta. Thanks again!

With PageHeap turned on I was able to reproduce the problem every time. Many thanks for that piece of info, as it made things easy to track down. With the new code, it no longer happens for me even with PageHeap on but, of course, if you still see a problem once the new beta is out, please let us know.

It turned out to be caused by closing the (invisible) Windows MCI window while handling the "finished playing" message it sends us. It must not check for its window being destroyed inside a notification (easy to overlook; we've had issues like that as well). Postponing the MCI window close until after returning from the notification fixes things.

2 Likes