VS2010 crash on clean with XE 2011 (any updates)

VS2010 crash on clean with XE 2011 (any updates)

We have solutions with mixed C++ and fortran projects. We have many crashes when cleaning the projects either by doing clean solution, or just by cleaning one project by itself. However, it is not consistent and i can not reproduce it in a small solution that i could send. When a project clean is crashing, i could just clean other projects and come back to the first one and it would not crash anymore.
This only happen on fortran projects, not the C++ ones.
Looking at the logs do not say anything. And if i attach a debugger to the visual studio crashing, the process return a value of 0xC0000005 so random memory issue.
Even for projects that can be cleaned without crashing, i always have a first-chance exception logged in my debugger:
"A first chance exception of type 'System.NullReferenceException' occured in Microsoft.VisualStudio.CommonIDE.dll"
Update 12 of the XE 2011 compiler gives me even more of those crashes than with update 10 which i was using before.
Has anyone encountered such an issue and found a workaround?
Brian Francis

11 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

This is not a problem I have seen reported before. Have you tried a reboot? It would also be interesting to boot in "Safe Mode" (press F8 during the initial Windows boot screen) and see if you can reproduce the problem there.

Retired 12/31/2016

I tried after rebooting Win7 x64 in safe mode and i still have the crashes.

Just so you know, i seem to have that NULLReferenceException occuring on all project (vcxproj and vfproj) in a mixed language solution. If i load a solution with only vcxproj then i do not have the exception.

I will try to do more test and see if i can have the same behavior in a test solution

If i create a mixed solution entirely by hand, i do not have a crash yet but the NULL exception occur. You can try this way.

1. Create a new solution by creating a win32 static library C++ project with the APP wizard. It should already have generated source files in it
2. Add new project fortran static library to the solution
3. Add a simple fixed form .for source file with a dummy subroutine
4. Attach a second instance of VS2010 to the one you have the solution loaded in order to debug it.
5. Clean any of the project and the other VS2010 debugger output pane will show the NULL exception.
6. Remove the fortran project from the solution in order to only have the C++ project left.
7. Clean again and this time the exception is gone.

Now if that NULL exception is valid for some reason, it might not be related to the crash but until i can reproduce my crash in a demo sample, it might be worth looking into the exception. Its also worth mentionning that when the crash occur during the clean, that NULL exception is the last line to appear on the debugger just before the crash.

I'm confused - both of the projects you'd have me create are static libraries. One can't debug that. Why are you creating a second instance of VS2010?

Retired 12/31/2016

Sorry for the confusion.
The c++ and the fortran project type in the solution are not relevant because we do not have to run them at all.
The second instance of VS2010, we will use it to "Attach to process" to the first instance containing the project. So we will debug VS2010 with another external debugger being the second instance.
This way, we can see debugging traces coming out of the first instance when you do the clean operation.
Hope it clears out the confusion :)

Ok, I followed your instructions but did not see any error when I did the Build > Clean. I do have the 2013 product installed, though. Have you tried that?

Retired 12/31/2016

Any way you can try it with 2011? Because i am not allowed to install a new major version at the moment.

Not in the next week or so. But I know I often did Build > Clean of mixed-language projects in VS2010 with the 2011 product and never had a crash of VS.

Retired 12/31/2016

Well, i find it strange since we have those crashes on 6/8 PCs. But it might be a specific project configuration which cause this.
Anyway the sample project i was asking to test was to verify that NULL exception trace as it might still be a bad thing and this one we have on all PC when cleaning ANY C+ or fortran project even when they do not crash.
Please find some time in the next week to test it and we will just live with it in the meantime.

I am doing a lot of customer visits next week, so my time is limited. I'll see what I can do.

Retired 12/31/2016

Leave a Comment

Please sign in to add a comment. Not a member? Join today