Results 1 to 4 of 4

Thread: Program hangs when debugging with no error messages

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2004
    Location
    Essex, UK
    Posts
    774

    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?

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2004
    Location
    Essex, UK
    Posts
    774

    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 ...

  3. #3
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,245

    Re: Program hangs when debugging with no error messages

    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!
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2004
    Location
    Essex, UK
    Posts
    774

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width