9

After installing VS2012 and .NET 4.5 both Visual Studio 2010 and 2012 started hanging when debugging our application with a fatal error 0x8007000e. I know this error means the process is out of memory and I can see on task manager the devenv.exe process memory growing until it reaches the 3GB limit. At this point the exception occurs.

On the machines that don't have .Net 4.5 everything works fine. Our application is built in .Net 4.0 and migrating to .Net 4.5 it is not an option. Is there any workaround for this? We would like to start using VS2012 but we can’t migrate all of our applications for .Net 4.5.

Thanks for the help,

Nuno Pereira

nflash
  • 430
  • 3
  • 16
  • you dont have to migrate applications to 4.5. Anything that was working on 4.0 should work with 4.5. And your projects should open and compile on the machine with VS2012 alone without retargetting to 4.5. – Anand Nov 21 '12 at 01:43
  • Anand, I know I don't have to migrate applications to 4.5. I think you don't understand our problem. When debugging our application built in .net4.0 in a machine with .net4.5 installed, Visual Studio crashes because the devenv process is trying to use more than 3GB of memory. This means that we can't start developing new projects in .net 4.5 because by installing .net 4.5 we won't be able to debug our existing application. – nflash Dec 03 '12 at 18:00
  • Any help with this would be welcome. I wasn't able to find anything about this subject. Any machine that has .net 4.5 crashes VS while debbugging our .net 4.0 application. – nflash Dec 13 '12 at 15:06
  • please send email to netfx45compat@microsoft.com with environment details. – Anand Dec 13 '12 at 18:08
  • Is your app calling MemoryFailPoint API? Or did you see this API being called in stack trace? Is is possible for you to provide us a repro application? All this information will help investigating the issue in house. – Anand Dec 14 '12 at 22:50
  • If your app is not using MemoryFlashPoint API then can you please take a minidump of the process using procdump -ma devenv.exe ProcDump can be downloaded from http://msdn.microsoft.com/en-us/subscriptions/dd996900.aspx this will help in analyzing memory leak – Anand Dec 15 '12 at 00:49
  • Any update on the above comments? – Anand Jan 13 '13 at 21:35
  • Hi, Sorry for the delay. I've sent you a mail with a link to the memory dump. We are not using MemoryFailPoint directly, but we use 3rd party components from DevExpress and I don't know if they use the MemoryFailPoint API. thanks for the help – nflash Jan 14 '13 at 16:06
  • Thanks!. I have informed concerned team and we will get back to you on this soon over email. – Anand Jan 15 '13 at 00:20
  • @nlflash Does your application by chance interact with any large web services? – xbrady Jan 18 '13 at 18:25
  • @xbrady yes we use web services with large datasets. I've posted a solution provided by Anand and Kevin Halverson. – nflash Jan 22 '13 at 14:07

2 Answers2

4

If you run under .NET 4.5 framework, but compile in .NET 4, you might want to try adding this to your config file:

<configuration>
  <system.xml.serialization>
    <xmlSerializer useLegacySerializerGeneration="true"/>
  </system.xml.serialization>
</configuration>

As suggested to me in this link:

Serialization breaks in .NET 4.5

Community
  • 1
  • 1
omer schleifer
  • 3,897
  • 5
  • 31
  • 42
  • I've also found this solution after posting the above solution. I think this is a better solution as it does not requires to change project settings to all projects that have objects serialized. – nflash Apr 08 '13 at 10:42
3

I've received feedback from Kevin Halverson about this issue. It seems that it is related to XmlSerialization. Generating static serialization assembly prevents the error from happening. Static serialization assembly can be generated using ‘sgen.exe’, ‘svcutil.exe /t:xmlSerializer’ or by turning on the ‘generate serialization assembly’ option on the project’s properties in Visual Studio.

Thanks to Anand and Kevin for all the help.

nflash
  • 430
  • 3
  • 16