Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

VS2010 crashes with BSOD when target Framework is changed

All,

 

NI has been, and will continue actively working on a fix.

We believe the root cause is a bug in the Microsoft Visual Studio 2010 incremental build feature and reported the issue to Microsoft:
http://connect.microsoft.com/VisualStudio/feedback/details/632649/file-tracking-can-cause-improper-g...

We are escalating this issue via Microsoft's premier support channel.  In parallel, we have been attempting to work around the issue in our code.  We have a fix that addresses the file corruption/deletion issue and are working to get it posted as soon as possible.  We are actively investigating possible work arounds for the resulting blue screen and will provide a fix as soon as possible.

Until a complete fix can be provided, the best work around is to disable the incremental build feature in Visual Studio. This should be done for any project referencing National Instruments assemblies:
Add the following at the end of the <Project> tag in your .csproj file, prior to the </Project> tag:


  <PropertyGroup>
    <TrackFileAccess>false</TrackFileAccess>
  </PropertyGroup>

 

Additionally, because users have reported seeing these issues after targeting .NET Framework 4.0, we are no longer recommending targeting .NET Framework 4.0 as a workaround. Our official recommendation is to disable the incremental build feature in Visual Studio.

Justin E
National Instruments R&D
Message 51 of 70
(2,058 Views)

Thanks for the update Justin.

 

Could you please clarify what you mean by "we aren't recommending that work around."  Do you mean the inclusion of the tag just mentioned to disable incremental building or something else?

Grant M. Johnson
Project Engineer
LECO Corporation
0 Kudos
Message 52 of 70
(2,040 Views)

We aren't recommending targeting .NET Framework 4.0 as a workaround. The current recommended workaround is to disable incremental building. I'll edit my post to clarify this, thanks!

Justin E
National Instruments R&D
0 Kudos
Message 53 of 70
(2,034 Views)

Here is some background on the issue and an update of our status.

Technically, this is a compound problem:
* First, Microsoft introduced a bug with their Visual Studio incremental build support that changed the behavior of CreateFile().
* Our core driver component, NI-PAL, expects CreateFile() to adhere to documented behavior.  This change in behavior resulted in the issues you have seen.

Regardless of the source of the issue, we acknowledge that file deletion/corruption and blue screens are not acceptable and we are working hard to address this as quickly as possible.

We have identified the necessary updates to NI-PAL to avoid these problems.  We will be putting it through thorough testing this weekend.  Our goal is to provide this update next week.  

In the meantime, Microsoft has recommended the following work around:
Note: you must be logged in as an administrative user
1. Click the Start menu
2. Right-click "My Computer" ("Computer" on Windows Vista/7)
3. Click "Properties"
4. Click "Advanced" ("Advanced system settings" on Windows Vista/7)
5. Click "Environment Variables"
6. Under System Variables, click "New"
7. Enter "TRACKFILEACCESS" (without the quotation marks) for the variable name
8. Enter "false" (without the quotation marks) for the variable value
9. Click "OK" to dismiss each remaining dialog box
10. Reboot


We will continue to keep you informed as we have further updates.


Jason Hobbs
Software Group Manager

Message 54 of 70
(1,909 Views)

All,

 

National Instruments has released an update to NI-PAL that resolves the blue-screen and file deletion/corruption issues. You can obtain this update by installing NI Core Driver Updates 2.6.5, linked in the following KnowledgeBase:

KnowledgeBase 5IFBKBQ7: Visual Studio Projects Referencing National Instruments Drivers May Cause Bl...

 

We recommend ALL users who are currently experiencing this blue-screen and file deletion/corruption to install this update.

Justin E
National Instruments R&D
Message 55 of 70
(1,746 Views)

Does everybody agree that the BSOD problem is solved?

 

 

0 Kudos
Message 56 of 70
(1,543 Views)

I haven't had any crashes anymore since the fix.

 

Sjoerd

0 Kudos
Message 57 of 70
(1,520 Views)

Everything is fine on my end.

 

Grant

Grant M. Johnson
Project Engineer
LECO Corporation
0 Kudos
Message 58 of 70
(1,513 Views)

Is this fix included in the "NI Device Drivers 2011.02" release? Or do I still need to run the hotfix?

0 Kudos
Message 59 of 70
(1,473 Views)

Hi Ulf,

 

No, this fix is not included in the February 2011 Device Drivers release. You will need to run the hotfix.

Justin E
National Instruments R&D
0 Kudos
Message 60 of 70
(1,450 Views)