Design with many images exits if it hits 10000 Win GDI max

An image in Altia Design is imported from an image file and it becomes a Raster object or Stencil object in Altia Design/Runtime or an image file is referenced dynamically using an Image object in Altia Design/Runtime. In any case, to render the image requires the use of a Windows GDI object.

There is one (1) GDI object used per image in an Altia design, but there are also GDI objects used to render dialogs (such as the Open File dialog) and windows (such as the Animation Editor, Stimulus Editor, Control Editor, Models View, etc.). The GDI objects used by dialogs and windows account for at most about 500 GDI objects at any specific time.

Windows (XP, Vista, 7, 8, 10, etc.) has a default limit of 10,000 GDI objects per process. If the Altia process runs out of GDI objects because there are so many images in a design (probably more than 9,500), the Altia process will exit unexpectedly or Windows will display a dialog saying the Altia process encountered a problem or unexpected error and needs to close. There is no easy way to recover when GDI objects are not available for rendering.

This can happen when:

  1. More images are imported or Image objects are added to a design that already has many, many images.
  2. A .dsn design file or XML/SVG file containing more images is imported.
  3. A .dsn design file containing more images is opened as a library from the Models View or when it is copied into Altia Design from the Models View.
  4. It can happen by panning in Altia Design or a Models View when the design has many, many images because this requires Altia to render more and more images (which requires more GDI objects).
  5. A .dsn design file opened in Altia Design has many Image objects not showing.  The number of GDI objects used is relatively small to start (for example, up to 500) because a hidden Image object does not use a GDI object until it needs to load its image.  If the Validate Design option is pressed from the Validator pane, many more GDI objects are needed because each Image object must load its image whether or not it is showing.  This requires an additional GDI object per Image object.
  6. A .dsn design file opened in Altia Design has many Image objects not showing, but Real-Time Validation is enabled.  In this case, Real-Time Validation executes in the background to validate all objects in the design. As each Image object is encountered by the Validator, the associated image gets loaded.  This requires an additional GDI object per Image object.
  7. DeepScreen code is generated for a design with many images.  The DeepScreen code generator is a separate executable started by Altia Design.  The DeepScreen code generator executable must load each image to generate the data for that image.  This requires a GDI object per image.

If there is a GDI limit issue, this will show in the Processes tab of the Windows Task Manager :

  • Altia Design 11 :  altia.exe process
  • Altia Design 8 / 9 / 10 : altiaengine.exe process.
  • the "classic" Altia Design 7.0 or earlier : altia.exe process.
  • the Altia Runtime altiart.exe process.
  • the DeepScreen code generator altiagen.exe process.

Before Altia process exits or needs to close, the GDI Object count for the .exe process will be very close to 10,000 if there is a GDI limit issue.

If there is not a GDI column showing in the Windows Task Manager, use the View->Select Columns... option in the Windows Task Manager to select GDI Objects as a column.

A workaround is to increase the per process GDI limit. Here is a helpful web page:

The bottom line? Increase the registry setting for GDIProcessHandleQuota in HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Windows. The default setting is 10000. It can be increased to 65535. The 65535 value is the theoretical maximum allowed by Windows.  The actual maximum number of GDI Objects for a specific computer may be less.  With GDI Objects set to 65535, Altia has seen a design with 17,000 images allocate 17,000 GDI objects successfully.  Altia does not have experience with designs using more than 17,000 images.  It is not a recommended practice to create designs with so many images.  Many large designs seldom exceed 3000 images.

Have more questions? Submit a request


Please sign in to leave a comment.