First-chance exceptions.

This is a discussion on First-chance exceptions. within the C++ Programming forums, part of the General Programming Boards category; Hi guys, I've encountered lots of first-chance exceptions like this: First-chance exception at 0x16897232 in myApp_DEBUG.exe: 0xC0000005: Access violation writing ...

  1. #1
    In the Land of Diddly-Doo g4j31a5's Avatar
    Join Date
    Jul 2006
    Posts
    476

    First-chance exceptions.

    Hi guys, I've encountered lots of first-chance exceptions like this:

    First-chance exception at 0x16897232 in myApp_DEBUG.exe: 0xC0000005: Access violation writing location 0x00000000
    And when I tagged the "Thrown" field in the Access Violation Exception option, it breaks and dumped this call stack:

    wmvcore.dll!1bbb8383()
    [Frames below may be incorrect and/or missing, no symbols loaded for wmvcore.dll]
    wmvcore.dll!1bbb7ecf()
    > wmvcore.dll!1bbf8c0d()
    kernel32.dll!7c81b054()
    wmvcore.dll!1bbb7e54()
    wmvcore.dll!1bbf8c3f()
    kernel32.dll!7c80b70d()
    kernel32.dll!7c80b70d()
    kernel32.dll!7c80b70d()
    kernel32.dll!7c80b719()
    ntdll.dll!_ZwQueryInformationFile@20() + 0xc bytes
    kernel32.dll!7c80f1c3()
    kernel32.dll!7c80f1f1()
    wmvcore.dll!1bbf8c0d()
    ntdll.dll!_RtlAllocateHeap@12() + 0x117 bytes
    ntdll.dll!_RtlReleasePebLock@0() + 0xf bytes
    ntdll.dll!_RtlAllocateHeap@12() + 0x117 bytes
    00150000()
    ntdll.dll!_RtlAllocateHeap@12() + 0xe40 bytes
    ntdll.dll!_RtlAllocateHeap@12() + 0xd7 bytes
    kernel32.dll!7c8099df()
    kernel32.dll!7c8099f0()
    mlang.dll!ATL::CComPolyObject<CMultiLanguage>::Add Ref() + 0x12 bytes
    mlang.dll!ATL::AtlInternalQueryInterface() + 0x6a bytes
    mlang.dll!ATL::CComObject<CMultiLanguage>::QueryIn terface() + 0x18 bytes
    1c0dfc60()
    ole32.dll!774ff94f()
    ole32.dll!774ffa5f()
    ole32.dll!774ffb7e()
    ntdll.dll!_RtlpFreeToHeapLookaside@8() + 0x26 bytes
    ntdll.dll!_RtlFreeHeap@12() + 0x114 bytes
    ntdll.dll!_RtlpFreeDebugInfo@4() + 0x49 bytes
    wmasf.dll!1be0341a()
    wmasf.dll!1be01116()
    wmasf.dll!1be05082()
    wmasf.dll!1be034df()
    wmasf.dll!1be0341a()
    wmasf.dll!1be03453()
    wmasf.dll!1be03471()
    wmasf.dll!1be040ae()
    wmasf.dll!1be040ae()
    wmasf.dll!1be04093()
    wmasf.dll!1be04031()
    wmasf.dll!1be04031()
    wmvcore.dll!1bbbb87e()
    wmvcore.dll!1bbfd040()
    wmvcore.dll!1bbf8841()
    msvcrt.dll!_free() + 0xc3 bytes
    wmvcore.dll!1bbf8b8b()
    wmvcore.dll!1bbbb87e()
    wmvcore.dll!1bbbca19()
    ole32.dll!77512fb4()
    wmvcore.dll!1bbbb87e()
    kernel32.dll!7c8025f0()
    kernel32.dll!7c802532()
    wmvcore.dll!1bbbbe49()
    wmvcore.dll!1bbe6781()
    msvcrt.dll!__endthreadex() + 0xa9 bytes
    kernel32.dll!7c80b683()
    Now the problem is all items inside of the call stack is from compiled .dlls and there's no source code whatsoever in all of them. Thus I couldn't get the real problematic line of code in my application. So, now I don't have any clue as to where to start debugging. Do I have to do a disassembly?Unfortunately my assembly knowledge is somewhat lacking (so I guess even if I did some disassembly, it won't do any good). (T.T)

    The funny thing is, in the release version it would do fine most of the time. But still it would randomly crash with an exception error. I know that a first-chance exception is not necessarily a bug, but if there's a lot of them I think it is a bug.

    Can anybody help me? Thanks a lot in advance guys.
    ERROR: Brain not found. Please insert a new brain!

    “Do nothing which is of no use.” - Miyamoto Musashi.

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Are you able to get the symbols from the MS symbol server? Sometimes, that helps at least getting the name of the function itself.

    Your error is a NULL pointer access. You are also deeply inside the kernel (or in a call-back from the kernel), which usually means that you are either doing something REALLY strange, or you are working on a kernel driver that messes up someone elses memory.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,292
    Whenever I see:
    [Frames below may be incorrect and/or missing, no symbols loaded for wmvcore.dll]
    I usually find that it's right and a lot of what is below there is wrong. You meed to set up your system to download symbols from Microsoft. You'll probably have to Google about how to do this though as I don't have time to gather all the necessary information at this time.
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

  4. #4
    In the Land of Diddly-Doo g4j31a5's Avatar
    Join Date
    Jul 2006
    Posts
    476
    When I tried to compile it at another computer, the exception didn't occur. So, it seems like my machine is the one that's making the error. I guess I got to re-install my computer. Oh joy.....

    Thanks though guys.
    ERROR: Brain not found. Please insert a new brain!

    “Do nothing which is of no use.” - Miyamoto Musashi.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Debug --> Exceptions in Visual Studio 2005
    By George2 in forum C# Programming
    Replies: 1
    Last Post: 08-10-2007, 02:12 AM
  2. Long-lasting objects that throw exceptions
    By drrngrvy in forum C++ Programming
    Replies: 7
    Last Post: 10-05-2006, 04:30 PM
  3. Probability Help - Math Geniuses Here
    By The Brain in forum A Brief History of Cprogramming.com
    Replies: 25
    Last Post: 06-09-2005, 12:42 PM
  4. Need advice: catch exceptions or call methods to check bits?
    By registering in forum C++ Programming
    Replies: 1
    Last Post: 10-03-2003, 01:49 PM
  5. Throwing exceptions with constructors
    By nickname_changed in forum C++ Programming
    Replies: 14
    Last Post: 07-08-2003, 09:21 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21