The World Simplified is a Virtual World

The Adventures of Justin Zarb and Dave Falkus in the Virtual Jungle

R6030 - CRT not initialized

R6030 - CRT not initialized

  • Comments 17
  • Likes

I had an interesting issue a few months ago on a customer site. The customer had sequenced an application and could deploy the said application fine to Windows XP but whenever they deployed it to the Terminal Server/Citrix Farm the application generated an error. The customer raised it over on AppVirtGuru and we got stuck into looking at what was going on.

When the customer tried to execute the application on the Citrix Farm they received this error;

image

Microsoft Visual C++ Runtime Library
Runtime Error!
R6030
- CRT not initialized

After much sole searching and playing I worked with one of our Escalation Engineers Sasha Loncarevic about this problem and we tracked this down to a timing problem with Citrix Edge Site and the initialization of the Application.

This is what we believe to see happening:

  1. APP-V starts process suspended, and injects SFTLDR.
  2. Citrix driver sees process start, and injects csma_ldr.dll (CSMA_LDR.DLL : hook initializer for the Citrix EdgeSight Agent. This DLL will check if the process that it’s trying to inject itself in is in the exclusion list. ), to be loaded via APC.
  3. APP-V un-suspends the process and SFTLDR initialises itself
    During its init it transitions to kernel mode via an IOCTL for a hooked reg read.
  4. The OS drains the APC queue on completion of the IOCTL, allowing the Citrix DLL to be injected
  5. This happens whilst SFTLDR is still initialising, and before (in my applications case MSVCR90.dll) has done its own initialisation, hence the error.

After chatting to a few buddies over at Citrix. They suggested some options :

1) Try the EdgeSight Agent 5.3 which has many fixes related to DLL injection BUT if it does fix the issue, you may have to upgrade the EdgeSight Server also…

2) Try to exclude this application process (foo.exe “your applications exe name”) from being hooked by csma_ldr.dll :

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\rskcore

Name:          UviProcessExcludes

Type:            REG_SZ

Data:             application_process.exe

Separate any multiple values with a semi-colon.

**There are some caveats to this registry fix:

1. This value must be set on a per-EdgeSight agent basis.  Every machine that is expected to encounter this issue would need this registry value. For now, test the fix on a single server.

2. There is no way to configure this from the EdgeSight Server.  It must be entered manually or pushed via GPO or some other bulk registry changing technology.

3. This setting will not take effect until the machine is rebooted.

we tested option 2; after a reboot no more problems with our application issue.  So, if you need to run Edgesight with your application and having the above error, and the update per option 1 above doesn’t resolve the problem, give option 2 a try to get you back up and working.

Comments
  • <p>Had the same issue with Xstart (Part of Exceed 14). &nbsp;I added xstart.exe to the Reg Key, rebooted and then it worked.</p> <p>Just wanted to say thanks for the post.</p>

  • <p>Aspentech graphics editor was affected by this too, added to reg key, works fine now... This article saved us a massive amount of debugging time, Thx!</p>

  • <p>I actually have that issue with Batman: Arkham Asylum, Blacklight: Tango Down and a few other games. It&#39;s very frustrating, and I can&#39;t find a single website that can help me out on the matter.</p>

  • <p>Thank you for posting this. We spent a lot of time troubleshooting with no solution. This fixed our issue with a financial app.</p>

  • <p>Justin,</p> <p>You are amazing. Thanks for this post. Saved so much time for me. We just deployed EdgeSight Agent in our XenApp environment and Visual Studio 2008 App-V application broke with the same error. Added &#39;devenv.exe&#39; in the registry (option -2) and all good.</p> <p>Thanks again</p> <p>Raj Y</p>

  • <p>Hi Justin,</p> <p>Yeah, very good find and comentary here. Thanks.</p> <p>Unfortunately I believe the problem is bigger than a few registry entries to alleviate certain executables.</p> <p>We have a series of Asobe products, at least three other vendors supplied exe&#39;s and wait for it... virtualised MS Office 2010. Thought you might like that one. </p> <p>To date, we have established that the removal of Edgesight agent has gotten us around the problem, however thats not a resolution either. We have Citrix looking at it right now, let you know what the outcome is. If in the meantime you are able to provide us with a further thought, be glad to try.</p> <p>Cheers Cenzo</p>

  • <p>Justin, &nbsp;Your a life saver m8. Used the registry fix to all of our XenApp servers and it worked a treat. Luckily for me, I already knew to look on here for you which saved me a bucket load of tiime and effort.</p> <p>Take care fella.</p> <p>Angelo.</p>

  • <p>I&#39;m getting this error message on so engine dyno software and was told by the supplier that if it works on another computer (which it does) then it is a fault with my computer and not the software. I have read all the comments and advice above and am not computer literate enough to act on it,so could anyone talk me through it or help me out in any way with this. </p> <p>Thanks,</p> <p> Gemzoe</p>

  • <p>I installed Corel Videostudio x4 and encountered the above when I clicked on the icon to start the program. </p> <p>I then clicked Start / All Programs and found the program. I clicked on it and it started ok. </p> <p>I deleted the existing icon and replaced it by copying the program from the All programs list.</p> <p>Whether this helps anyone is unknown but I thought it worth a mention.</p>

  • <p>Hi, Could you advise which Register Key we could try this on if we are getting the error on a standalone machine, &nbsp;not over Citrix. Can&#39;t see the RSKCore folder under the above string. We have managed to get this working on a Citrix setup following the above steps. Cheers</p>

  • <p>Hi, We are experiencing a similar issue at one of our client sites. </p> <p>XenApp 5 with EdgeSight 5.4 on Server 2008, including Office 2010.</p> <p>The entire Farm is virtual.</p> <p>Have tested the registry work-around, but this no longer appears to work.</p> <p>The difference between the above setup and ours is that Office 2010 has been fully installed on the server.</p> <p>If I uninstall the EdgeSight Agent, the applications work perfectly. Have tested this on multiple servers and the results are identical, run-time error.. :-(</p> <p>I have searched but have not been able to find more information regarding this problem, with the exception of this post.</p> <p>Next steps would be to log a call with Citrix/Microsoft.</p> <p>Any ideas of feedback would be welcome.</p> <p>Thank You</p> <p>Johann</p> <p>Johann.VanAntwerpen@bcx.co.za</p>

  • <p>This solved a problem I was having with Adobe Photoshop Elements, Flash Professional and Microsoft Autoroute among others. &nbsp;Nice one!</p>

  • <p>Did you just have to enter the exe name or the full path to the exe?</p>

  • <p>Could someone tell me how to fix the same error on gta san andreas ? + If I&#39;ll need a reboot - how to do that reboot ?</p>

  • <p>I&#39;m getting this error when I try to launch X-Rite&#39;s i1Profiler. Had my employer&#39;s IS dept. manually tweak Citrix XenApp to allow me to connect remotely to the office. Not sure if the timing of the tweaking coincides with the error but could there be a connection?</p>

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment