Strange int 3 bug NTDLL - Programmer

This is a discussion on Strange int 3 bug NTDLL - Programmer ; Both my programs Repligator and Gliftic have a multiple image generation option. Whenever you hit F12 or the multi icon in the toolbar the multiple image generation icon pops up. Now I have started compiling on XP, VC6 with MFC, ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Strange int 3 bug NTDLL

  1. Strange int 3 bug NTDLL

    Both my programs Repligator and Gliftic have a multiple image
    generation option. Whenever you hit F12 or the multi icon in the
    toolbar the multiple image generation icon pops up.

    Now I have started compiling on XP, VC6 with MFC, I get
    a user break and my program is interrupted when I open
    that dialog. But the break is not inside my code, but here:

    NTDLL! 77f65a58()

    and the code breaks at the first line of this decompiled stuff:

    77F65A58 int 3
    77F65A59 ret

    What does int 3 do? Is it something which gets called when
    there is a specific error? It seems to be a user breakpoint,
    but I have never set it.

    The odd thing is that if I push F5 to continue the program
    goes ahead and shows the dialog. But after three tries
    at this my whole machine blocks and I have to hit the
    HARDWARE RESET to get it going again!

    I have compiled on Win98 for several years, now I move
    to XP and THIS happens!

    Any pointers would be welcome!


  2. Re: Strange int 3 bug NTDLL

    O Ransen wrote:
    > Now I have started compiling on XP, VC6 with MFC, I get
    > a user break and my program is interrupted when I open
    > that dialog. But the break is not inside my code, but here:
    >
    > NTDLL! 77f65a58()
    >
    > and the code breaks at the first line of this decompiled stuff:
    >
    > 77F65A58 int 3
    > 77F65A59 ret
    >
    > What does int 3 do? Is it something which gets called when
    > there is a specific error? It seems to be a user breakpoint,
    > but I have never set it.


    int 3 is a breakpoint opcode. It is used by the runtime library in
    debug builds to advise you of an invalid state. Kind of like an ASSERT
    but not as friendly.

    It usually means a heap memory problem. Two things you should do when
    it happens:

    Look at the stack window to try and analyze where in your code started
    the chain of calls that led to the error. If you have the MFC and
    runtime library source code installed the stack trace will be much more
    informative.

    And check the debugger output window. The int 3 breakpoints usually
    display an error message there before stopping.

    --
    Scott McPhillips [VC++ MVP]


  3. Re: Strange int 3 bug NTDLL

    On Fri, 16 Apr 2004 18:58:30 -0500, "Scott McPhillips [MVP]"
    wrote:

    >> What does int 3 do? Is it something which gets called when
    >> there is a specific error? It seems to be a user breakpoint,
    >> but I have never set it.

    >
    >int 3 is a breakpoint opcode. It is used by the runtime library in
    >debug builds to advise you of an invalid state. Kind of like an ASSERT
    >but not as friendly.


    I have found out the error. The function being called gets called
    (in my app) with the F12 key, as mentioned in the original post.

    But the F12 key is apparently assigned to "break into the program"
    while in debug mode. Why F12 did not "work" in Win98 I don't
    know, but that is the cause of my confusion in WinXP.

    And why it goes gah gah after three breaks is till a mystery. But
    if I use the icon for the command rather than the F12 key then I
    don't get the break (obviously).


    Aaaargh! I was SURE that F12 was not assigned anything, and in
    fact the keyboard map help does not show it as being assigned,
    even though it is...



    Thanks for the pointers anyway...



+ Reply to Thread