"First-chance exception" meaning in MFC Application?

1

When I run my Windows Application(MFC) I get two Warnings.

First-chance exception at 0x01046a44 in XXX.exe: 0xC0000005: Access violation reading location 0x00000048.

First-chance exception at 0x75fdb9bc (KernelBase.dll) in XXX.exe: 0x000006BA: The RPC server is unavailable.

May I know what they mean?

visual-c++
windows-7
mfc
media-player
dialogbasedapp
asked on Stack Overflow Oct 4, 2012 by vasanth kumar • edited Nov 20, 2019 by Cœur

3 Answers

6

What is a first chance exception?

When an application is being debugged, the debugger gets notified whenever an exception is encountered. At this point, the application is suspended and the debugger decides how to handle the exception. The first pass through this mechanism is called a "first chance" exception. Depending on the debugger's configuration, it will either resume the application and pass the exception on or it will leave the application suspended and enter debug mode. If the application handles the exception, it continues to run normally.

See this Article for more details.

answered on Stack Overflow Oct 4, 2012 by Jainendra • edited Oct 10, 2016 by Jainendra
2

This error means, that code from ntdll tries to access virtual address 0x00000048, that is not accessible. Maybe you call some function from ntdll and pass invalid pointer as a parameter.

answered on Stack Overflow Oct 4, 2012 by Evgeny Lazin
2

An access violation is where you're trying to read a memory address that isn't yours; given the read address is very low in memory, I would guess that you've got a pointer to a class or struct that is actually null, and your code is attempting to access one of its members.

answered on Stack Overflow Oct 4, 2012 by Rowland Shaw

User contributions licensed under CC BY-SA 3.0