26

What is this and how can I handle/fix it?

First-chance exception at 0x756fb727 in Program.exe:
Microsoft C++ exception: long at memory location 0x0018f7a4.

I am getting about a thousand of these each time I run my application. How can I track this down and fix it/

Zev Isert
  • 915
  • 11
  • 20
Chris
  • 21,549
  • 25
  • 71
  • 99

2 Answers2

73

In visual studio go to the Debug menu and select "Exceptions...". Turn on all the first chance exception handlers (they default to off).

Now when you run in the debugger it will break at the point the exception is thrown.

Aaron
  • 9,123
  • 5
  • 40
  • 38
8

Check it out

it may help you....

http://blogs.msdn.com/davidklinems/archive/2005/07/12/438061.aspx

Ashish
  • 8,441
  • 12
  • 55
  • 92
  • For whoever tries that link and ends up in Microsoft's current list of archived blogs: it seems to me it provided instructions for configuring first-chance exceptions in VS2003 and VS2005 (judging from "Configuring How the Visual Studio Debugger Handles Custom Exceptions" currently at https://learn.microsoft.com/en-us/archive/blogs/davidklinems/configuring-how-the-visual-studio-debugger-handles-custom-exceptions ) – Luis Mar 20 '20 at 15:13