Troubleshooting Error: Loader Lock was detected

While working with Redemption library, we usually get the following error while debugging the project.

Attempting managed execution inside OS Loader lock. Do not attempt to run
managed code inside a DllMain or image initialization function since doing so
can cause the application to hang.

As per Dmitry Streblechenko (Redemption Team), this exception is raised when .NET thinks that a dll that it is loading is doing something that can potentially lock the loader (like circularly loading dlls etc). Redemption does load the MAPI libraries at the startup, but that is about it. That warning can be safely ignored.

 

Work-Around:

We can skip this error by clearing the LoaderLock checkbox in Debug -> Exceptions -> Managed Debud Assistants.

Debug | Exceptions | Managed Debug Assistants > LoaderLock (Uncheck this!)

Redemption Library is really wonderful creation. It helps the developers a lot in handling and accessing some attributes of Outlook Items which cannot be accessed using the API given by Microsoft.

Advertisements
This entry was posted in Troubleshooting and tagged , by Pranav. Bookmark the permalink.

About Pranav

A Software Engineer by profession and a Geek at heart. I love exploring new technologies and working on algorithmic problems. As of now, I write code for bread, butter and satisfaction. I like to develop applications, and generally that involves much more than writing code. It’s not just about hurling code, but producing something meaningful that has a measurable and positive impact, helps others and solves interesting problems.

4 thoughts on “Troubleshooting Error: Loader Lock was detected

    • Hi Eric,

      Glad to know that you have visited my blog. Thanks a lot!
      Good to know that this tip works for Add-in Express too.

      I have worked with Add-in Express controls too. They ease the development process and lessen the project duration.

      • I use both Redemption and Add-In Express, both FINE products! I’ve been getting this error with some ADX work with Excel. Good to know the issue is recognized and can be ignored.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s