1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed BDEBUGGER died on invalid watch request

Discussion in 'Support' started by Steve Fabian, Dec 27, 2011.

  1. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    I attempted to specify an array element past the array size as a variable to watch. Repeatable pop-up: "Visual C++ RTL" - Program: IDE.EXE - "The application requested the runtime to terminate in an unusual way. Please contact the application's support team for more information." Originally the array was already defined and filled with data, but I did not remember its size, and the message pooped up when I specified one element too many. The second time I specified the same string "cum[12]" BEFORE the command "SETARRAY cum[12]" was executed, as a deliberate test to see the failure message. It was accepted as a variable specifiation, and displayed [12] as its value. Singlestepping worked fine until I executed the SETARRAY command, which caused the same error message pop-up, followed by the usual "notify MS" pop-up. When the pop-ups were closed, the IDE/BDEBUGGER window disappeared, and TCC went to a new prompt.
    TCC 13.02.35 in stand-alone WinXP home SP3 window.
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    10,092
    Likes Received:
    85
    Can you post a batch snippet that demonstrates the problem?
     
  3. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    This siimple program below shows the problem. Load it ni the debugger, highlight "x[1]" in the second line and make it a "watch variable" (alt-D a). "Run to breakpoint" or single stepping alike show the problem.
    on error quit
    setarray x[1]
    quit
     
  4. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    10,092
    Likes Received:
    85
    The reason I couldn't reproduce it originally is that the crash doesn't have anything to do with arrays or SETARRAY, and is only partially due to watching a variable. The actual problem is with ON ERROR throwing an exception while the debugger is trying to update the watch list (not when the error would normally be detected & displayed in the batch file itself). Which ends up with a stack unwinding problem, because ON ERROR is jumping to the wrong place.

    I'll have a fix in build 36.
     
  5. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    Thanks for the technical explanation which a few of us could understand, and especial thanks for the quick fix (and we are very pampered by your usually quick fixes).
     

Share This Page