R6030 – CRT not initialized

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;


Microsoft Visual C++ Runtime Library
Runtime Error!
- 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 :


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 (19)
  1. Anonymous says:

    Hi Justin,

    Yeah, very good find and comentary here. Thanks.

    Unfortunately I believe the problem is bigger than a few registry entries to alleviate certain executables.

    We have a series of Asobe products, at least three other vendors supplied exe's and wait for it… virtualised MS Office 2010. Thought you might like that one.

    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.

    Cheers Cenzo

  2. charlie says:

    Had the same issue with Xstart (Part of Exceed 14).  I added xstart.exe to the Reg Key, rebooted and then it worked.

    Just wanted to say thanks for the post.

  3. Kris says:

    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!

  4. Facelord says:

    I actually have that issue with Batman: Arkham Asylum, Blacklight: Tango Down and a few other games. It's very frustrating, and I can't find a single website that can help me out on the matter.

  5. Network Janitor says:

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

  6. Justin,

    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 'devenv.exe' in the registry (option -2) and all good.

    Thanks again

    Raj Y

  7. Angelo Pompeo says:

    Justin,  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.

    Take care fella.


  8. Gemzoe says:

    I'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.



  9. edotoole says:

    I installed Corel Videostudio x4 and encountered the above when I clicked on the icon to start the program.

    I then clicked Start / All Programs and found the program. I clicked on it and it started ok.

    I deleted the existing icon and replaced it by copying the program from the All programs list.

    Whether this helps anyone is unknown but I thought it worth a mention.

  10. Jenny Moore says:

    Hi, Could you advise which Register Key we could try this on if we are getting the error on a standalone machine,  not over Citrix. Can'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

  11. Johann Van Antwerpen says:

    Hi, We are experiencing a similar issue at one of our client sites.

    XenApp 5 with EdgeSight 5.4 on Server 2008, including Office 2010.

    The entire Farm is virtual.

    Have tested the registry work-around, but this no longer appears to work.

    The difference between the above setup and ours is that Office 2010 has been fully installed on the server.

    If I uninstall the EdgeSight Agent, the applications work perfectly. Have tested this on multiple servers and the results are identical, run-time error.. 🙁

    I have searched but have not been able to find more information regarding this problem, with the exception of this post.

    Next steps would be to log a call with Citrix/Microsoft.

    Any ideas of feedback would be welcome.

    Thank You



  12. Dan Gough says:

    This solved a problem I was having with Adobe Photoshop Elements, Flash Professional and Microsoft Autoroute among others.  Nice one!

  13. Andrew Jackson says:

    Did you just have to enter the exe name or the full path to the exe?

  14. siemka LT says:

    Could someone tell me how to fix the same error on gta san andreas ? + If I'll need a reboot – how to do that reboot ?

  15. Doug Huffman says:

    I'm getting this error when I try to launch X-Rite's i1Profiler. Had my employer'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?

  16. Manuel Cardoso says:

    Hi. I´m a musician and i get that error when i start my "Fxteleport" sync program (to sync two pcs in  music production).

    Please can you tell me how to adapt your solution to my case. I have some knowledge though i am not a expert and cannot figure it ou by myself.

    Be much obliged.

    If you´d like check me on FaceBook by writing:

    manuel cardoso tantra




  17. Bass says:

    I haven't got a *^&(*&^ clue what you are talking about.

  18. nik says:

    sic je ***

  19. Teodor Tounchev says:

    I am experiencing the same crashing the Explorer.exe on logon:
    Server 2008 R2 with VDA 7.6.
    App-V client 4.6 installed.
    App-V clent 5.0 SP2 installed.

    My Question is how did you managed to determine which process needs to be excluded?
    Thanks in advance!

Comments are closed.

Skip to main content