MFC + 64Bit OS + VS2010 + Debugging = System.AccessViolationException

Once again getting my hands dirty with old C++ MFC code and I ran into strange problem.

It looks like this has been well-known issue since VS 6.0 over VS2005 up to newest 2010 version.

If you are trying to debug C++ MFC application on 64Bit OS using Visual Studio 2010 you will most likely get  System.AccessViolationException in “Unknow Module”.

 

AccessViolation

Did some research over MSDN and as it turns out only solution to this problem is to disable RPC debugging.

 

DisableRPC

In Visual Studio go to Tools->Options->Debugging->Native and just uncheck “Enable RPC debugging”. This setting is always enabled by default.

I will defiantly find my own post search for this solution in near future Smile.

Hope it helps you and please don’t use MFC any more Winking smile.

blog comments powered by Disqus

About me

Bizic Bojan is Freelance Software Development Consultant with focus on C++, Qt and .NET based software solutions development. 

 

Disclaimer:

The opinions expressed herein are my own personal opinions and do not represent my employer’s view in any way.

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.