LoaderLock detected

Jun 26, 2009 at 7:38 AM

Hi,

I just run into a problem, maybe there is help around.

I create a Test-Project and try to create tests for my parts. I create the container, the batch and do composition in the <font size="3">

<TestInitialize()>

</font>

Public Sub MyTestInitialize() function, works fine. Than some test starts and I get a LoaderLock-Exception. Whats wrong.

Maybe I have to explain, what the part is for. I have to control some bulky hardware. I decide to write a simulation for that, so I am able to work everywhere without it. Before MEF I manually resolve the imports. I create a lot of interfaces to do that.

Now a new version should be made and some new hardware is available also. I decide to solve this using MEF. I want to swap the hardware layer between my simulation and the two different hardware versions just by 'installing' the correct driver. Rest is up to MEF.

My simulation is little different from the hardware drivers, because it opens a WinForm which allows me to check values and set some test conditions. This scenario cames up before Unit Tests are available ....

So maybe this WinForm is an issue, or the MEF in combination with Unit tests.

Thanks for helping

Gerhard

Jun 26, 2009 at 6:00 PM

Hi Gerhard,

It sounds like you’re invoking managed code during DllMain(). If you search for ‘loader lock managed’ you should find plenty of help on this issue.

Cheers,

Nick

From: gerhardkreuzer [mailto:notifications@codeplex.com]
Sent: Thursday, June 25, 2009 11:39 PM
To: Nicholas Blumhardt
Subject: LoaderLock detected [MEF:60738]

From: gerhardkreuzer

Hi,

I just run into a problem, maybe there is help around.

I create a Test-Project and try to create tests for my parts. I create the container, the batch and do composition in the <font size="3">

<TestInitialize()>

</font>

Public Sub MyTestInitialize() function, works fine. Than some test starts and I get a LoaderLock-Exception. Whats wrong.

Maybe I have to explain, what the part is for. I have to control some bulky hardware. I decide to write a simulation for that, so I am able to work everywhere without it. Before MEF I manually resolve the imports. I create a lot of interfaces to do that.

Now a new version should be made and some new hardware is available also. I decide to solve this using MEF. I want to swap the hardware layer between my simulation and the two different hardware versions just by 'installing' the correct driver. Rest is up to MEF.

My simulation is little different from the hardware drivers, because it opens a WinForm which allows me to check values and set some test conditions. This scenario cames up before Unit Tests are available ....

So maybe this WinForm is an issue, or the MEF in combination with Unit tests.

Thanks for helping

Gerhard

Read the full discussion online.

To add a post to this discussion, reply to this email (MEF@discussions.codeplex.com)

To start a new discussion for this project, email MEF@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Jun 27, 2009 at 7:23 PM
Hi Nick,
yeas, but I didn't such thing explicitly. I just try to compose a part from a test fixture. Did the testframework such things??
With best regards
Gerhard


Von: nblumhardt [mailto:notifications@codeplex.com]
Gesendet: Freitag, 26. Juni 2009 19:01
An: gerhard.kreuzer@liftoff.at
Betreff: Re: LoaderLock detected [MEF:60738]

From: nblumhardt

Hi Gerhard,

It sounds like you’re invoking managed code during DllMain(). If you search for ‘loader lock managed’ you should find plenty of help on this issue.

Cheers,

Nick

From: gerhardkreuzer [mailto:notifications@codeplex.com]
Sent: Thursday, June 25, 2009 11:39 PM
To: Nicholas Blumhardt
Subject: LoaderLock detected [MEF:60738]

From: gerhardkreuzer

Hi,

I just run into a problem, maybe there is help around.

I create a Test-Project and try to create tests for my parts. I create the container, the batch and do composition in the <font size="3">

<TestInitialize()>

</font>

Public Sub MyTestInitialize() function, works fine. Than some test starts and I get a LoaderLock-Exception. Whats wrong.

Maybe I have to explain, what the part is for. I have to control some bulky hardware. I decide to write a simulation for that, so I am able to work everywhere without it. Before MEF I manually resolve the imports. I create a lot of interfaces to do that.

Now a new version should be made and some new hardware is available also. I decide to solve this using MEF. I want to swap the hardware layer between my simulation and the two different hardware versions just by 'installing' the correct driver. Rest is up to MEF.

My simulation is little different from the hardware drivers, because it opens a WinForm which allows me to check values and set some test conditions. This scenario cames up before Unit Tests are available ....

So maybe this WinForm is an issue, or the MEF in combination with Unit tests.

Thanks for helping

Gerhard

Read the full discussion online.

To add a post to this discussion, reply to this email (MEF@discussions.codeplex.com)

To start a new discussion for this project, email MEF@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com