Program hangs when debugging with no error messages
I have a program that using DirectX.DirectSound that generates various audio tones by filling a buffer with data, including all the required header bytes for a WAV format file. I've used this technique before and it works great. I'm just starting a new project and have copied in some code from an earlier (working) project and I've hit a bug. Somewhere I've obviously done something stupid, but the annoying thing is that when I try to debug my project and "play" my data file the project just hangs, with no error messages or anything that will help me to find the error. The same thing happens whether I have the "Visual Studio Hosting Process" option checked or not. I can stop the program by clicking on the "Stop Debugging" button. If I look at Task Manager when the program is running, it is taking about 40% CPU. I can't even put a breakpoint at the very beginning of the Sub that is called to play the file. The program somehow hangs before the breakpoint is reached.
So, I'm not really asking for help to fix my bug - I would of course have posted code if I wanted that - but rather, how is that a program running in the VB IDE ("debugging", if you prefer) can hang without giving any hint as to what is going wrong? Do I have a serious gap in my knowledge of debugging VB.NET?
Re: Program hangs when debugging with no error messages
Just tried running the .exe from the debug folder. Now I do get an error message; seems I've been caught out (again) by a "Mixed Mode Assembly" issue. The usual fix in App.Config doesn't seem to be working though, at least not yet ...
Re: Program hangs when debugging with no error messages
Quote:
If I look at Task Manager when the program is running, it is taking about 40% CPU.
This, along with the hang but no error, is a classic symptom of the infinite loop!
Re: Program hangs when debugging with no error messages
I know, but how can you create an infinite loop by just calling a sub, which doesn't even get started? A breakpoint on the first line of the sub is never reached.
It seems to be an issue with the version of DirectX DLL I am using, but it still seems wrong that the IDE cannot give me an error message, just a complete lock-up.