Page 1 of 1

"Handle not initialized" exception

Posted: Wed 30 Mar 2011 10:56
by sipe16
Hi,

I've started noticing some InvalidOperationExceptions: "Handle not initialized". All DataContexts are opened/disposed with "using" statements and are never passed between threads.

I'm using version 2.20.17.0 of Devart.Data.Linq and Devart.Data.MySql.Linq.

The call stack is as follows:

> mscorlib.dll!System.Runtime.InteropServices.GCHandle.Target.get() + 0xa6 bytes
Devart.Data.Linq.dll!Devart.Data.Linq.e.j() + 0x7c bytes
Devart.Data.Linq.dll!Devart.Data.Linq.i.a(int A_0 = 0) + 0x145 bytes
Devart.Data.Linq.dll!Devart.Data.Linq.g.a(Devart.Data.Linq.g.a A_0 = {Devart.Data.Linq.g.a}) + 0xc4 bytes
Devart.Data.Linq.dll!Devart.Data.Linq.g.a.b() + 0x7d bytes
[Native to Managed Transition]

I read of some other people having this issue as well in the Oracle provider - is there a chance that it could be a related issue in the MySql provider?

Thanks,
Cyle

Posted: Thu 31 Mar 2011 15:51
by StanislavK
This was a general-level problem that was fixed in the 2.0.8 build (in fact, the invalid operation exception you are getting was caught in the Devart.Data.Linq.e.j method).

Please check that the LinqConnect assemblies deployed with your project (or installed on the deployment machine) are of the latest 2.20.17 version. If they are, please send us a test project with which the issue can be reproduced.

Posted: Fri 01 Apr 2011 10:36
by sipe16
Thanks for your reply.

I've verified that the only version of LinqConnect installed on my machine is 2.20.17.0, so I will try to see if I can create a reproducable project in the coming week.

Cheers,
Cyle

Posted: Mon 04 Apr 2011 15:15
by StanislavK
JIC: even if the installed version is 2.20.17, it is possible that the Devart.Data.Linq assembly being deployed with the application (i.e., the one located in the Bin folder of the project) is of an earlier version.