You are on page 1of 2

Case Study: Error in javascript program

*RUNTIME ERROR

Problem Description:

This case study provides a brief description of the Microsoft Visual C++ Runtime Library error a customer
encountered when Memory Optimization is enabled, a list of troubleshooting steps and a resolution.

Problem:

The XenApp 4.5 servers display the following C++ Runtime Error pop-up message when the
Administrator logs on to the server after the execution of the Memory Optimization (CtxBace.exe)
process which occurs after a server reboot or during the Memory Optimization Interval (default of 3AM).

“Microsoft Visual C++ Runtime Library Runtime Error!”

“Program: C:\Program Files\Citrix\Server Resource Manag…”

“R6034

An application has made an attempt to load the C runtime library incorrectly.

Please contact the application's support team for more information.”

User’s access to published applications are not affected when this occurs.

Cause:

An application installed on the customer’s XenApp Servers whose executable, APPLICATION.exe, was
being rebased by CtxBace.exe. As a result, the launch directory became that of CtxBace.exe and not the
directory of APPLICATION.exe. Any searches for dependencies of APPLICATION.exe were searched
starting from the CtxBace directory path rather than the application’s path. This became a problem
because the application did not set its directory path in the PATH variable.

In such cases, all attempts to call the dependent libraries failed, causing APPLICATION.exe to attempt to
load MSVCR80.dll from “C:\Program Files\Citrix\Server Resource Management\Memory Optimization
Management\Program” and not from the application’s directory. ProcMon shows the DLL search of
APPLICATION.exe leads it to its original directory path from where it should have successfully loaded the
DLL. However, even that fails which only means that the alternate stream for the DLL is corrupted.

Solution:

The following steps where helpful in finding the root cause:


1. The repair.sfo file was reviewed for problematic DLLs found during the rebasing process. The repair.sfo
is located in the C:\Program Files\Citrix\Server Resource Management\Memory Optimization
Management directory.

2. ProcMon was used at the time of the Memory Optimization execution to determine what process was
attempting to load MSVCR80.dll.

Recommendation:

The issue was resolved by excluding both MSVCR80.dll and APPLICATION.exe from the Memory
Optimization process using the Windows registry settings below on the XenApp 4.5 servers.

Technical Perspective:

This procedure requires you to edit the registry. Using Registry Editor incorrectly can cause serious
problems that might require you to reinstall your operating system. Citrix cannot guarantee that
problems resulting from the incorrect use of the Registry Editor can be solved. Use the Registry Editor at
your own risk. Back up the registry before you edit it.

* HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\SFO\ComponentExclusionList

REG_DWORD: msvcr80.dll

Value: 0

* HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\SFO\ProcessExclusionList

REG_DWORD: python.exe

Value: 0

You might also like