Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
1 ratings:
 3 out of 5     Rate this Document

System Level Exception When Calling LabWindows™/CVI .obj File From TestStand Sequence

Primary Software: TestStand
Primary Software Version: 3.0
Primary Software Fixed Version: N/A
Secondary Software: LabWindows/CVI Run-Time Engine

Problem:
Why do I get a System Level Exception when I try to call a LabWindows/CVI .obj file from my TestStand sequence?

Solution:
This behavior can be caused by Data Execution Prevention (DEP).  DEP is a Windows security feature that prevents code from executing in certain situations.

By default on Windows XP and Vista, DEP is set to 'Opt-In.'  This means that any process can allow itself to be bound by the rules of DEP.  Usually only system processes have this option set, but you can build programs which 'Opt-In.'

The TestStand Sequence editor does not 'Opt-In' to DEP but if you are creating a custom User Interface, and you are having this problem,  you can disable DEP for your program.  There are two steps to this process:

  1. Ensure DEP is only enabled for essential Windows programs and services.
    • On Windows Vista or Windows XP:
      • From the Control Panel, choose System Properties.  Choose the Advanced tab and click on Settings under Performance.  On the Performance Options dialog, choose Data Execution Prevention from the list of tabs at the top.  Ensure that the first option Turn on DEP for essential Windows programs and services only is set.

    • DEP is not supported on Windows 2000.
  2. Disable the opt-in flag for your program.
    • To check if your program has the opt in flag set, you can use the Visual Studio command line tools.  They are usually installed under Start»Programs»Microsoft Visual Studio 200x»Visual Studio Tools»Visual Studio 200x Command Prompt.  When the command prompt starts, type the following command: dumpbin /headers <filename> but replace <filename> with the full path to your program.  Listed under Optional Header Values the option that allows DEP is named NX compatible.  If this option appears, then your file is set to 'Opt-In' to DEP.  To remove this option, please see Microsoft Help: Linker Options: /NXCOMPAT.

Some Data Execution Prevention features are based in hardware.  Only computers whose hardware supports DEP can use all features.  Therefore, even with the same software settings, you may experience different behavior on different computers

 

 



Related Links:
MSDN Linker Options: /NXCOMPAT
Wikipedia: Data Execution Prevention

Attachments:





Report Date: 04/07/2008
Last Updated: 04/25/2011
Document ID: 4K69OJT3

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit