CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 23
  1. #1
    Join Date
    Nov 2003
    Posts
    2,185

    Multithreading + debugging = driving me crazy

    Hi all,

    I am debugging a multithreaded application. Just added a breakpoint and want the application to stop there.

    However, one problem:
    It happens a lot that Visual Studio stops responding. Now I don't care that visual studio crashes, but my computer will not respond and I have to restart the pc.

    This is not the first time it happens. It is driving me crazy for months, but now I have had enough of it.

    Is this a known problem? I am using Visual Studio 6.

    Thanks!

  2. #2
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,150

    Re: Multithreading + debugging = driving me crazy

    [ moved thread ]
    Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
    My Blog
    Wallpaper Cycler 3.5.0.97

    Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
    ISBN: 978-1-119-42130-6
    [ http://www.facebook.com/professionalcpp ]

  3. #3
    Join Date
    Aug 2002
    Location
    Cluj-Napoca,Romania
    Posts
    3,496

    Re: Multithreading + debugging = driving me crazy

    Have you installed SP 6?
    Har Har

  4. #4
    Join Date
    Nov 2003
    Posts
    2,185

    Re: Multithreading + debugging = driving me crazy

    No, not yet. Will that help?

  5. #5
    Join Date
    Aug 2002
    Location
    Cluj-Napoca,Romania
    Posts
    3,496

    Re: Multithreading + debugging = driving me crazy

    Quote Originally Posted by Tischnoetentoet
    No, not yet. Will that help?
    Couldn't tell for sure. But after all Service Packs are made to fix problems. Hopefully it will solve your problem too.
    Har Har

  6. #6
    Join Date
    Nov 2003
    Posts
    2,185

    Re: Multithreading + debugging = driving me crazy

    well, installed it, and it is not crashing until now!

    So I hope the problem is fixed! thanks for your help!

  7. #7
    Join Date
    Aug 2002
    Location
    Cluj-Napoca,Romania
    Posts
    3,496

    Re: Multithreading + debugging = driving me crazy

    Quote Originally Posted by Tischnoetentoet
    So I hope the problem is fixed! thanks for your help!
    well, it might be just a coincidence but let us hope for the best.
    Har Har

  8. #8
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,835

    Re: Multithreading + debugging = driving me crazy

    Just out of interest, are you running under Windows XP? I've had this problem when debugging multithreaded apps for the past few years. Even with the latest service pack it still happens - though not as frequently as before. However, if I debug my app under Win2k it doesn't happen at all (and never has done). Fortunately, I have a dual boot system so I just transfer to Win2K whenever it starts happening.

    My problem could be slightly different from yours, though. When it happens to me, the computer appears to have crashed and is totally unresponsive. However, if I go away and come back 15 minutes later it's back working again - but very slow.
    "A problem well stated is a problem half solved.” - Charles F. Kettering

  9. #9
    Join Date
    Nov 2003
    Posts
    2,185

    Re: Multithreading + debugging = driving me crazy

    yes, that is exactly the problem I am experiencing!

    But rebooting is faster than waiting 15 minutes, that's why I reboot. However, it is really strange. Music keeps playing, if I press the power button, everything works fast, but I cannot control any application.

    I am running windows xp, and this is a really strange problem.

  10. #10
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,835

    Re: Multithreading + debugging = driving me crazy

    Do you happen to know what motherboard & processor your machine uses? I used to have a Gigabyte GA-7VAXP with an AMD Athlon processor and it happened constantly. Then, just after I installed all the latest service packs, the mobo blew up (just by a coincidence) and I had to buy myself a new one. This time, I ended up with an Asus mobo. The problem still happens under XP - but nowhere near as often. Unfortunately though, I can't tell whether it was the upgrades that helped or the fact that I installed a new motherboard.

    If you can spare the disk space though, I'd definitely recommend that you create a separate boot partition and install Windows 2000.
    "A problem well stated is a problem half solved.” - Charles F. Kettering

  11. #11
    Join Date
    Nov 2003
    Posts
    2,185

    Re: Multithreading + debugging = driving me crazy

    I have Asus A6000 series notebook. But, I experienced this problem on a Dell machine as well.

    So, I don't think this has anything to do with the hardware, but I think it's a vs problem. No matter how fast the processor is (in my notebook, I have Intel Centrino 1.7 ghz, the Dll was 2,7 ghz, so pretty fast machines).

    However, I have not encountered the problem anymore since the update, but I have not tested it more than 10 times now. So let's hope it stays this way.

  12. #12
    Join Date
    Oct 2002
    Location
    Germany
    Posts
    6,205

    Re: Multithreading + debugging = driving me crazy

    On a side note... The symptom of "Computer not responding" and "Visual Studio 6.0" not responding is often also manifested because of problems with the NCB file.

    So, a good thing to do would be to close the workspace and delete all temporary files - NCB (trouble maker), OPT, CLW, APS, etc and then re-open, re-build and re-debug.

    A lot of freezes are fixed by trashing that seemingly corrupt NCB (which is a generated file).

  13. #13
    Join Date
    Nov 2003
    Posts
    2,185

    Re: Multithreading + debugging = driving me crazy

    You are right in that one Siddhartha, I sometimes rebuild everything, and then it works for a few times.

    However, if you change some little code, it hangs again. I don't want to rebuild all everytime I change just some small piece of code.

  14. #14
    Join Date
    Oct 2002
    Location
    Germany
    Posts
    6,205

    Re: Multithreading + debugging = driving me crazy

    A corrupt NCB can be deleted (re-build is not needed for this one) after closing the workspace.

    In general, debugging multithreaded applications is not that simple. Besides that, actually single-stepping thread code often takes away from the natural behaviour (in terms of sequence of code executed across threads) of the application itself.

    I often use LOG files that record variable names and states to keep myself from single-stepping multi-threaded code. That saves me a lot of time... Just a tip...

  15. #15
    Join Date
    May 2004
    Posts
    75

    Re: Multithreading + debugging = driving me crazy

    I also lived with the described symptom on Windows XP for a few years now, every now and then searching for a solution. Did anybody already solved this issue?

Page 1 of 2 12 LastLast

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

Featured