Handle to DLL not been closed

Bug reports.
marcel.keller
Posts: 14
Joined: Thu Sep 22, 2011 1:17 pm

Handle to DLL not been closed

Post by marcel.keller » Tue Oct 11, 2011 10:14 am

Hey together,

I'm using Ranorex Studio 3.1 and wrote some tests with my application which uses Infragistics-dll.
There is a problem with the handle, i'd like to delete this dll in my application folder, but Ranorex seems not to close this handle. (seen in Process Explorer)

Is this a bug in Ranorex Studio or am i doing something wrong?


Regards,
Marcel

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Handle to DLL not been closed

Post by Support Team » Wed Oct 12, 2011 10:30 am

Hi,
marcel.keller wrote:Is this a bug in Ranorex Studio or am i doing something wrong?
Do you get any error message from the compiler or something else? Do you use InvokeRemotely?
Would it be possible to post us the exact error message you get?

Thanks in advance.

Regards,
Peter
Ranorex Team

marcel.keller
Posts: 14
Joined: Thu Sep 22, 2011 1:17 pm

Re: Handle to DLL not been closed

Post by marcel.keller » Thu Oct 13, 2011 12:32 pm

Hello

No, there is no error message and no error in my test case.
But Ranorex will close the handles to my dll's only if i quit the Studio.

The thing is, that i'd like to delete my dll's, and first close the Studio to delete is not that what i finally want..

Regards,
Marcel

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Handle to DLL not been closed

Post by Support Team » Fri Oct 14, 2011 1:54 pm

So you are automating a Windows Forms application using Ranorex Studio and in order to delete a DLL of your WinForms application (e.g. when recompiling the automated application), you have to close Ranorex Studio. Correct?

The above scenario is a known (by-design) inconvenience of the Ranorex object recognition for Windows Forms. In order to recognize Windows Forms controls in your application, Ranorex needs to load the DLLs containing the definition of those controls. And as .NET does not allow releasing DLLs again, your DLLs stay locked until you exit Ranorex Studio.
Consequently, with the current technique for object recognition in Windows Forms application, there is nothing we can do to fix that behavior :? In most cases, that scenario should not be an issue, since when you test an application, you usually do not need to compile the application again.

Regards,
Alex
Ranorex Team

marcel.keller
Posts: 14
Joined: Thu Sep 22, 2011 1:17 pm

Re: Handle to DLL not been closed

Post by marcel.keller » Mon Oct 17, 2011 2:52 pm

That's exactly what i meant.

Well, as a .Net developer i know that problem, and i think i'm gonna live with that so far.
Thanks for your reply!

Regards,
Marcel