Aller au contenu principal



Out Of Memory


5 commentaires

  • Avatar
    Ian Cummings
    1. What is the edition, version and build of BarTender in use?

    2. Which version of Windows are you using?

    3. The problem you're experiencing probably has to do with the non-interactive desktop heap memory value. This is a portion of memory reserved for use by Windows services.

    Here is some background information:

    When BarTender is used in a "service context", it can be negatively impacted by a system setting known as "desktop heap". It is important to understand when this can occur, and how to correct the problem.

    Desktop Heap
    The "desktop heap" is a certain area of memory that is used to store information about windows, as well as objects that are used for drawing and printing. For more advanced technical information about what desktop heap is, see here:

    In general, console (command line) applications do not use desktop heap memory. However, BarTender is a "Windows application", rather than a console application. When Commander controls bartend.exe processes one must understand that the BarTender application file is an integral part of the label designer, and it is impossible to print without creating several different windows, including the entire editor view. Those windows exist even when you cannot see them, and they use "desktop heap" memory.

    Each instance of BarTender takes up desktop heap memory, and each format that is opened uses a bit more. (The exact numbers are difficult to measure, and vary by version, but in general as we add features in newer versions, we've been using a bit more desktop heap.)

    The total amount of desktop heap memory depends on the "session" you are using. When you log in to your system, you have a visible "desktop" that belongs to your user name. That session has a block of heap memory, which is shared between applications in that session. If a different user logs in through Remote Desktop, they are using a separate desktop heap. The amount of desktop heap memory available to these sessions is known as the Interactive Desktop Heap.

    Services run under a different session and have their own "desktop", even though you can't see it. Each service can have its own desktop, and therefore its own desktop heap. But there are many services on your system, so in order to limit the memory usage, Windows defaults the desktop heap size to a much lower value in this case. The amount of desktop heap memory available to these sessions is known as the Non-Interactive Desktop Heap.

    Now, BarTender always uses desktop heap memory (every application that shows a user interface does). The interactive desktop heap is a number large enough to let you open thousands of windows, so we rarely see desktop heap as a problem in interactive sessions. But when running as a service, we can max out the default non-interactive desktop heap.

    This can be difficult to diagnose. A common symptom is that when loading another format, BarTender may log an error like "Failed to create empty label format." However, this message is not guaranteed, sometimes BarTender will crash instead. It can also potentially print incorrectly, with missing fields. Depending on the credentials the service is running under, it may also be sharing a desktop heap with other services, and cause those services to malfunction in unpredictable ways.

    If you are running BarTender under a service context, and you are encountering any type of reliability problem which does not occur when running BarTender either interactively or when running Commander as an application, this is a possible cause.

    You can adjust the heap settings in the registry. However, the settings are embedded within a larger configuration string, and making a mistake is potentially dangerous. Therefore, we've created a tool to make this easier:


    You will need to reboot for the setting to take effect (restarting the service is not enough).

    Start with an increase of the Non-Interactive Desktop Heap to 1024K, if you still see problems bump this up to 2048 instead. the more BarTender processes you run in the BarTender Command handler and the more label formats you might open the higher the requirement for this value.

    It should be noted that in v9.40 SR2 or above we made significant changes to Commander to improve efficiency in memory usage and handling. If possible we highly recommend upgrading to the latest release.
  • Avatar
    Legacy Poster
    Hi Lan C,

    I facing the same issue while my heap memory is 2048. Do I still need to increase the heap memory?

    Best Regards,
  • Avatar
    Ian Cummings
    Much depends on the version/build of BarTender that you are using, the version of Windows, the labels formats you use and how many, and how you have configured the command handler. Let me know these things, attaching a Commander task list file, an example label format and trigger file, and I'll be better placed to comment.
  • Avatar
    Shashi Prakash Rai

    Hello There,


    I have the below version and license.

    Program: BarTender Designer 2016 R8
    License: Enterprise Automation (10 Printers)
    Version: (64-bit)
    OS: Windows Server 2019 Standard x64 build 17763

    I have Installed 5 printers while initializing the printers, I am not able to Intealize one among them. I am getting below exception:

    System.Runtime.InteropServices.COMException (0x80080005): Retrieving the COM class factory for component with CLSID {B9425246-4131-11D2-BE48-004005A04EDF} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)).

    Please help.

  • Avatar
    Peter Thane

    Not sure but for Windows Server 2019 compatibility it recommends that you use the latest version of BarTender 2016 which is R9 and not R8. 

    I am also not sure what you mean by initialising the drivers, but if they are the Seagull drivers are you using the latest version too to make sure they are Server 2019 compatible (current release is 2020.1)


Vous devez vous connecter pour laisser un commentaire.