该内容不适用于您选择的语言

该内容将以另一种语言显示出来。 您可使用浏览器的翻译功能查看内容。

LabVIEW Internal Error: Failure in XXX.c / XXX.cpp at line YYY

Updated Feb 20, 2024

Reported In

Software

  • LabVIEW

Issue Details

I received a LabVIEW Failure in XXX.c / XXX.cpp at line YYY message. What happened and how do I fix it?

Solution

These types of errors are LabVIEW internal errors. A LabVIEW internal error provides an indication that a condition exists that prevents LabVIEW from continuing execution. Generally, LabVIEW reaches points in its internal code where it checks to determine if certain conditions are valid. Under normal circumstances, these conditions are met, and LabVIEW is equipped to handle them. If they are not valid, LabVIEW reports an internal error (DAbort). LabVIEW reports the internal error and stops because to do otherwise would risk corrupting VIs in memory.
There are many causes of internal errors. For this reason, it is helpful to know the steps that lead to the error so that LabVIEW can be modified to account for this condition in future releases. In LabVIEW 7.0 or later, when LabVIEW is restarted you will be prompted to investigate the internal error. In this dialog, you are asked to send National Instruments information on the error along with the error log. This simplifies the process of reporting errors so that any problems found can be studied and resolved in future releases. Follow the next recommendations accordingly. 

General suggestions for troubleshooting LabVIEW internal errors

  • Makse sure the code was developed for a version of LabVIEW with the same bit version. This problem can occur if you try to run LabVIEW 64 bits code in LabVIEW 32 bits.
  • Update LabVIEW to its latest available version update.
  • Mass compile your VIs by going to File » Mass Compile or Tools » Advanced » Mass Compile in your Project Explorer. If you upgraded LabVIEW from an earlier version, you may have some older VIs that were not updated. Mass compiling updates VIs to the current version of LabVIEW. Check the log in the mass compile window after the compilation for any VIs reported as broken.
  • Delete all files in your temporary directory. For Windows XP and above, open Windows File Explorer, and type %temp% into the address bar, pressing Enter afterwards. For Windows 95/98/Me, the default temporary directory is C:\Windows\Temp; for Windows NT/2000 it is C:\WINNT\Temp.
  • Try running your application on another operating system. It is vital for troubleshooting to know if the problem is platform-specific (i.e., the problem may only exist on a specific operating system).
  • Contact the manufacturer of your video hardware and/or printer and request the latest driver. LabVIEW is graphics intensive and may expose problems in video drivers that other programs do not.
  • Rewrite the problematic VI from scratch. This will fix any dependency issues that remain undetected after troubleshooting.

Errors involving image.cpp, image.c, window.cpp, drawmgr.c, color.c, panel.c, panelsup.c, textmgr.c, or fontmgr.c 

These errors commonly occur when editing, but may also occur when printing. Try the following suggestions:

  • These LabVIEW internal errors are most often fixed with the latest video/printer driver. Be sure to contact your hardware manufacturer and install the latest driver. An easy way to determine if your specific LabVIEW internal error is "driver-related" is to move your code to another machine with a different set of drivers and see if the error persists. If the problem is printer related, try another printer.
  • On Windows, the standard VGA driver provided by the operating system is very stable. Try using this driver in place of the specific one written for your video hardware. If the error is eliminated, there is likely a problem with your vendor-provided video driver. 
  • Try adjusting the color palette your driver uses (e.g., 256 color, high color, true color). The error may occur only in one of these modes. Also, change the display resolution example: change from a 1920 x 1080 display to a 1024 x 768 display for testing.
  • If the error occurs while printing, try adjusting the printing options in the LabVIEW Tools » Options » Printing menu.
  • On older Windows operating systems, hardware acceleration can cause trouble. Certain video drivers support acceleration modes, using a non-accelerated mode often eliminates the error. On Windows 95/98, right-click the My Computer icon and select Properties from the shortcut menu. On the Performance tab, click the Graphics button and change the Hardware Acceleration (e.g., if it is set to "Full", lower the setting). On Windows 2000/NT, right-click the Desktop and select Properties from the shortcut menu. On the Settings tab, click the Advanced button and go to Troubleshooting.

Errors involving memory.cpp, allocate.cpp 

These can be attributed to incorrect calls to external code modules (e.g., calling a DLL or CIN that incorrectly allocates memory). Try the following suggestions:
  • In LabVIEW 8.0 or later, refer to the Memory Manager topic in the LabVIEW Help for more information about the memory manager.
  • In LabVIEW 7.1 or earlier, refer to the Memory Manager section of Chapter 4, Programming Issues for CINs, of the Using External Code in LabVIEW  (downloadable from the link) manual for explanations and proper usage of the memory manager (a set of platform independent routines for allocating, manipulating, and deallocating memory from external code modules).

Errors involving thread.cpp 

These errors most frequently occur when making a DLL (dynamic link library) call in a multithreaded environment. Try the following suggestions:
  • Make sure that your DLL is reentrant. Right-click on the Call Library Function Node and select Configure from the shortcut menu. There is a pulldown menu with two options: Run in UI Thread and Reentrant. Select Reentrant.
  • In older versions of LabVIEW: Disable multithreading in LabVIEW. Select Edit » Preferences » Performance and Disk (or Tools » Options » Performance and Disk, depending on your version of LabVIEW) and uncheck Run with Multiple Threads.

Errors involving fpsane.cpp 

These are associated with insane objects . Try the following suggestions:
  • Look at the error log and determine if the problem appears to be with a component (wires, controls, indicators, etc.) on the front panel or block diagram.
  • If you can load the VI, use a binary search to identify which component is causing the problem. Remove that component and add a new one of the same.
  • If you can't load the VI, restore a working backup and re-implement your changes. If this is not possible, contact NI Support and request they investigate to see if they can repair the VI.
  • If you can't load the VI in a new version of LabVIEW, use a binary search (modify in old version, load in new version) to identify which component is causing the problem. Remove that component, load the VI in the new software, add the component back in.

Errors involving NumericSupport.cpp and Image.cpp

These are generally related to security policies. Try the following suggestions:
  • Run LabVIEW with a user account with full admin rights. Right-click LabVIEW and select Run as administrator to verify if that is your case.
If you still encounter a LabVIEW internal error after following these suggestions, contact National Instruments Technical Support and attach an example VI that demonstrates the crash, so that we can more easily help diagnose the problem. Please include as many details as possible for us to recreate the issue.

Attachments