tags:

views:

75

answers:

3

I'm debugging plugins on Windows 7 and of course the plugin host (Cubase5.exe) occasionally crashes because of errors in the plugin. On XP or Vista, I could always restart it immediately and continue working. But on Windows 7, even though Cubase appears to close, it is still visible in Task Manager and I cannot kill it by any means. After a minute or two, it disappears by itself. In the mean time, I can't work because the plugin DLL is still locked by the process.

Does anyone know why this happens on Windows 7? I've already tried disabling Automatic Error Reporting but that didn't help. I've tried attaching cdb to Cubase, but I get:

Cannot debug pid 5252, NTSTATUS 0xC0000001
    "{Operation Failed}  The requested operation was unsuccessful."
Debuggee initialization failed, NTSTATUS 0xC0000001
    "{Operation Failed}  The requested operation was unsuccessful."

I tried following the instructions here but it appears this is only possible if I connect a second machine to my computer to debug it remotely.

+1  A: 

Have you tried Process Explorer by Mark Russinovich? It is really useful for "killing":)

Petar Minchev
Indeed it is, or the command line tool `pskill` from the same Sysinternals Suite.
0xA3
Doesn't allow me to kill Cubase5 either. Inspection of the threads panel shows that there are two threads remaining, one of which seems to be in DllRegisterServer in ntdll.dll.
Frederik Slijkerman
Do you have valid symbols for ntdll (use the MSFT public symbol server)? It's almost certainly not in DllRegisterServer - that's probably just the closest public export.
Larry Osterman
Will try it, thanks!
Frederik Slijkerman
A: 

One thing you can try is to check with Process Monitor what Cubase is doing. Set a filter so that everything with a process name containing "cubase" will be recorded. It could be that you are facing some timeout issue when Cubase wants to exit.

0xA3
No useful information here...
Frederik Slijkerman
+1  A: 

If you have error reporting enabled, it's possible that werfault.exe has Cubase open to write a minidump for crash reporting purposes.

This is just a stab in the dark but it might be your problem.

Larry Osterman
Thanks. I don't see werfault.exe in Task Manager though while I'm waiting for Cubase to close.
Frederik Slijkerman
Bummer. If you can't kill it with taskmgr or pskill, it's probably blocked waiting on a kernel thread somewhere.
Larry Osterman
Yeah, I think it's most likely a driver that won't cancel, as explained in the link I gave in the question. But attaching a kernel debugger is a bit too much for me...
Frederik Slijkerman