Why am I getting an exception whenever I use the CFileDialog?

4

Whenever I run my application under the debugger, I get the following exception when using CFileDialog to browse for a file to open

First-chance exception at 0x769db9bc in MyApp.exe: 0x000006BA: The RPC server is unavailable.
First-chance exception at 0x74e8cd99 in MyApp.exe: 0xC0020043: An internal error occurred in RPC.
MyApp.exe has triggered a breakpoint

This happens using VS2008 on Windows 7 64 bit, it doesn't happen doing the same thing under XP. There are no useful symbols on the call stack indicating why this is happening, and I can avoid the problem simply by turning off exceptions in the debugger, but I'm wondering why this is happening and how to avoid it.

c++
exception
mfc
asked on Stack Overflow Sep 1, 2011 by SmacL

2 Answers

13

First-chance exception messages can be safely ignored. In this case, this is part of Windows API internal implementation. Exceptions are thrown and caught somewhere. You need to turn off only first chance exception break in the debugger.

answered on Stack Overflow Sep 1, 2011 by Alex F • edited Sep 5, 2011 by Serge Wautier
6

Just to add to Alex's answer above, the exception can be ignored. To do this under VS2010, do the following;

  • Debug / Exceptions
  • Add, type is Win32 exception, number 0x6ba
  • Go to Win32 exceptions, and untick thrown under 6ba

This allows you to keep other exceptions active during debugging

answered on Stack Overflow Oct 13, 2011 by SmacL

User contributions licensed under CC BY-SA 3.0