Application crash without any kind of Exception
Asked Answered
M

2

9

I have a multithreaded .Net C# application, it uses Direct3D 9/10 and XAudio2. (Direct3D is accessed by only one thread, same for XAudio2. Direct3D isn't the problem cause the error is manifest in either DX9 or DX10 mode without any change in its behaviour.)

Sometimes (there are some areas that gives this problem randomly) this application crash in a rather unspectacular way. Even if the application is started through visual studio with debugger it crash without giving ANY kind of exception. (It start by saying "applicationname.svchost.exe is crashed, etc..etc..Do you want to debug?", if I press yes it tells me "you cannot debug an application already closed.)

There is no way to find out what's the cause of the crash? Cause i've run out of ideas, the debugger isn't giving me any information at all. Without an exception I can't even do a stacktrace or a dump. :P (I'm supposing is a synchronization problem (even thought in that area I'm only doing sequential work...), but hey why isn't launching an exception? :|)

In the areas where the problem occurs I'm unloading a reloading a series of classes related to a novel (in a sequential core thread, so I doubt it can be an issue) and starting a new music through XAudio2. (BTW, what are the multithreading consideration about XAudio2? Is it safe to call from multiple thread?)

Thanks for the help.

P.S. There is a software to attach to mine to monitor all the calls and tells me what's the last call before the crash?

Meghanmeghann answered 9/1, 2010 at 22:29 Comment(2)
You should post the exact message you're getting when the program crashed. I doubt it actually says "is crashed." There may be some helpful clues in the error message.Sacchariferous
No message and No exception given by the VS debugger, the message is "the application name.svchost.exe is stopped working, do you want to debug?", if i press yes it start another visual studio and tell me "you cannot debug an application already closed"Meghanmeghann
D
6

You should try using Windbg, analyzing the crash dump should point you to the problem, if your suspicion is right and it is a synchronization problem, the cause of the problem may be hard to spot.

Detached answered 12/1, 2010 at 13:24 Comment(1)
I found out the problem using Windbg, it was some crazy error with XAudio2. Thanks!Meghanmeghann
F
3

Have you checked Event Logs in your Windows Administration Panel? All error of any kind are always logged in this section with minimal details.

One time I had an application that was crashing without exceptions and the only help I found was the Event Log Viewer where I discovered that the source of the crash was a StackOverflowException.

Fugger answered 9/1, 2010 at 22:58 Comment(1)
chances are the error will be in the event log, perhaps in some obscure service or dll?Naga

© 2022 - 2024 — McMap. All rights reserved.