One of the following error messages appears when trying to open an application in FactoryTalk View Studio:
Failed to load HMI Server service
Cannot connect to addin object, Name: Application Handler, Cause: 80042089
Server verification has failed,
Studio may hang on opening (while loading services)
Failed to instantiate service
Failed to load data server rshmi.tag server
The following error mesage appears when creating new local (standalone) or network (distributed) application
Failed to instantiate HMI Server
Alternately, Studio may hang on opening (at around 70%) without any error message.
This behavior is observed on a busy system, typically a laptop, that is simultaneously running services associated with various software applications ranging from:
In addition, the following error message has also been seen in association with the root cause described below:
Cannot connect to addin object
Name: Application Handler
Cause: 80042089
The behavior is caused by the system running out of so-called desktop heap. Aside from a visible desktop that hosts windows, menus, hooks strings, etc. there are also invisible desktops running under non-interactive Windows stations. These can be thought of as a collection of desktops associated with different processes.
All Rockwell services, and there are a number of them, run under LocalSystem account and that the checkbox Allow Service to Interact with the Desktop is not checked.
As such, Rockwell services require desktop memory from the special section of the desktop heap memory which is limited to 48Mb. The memory from this pool is assigned to the requesting non-interactive services in 512Kb portions by default.
However, the system-wide buffer of 48Mb is also serving other types of third party services:
On a busy machines, the total desktop heap might be exhausted prematurely, before Rockwell (non-interactive services) has a chance to allocate required desktop heap for their own needs.
The size of each desktop heap allocation is controlled by the following registry value:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\SubSystems\Windows
The default data for this registry value will look something like the following (all on one line):
%SystemRoot%\system32\csrss.exe
ObjectDirectory=\WindowsSharedSection=1024,3072,512
Windows=On SubSystemType=WindowsServerDll=basesrv,1 ServerDll=winsrv:UserServerDllInitialization,3ServerDll=winsrv:ConServerDllInitialization,2 ProfileControl=OffMaxRequestThreads=16
The solution is to modify the SharedSection value (highlighted in the registry key above) by increasing its third value (highlighted in blue) from 512 to 1024. The modification has been already included in the attached registry key. After the registry is applied, a reboot is mandatory.