CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Jun 2004
    Location
    England
    Posts
    90

    First-chance exception ..?

    Hello everyone,

    I am having some real trouble understanding why my windows application displays the following after I close it

    First-chance exception in Invoicer.exe (KERNEL32.DLL): 0x800706BA: (no name).

    Does anyone know why this happens?

    I stepped through it, and all the destructors are genuine, everything is working fine, but the debugger doesn't think so.

    Also, it takes about 5 seconds after I terminate my application for it to actually be killed! . Is this because I create a MS Word instance?

    Any help will be much appreciated

    Thanks.
    The most knowledgeable people are those who know that they know nothing.

  2. #2
    Join Date
    Sep 2002
    Location
    14° 39'19.65"N / 121° 1'44.34"E
    Posts
    9,815
    Quote Originally Posted by Tamerocyte
    I stepped through it, and all the destructors are genuine, everything is working fine, but the debugger doesn't think so.
    If you step through it in the debugger, there will be a specific line of code which causes the exception. It would be interesting to see that code...

  3. #3
    Join Date
    Sep 2002
    Location
    Maryland - Fear The Turtle!
    Posts
    7,537
    Assuming your using the IDE as your debugger. Start your program. Break into your program. Select Debug->Exceptions add 800706ba as an exception (don't worry about the name), select stop always.

    Run your code, you will now breakpoint at the point the first chance exception for that exception number is generated. First chance exceptions are reported to debuggers to allow them a chance to handle them. If a debugger does not handle them, a handler is then searched for. In this case there is one. But you need investigate it anyways...

  4. #4
    Join Date
    Sep 2002
    Location
    Maryland - Fear The Turtle!
    Posts
    7,537
    and to finish off my unfinished thought

    from there look at the call stack and back up looking for any relevant code of your own. You can post the call stack if you like, you should have the OS symbols installed so we do not have to manually decode which OS dll function you may be in.

    You should use the symbol server for that. If you have vc6.0 it is easier if you switch to windbg as your debugger (because it has support for the symbol server)

    http://msdn.microsoft.com/library/de...mbolserver.asp

    http://msdn.microsoft.com/library/de...g_debugger.asp
    Last edited by Mick; July 27th, 2004 at 10:30 AM.

  5. #5
    Join Date
    Jun 2004
    Location
    England
    Posts
    90

    Unhappy

    Quote Originally Posted by gstercken
    If you step through it in the debugger, there will be a specific line of code which causes the exception. It would be interesting to see that code...
    It happens after all my code is executed, after my application has freed all its resources, if I try to step through it assembly code is executed
    The most knowledgeable people are those who know that they know nothing.

  6. #6
    Join Date
    Jun 2004
    Location
    England
    Posts
    90

    Thumbs up

    Quote Originally Posted by Mick
    and to finish off my unfinished thought

    from there look at the call stack and back up looking for any relevant code of your own. You can post the call stack if you like, you should have the OS symbols installed so we do not have to manually decode which OS dll function you may be in.

    You should use the symbol server for that. If you have vc6.0 it is easier if you switch to windbg as your debugger.

    http://msdn.microsoft.com/library/de...mbolserver.asp

    http://msdn.microsoft.com/library/de...g_debugger.asp
    Thanks a lot for all the assistance, I never know about this method of debugging first chance exceptions!, cool stuff, will most definitely be useful in the future as well
    The most knowledgeable people are those who know that they know nothing.

  7. #7
    Join Date
    Jun 2004
    Location
    England
    Posts
    90
    Quote Originally Posted by gstercken
    If you step through it in the debugger, there will be a specific line of code which causes the exception. It would be interesting to see that code...
    Would you like me to post my code?
    The most knowledgeable people are those who know that they know nothing.

  8. #8
    Join Date
    Sep 2002
    Location
    Maryland - Fear The Turtle!
    Posts
    7,537
    Quote Originally Posted by Tamerocyte
    Would you like me to post my code?
    That depends If your project is not very large then zip it up after a clean and attach it. Faster way to see what is going on. Otherwise I'd personally want to see a call stack first (with symoblic info goodness) and then indicate what code I'd like to see posted.

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