Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Error when calling unmanaged dll in 1.40b
Marqus
#1 Posted : Wednesday, June 20, 2012 11:20:58 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 2/22/2012(UTC)
Posts: 38
Location: Poland

Thanks: 2 times
Was thanked: 6 time(s) in 6 post(s)
I'm calling a win32 unmanaged dll written in delphi from C# using DllImport attribute. After switching to 1.40b, tests with such call fail with "NCrunch was unable to retrieve a meaningful result from this test due to an unexpected error - was the execution process terminated?"

I have prepared a small sample project, where you can observe this behavior. Directory structure is important for me (it's similar to my workspace - all binaries are placed in one bin folder). This works under 1.39b, nunit/testdriven.net but not with 1.40b. I've checked this on other machines, same result.

Now I have few hundred tests affected by this problem, is there some workaround other than switching back to 1.39b?

PS. I don't see any option to attach zip file to post, how can I pass you this example?

[EDIT]
PS2. You can download example from: http://msz.instalsoft.co...40bcallingDllExample.zip
Remco
#2 Posted : Wednesday, June 20, 2012 10:38:27 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi Marqus,

Thanks for reporting this problem. It looks like this is a marshalling problem of some kind that only surfaces in the new hosted task runner introduced with 1.40b.

You can work around this problem by turning off the 'Use hosted task runner' option in your global NCrunch configuration.

I'll make a note to look deeper into the problem to see if I can introduce a proper fix in the next version of NCrunch.


Cheers,

Remco
1 user thanked Remco for this useful post.
Marqus on 6/21/2012(UTC)
Marqus
#3 Posted : Thursday, June 21, 2012 5:48:03 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 2/22/2012(UTC)
Posts: 38
Location: Poland

Thanks: 2 times
Was thanked: 6 time(s) in 6 post(s)
Thanks, it works now
Marqus
#4 Posted : Monday, February 11, 2013 11:21:38 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 2/22/2012(UTC)
Posts: 38
Location: Poland

Thanks: 2 times
Was thanked: 6 time(s) in 6 post(s)
Are there any news in this topic? I'm asking about this, because of the info text in configuration pane, saying that "unhosted task runners will be removed in future versions of NCrunch"
Remco
#5 Posted : Monday, February 11, 2013 8:50:49 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi,

It's becoming increasingly unlikely that this configuration option will ever be removed. None of the new features that were expecting to make use of the .NET hosting API have ever turned out to be stable - it seems the API has a number of quirks that are difficult to pin down. I'll change the documentation to reflect this.


Cheers,

Remco
Marqus
#6 Posted : Tuesday, February 12, 2013 7:02:43 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 2/22/2012(UTC)
Posts: 38
Location: Poland

Thanks: 2 times
Was thanked: 6 time(s) in 6 post(s)
Thanks for response
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.036 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download