LabVIEW Crash DAbort in image.cpp or drawmgr.cpp

Updated Nov 26, 2021

Reported In


  • LabVIEW

Issue Details

  • My LabVIEW program has been crashing with errors in image.cpp or drawmgr.cpp
  • I am running a stand alone LabVIEW application through a cRIO-9034 and it has been crashing with an error in drawmgr.cpp
  • I have noticed in Windows Task Manager that the number of GDI Objects used by LabVIEW approaches 10,000
  • The error is inconsistent in when it occurs
  • This happens during edit-time, run-time and startup


  • Try reducing the amount of front panel objects.
    • This will help reduce the total amount of GDI objects used by LabVIEW.
    • If your GDI objects increase over time when running a VI, check for recursive elements within your VI that could be repeatedly rendering objects on the front panel. For this, you can track your GDI object usage in the Windows Task Manager (see Additional Information below).
  • Change the limit of GDI object handles. A method for increasing the number of GDI objects in Windows (after 2000) is described in MSDN:GDI Objects (Windows).
  • Install the latest video driver from the manufacturer. This will generally fix the memory leaks that lead to GDI overflow.
  • Change the palette loading setting.
    1. In any LabVIEW window go to the top tool bar and navigate to Tools»Options... 
    2. This should open the options window. Navigate to Controls/Functions Palette.
    3. At the top there should be options for loading, select Load palettes when needed to try mitigate crashing.
  • Remove unnecessary libraries from your <LabVIEW>\user.lib directory. LabVIEW uses a GDI object for each palette image, so large numbers of palette VIs will contribute to this crash.
  • If you are continuously opening and closing a database in your VI, increase the amount of time before connecting to the database by collecting more data to send.
  • Rebooting your cRIO (or other hardware used) may provide a temporary solution but please follow the steps detailed above to prevent the issue from arising again.
  • Call the National Instruments support if the the problem still persists after investigating the options above to help troubleshoot the problem further.

Additional Information

GDI (Graphics Device Interface) objects are a fixed Windows resource responsible for representing graphical objects. Each GDI object is private to a process, meaning only the process that created the GDI object can use the object handle. 

Each process, including LabVIEW.exe is limited by Windows to 10,000 GDI objects, and requests for more GDI objects causes LabVIEW to crash. This crash is caught by NI Error reporting tool (NIER) as DAbort in image.cpp or drawmgr.cpp.To confirm that excess GDI usage is the cause of the crash, use Windows Task Manager to view how many GDI Objects are being consumed by LabVIEW. For Windows 10, GDI values are not shown by default. You need to go to details table in Task manager -->Right click on "Name" Colums and "Select columns".