Solution
Each Windows process, including
LabVIEW.exe is limited by Windows to 10,000 GDI objects. Requests for more GDI objects cause LabVIEW to crash with an
DAbort in image.cpp or drawmgr.cpp error message. To solve this error follow the next suggestions
- Try reducing the total amount of GDI objects used by LabVIEW to avoid hitting the Windows Process Limit. The following are some ways to reduce this number:
- Try reducing the amount of front panel objects.
- 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. You can track your GDI object usage in the Windows Task Manager (see Additional Information section).
- 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. - Change the palette loading setting to load palettes only when needed, for this:
- In any LabVIEW window go to the top tool bar and navigate to Tools»Options...
- This should open the options window. Navigate to Controls/Functions Palette.
- At the top there should be options for loading, select Load palettes when needed to try mitigate crashing.
- 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).
- If you are using a LabVIEW version older than LabVIEW 2020 consider upgrading LabVIEW to at least version 2020, some changes were made in that version to reduce the GDI objects usage LabVIEW uses.
- 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.
- Install the latest video driver from the manufacturer. This will generally fix the memory leaks that lead to GDI overflow.
- 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.