Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Debug Hangggs

Debug Hangggs

Scheduled Pinned Locked Moved C / C++ / MFC
debuggingquestion
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Paul Silvernail
    wrote on last edited by
    #1

    How do you determine where a safe break point is? When I placed a break point at this line of code, my computer had a brain cramp and I had to reboot. void CTPclassDlg::OnAdd() { CString sTmp; // break point on this line // other code here ... } can someone explain? Thanks

    G 1 Reply Last reply
    0
    • P Paul Silvernail

      How do you determine where a safe break point is? When I placed a break point at this line of code, my computer had a brain cramp and I had to reboot. void CTPclassDlg::OnAdd() { CString sTmp; // break point on this line // other code here ... } can someone explain? Thanks

      G Offline
      G Offline
      Gary R Wheeler
      wrote on last edited by
      #2

      Taking a guess, something higher up in the call tree has corrupted the stack. If you had to reboot, does this mean you're developing on Windows 98/ME? When debugging under Windows 2000/XP, you usually don't have to reboot just because of an application error like this. Gary R. Wheeler

      P 1 Reply Last reply
      0
      • G Gary R Wheeler

        Taking a guess, something higher up in the call tree has corrupted the stack. If you had to reboot, does this mean you're developing on Windows 98/ME? When debugging under Windows 2000/XP, you usually don't have to reboot just because of an application error like this. Gary R. Wheeler

        P Offline
        P Offline
        Paul Silvernail
        wrote on last edited by
        #3

        Hi Gary, Yes I am using ME. If I move the break point down a couple lines to where I declare an int, the debug works fine. I was wondering if it had something to do with the CString. But then again, the program execution should stop befor the line is executed. Simply moving the breakpoint would have nothing to do with corrupting the stack. Right ??:confused:??

        G 1 Reply Last reply
        0
        • P Paul Silvernail

          Hi Gary, Yes I am using ME. If I move the break point down a couple lines to where I declare an int, the debug works fine. I was wondering if it had something to do with the CString. But then again, the program execution should stop befor the line is executed. Simply moving the breakpoint would have nothing to do with corrupting the stack. Right ??:confused:??

          G Offline
          G Offline
          Gary R Wheeler
          wrote on last edited by
          #4

          Hmmm. When I have odd behavior like this with the debugger, I usually try and do a 'rebuild all'. If the source code and the object code are out of sync, the line you think you've placed the breakpoint on in the source does not necessarily match the place in the object code where the breakpoint instruction is inserted. This can cause all sorts of unusual behavior. Gary R. Wheeler

          N 1 Reply Last reply
          0
          • G Gary R Wheeler

            Hmmm. When I have odd behavior like this with the debugger, I usually try and do a 'rebuild all'. If the source code and the object code are out of sync, the line you think you've placed the breakpoint on in the source does not necessarily match the place in the object code where the breakpoint instruction is inserted. This can cause all sorts of unusual behavior. Gary R. Wheeler

            N Offline
            N Offline
            Navier
            wrote on last edited by
            #5

            Sometimes even this doesn't work. I've just had a really bizarre one where stepping over 'xor ecx, ecx' in the disassembly of 'char u[10] = "1";' caused an access violation. Access Violation on a register????? Maybe I'm missing something but that's not supposed to happen as far as I know. I ended up having to re-create the .dsw from scratch. Dropping the same source in and setting the same proj options (as far as I know) made it work just fine. Strange but true. ========================== i1.2sqrt(u).bcos(ur)sec(c) but b4.isqrt(u).ru/16 Navier ==========================

            N 1 Reply Last reply
            0
            • N Navier

              Sometimes even this doesn't work. I've just had a really bizarre one where stepping over 'xor ecx, ecx' in the disassembly of 'char u[10] = "1";' caused an access violation. Access Violation on a register????? Maybe I'm missing something but that's not supposed to happen as far as I know. I ended up having to re-create the .dsw from scratch. Dropping the same source in and setting the same proj options (as far as I know) made it work just fine. Strange but true. ========================== i1.2sqrt(u).bcos(ur)sec(c) but b4.isqrt(u).ru/16 Navier ==========================

              N Offline
              N Offline
              Navier
              wrote on last edited by
              #6

              Just found out what *my* problem was. I had a watch set on one of my vars: 'what.size()'. Removing this makes everything work just fine. Maybe a bug in the VC6 debugger(?) Something for you to try anyway.... ========================== i1.2sqrt(u).bcos(ur)sec(c) but b4.isqrt(u).ru/16 Navier ==========================

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups