Viatcheslav Valerievitch Vassiliev wrote: > First tests of ADO.Net on Firebird 2.1 beta 2 for Win64 are successfull. > C# application runs in 64bit mode and executes simple actions > with embedded Firebird. (I rebuilt ADO.Net provider, without changes in > code for tests, may be official compilation will work too).
That's not what I'm seeing actually. I'm getting memory corruption errors when running with the 64-bit fbembed.dll -- 32-bit works fine. I've tried it with three different version of the provider: 2.0.1, 2.1 RC2 and 2.5 Alpha 1. I've created a small test program that demonstrates it, which you can download from here: http://codeka.com/tmp/FbEmbed64BitTest.zip Unzip that somewhere, copy the 32-bit and 64-bit fbembed.dll (and supporting DLLs) into the x86 and x64 folders respectively, then compile it in both the x86 and x64 configurations and you can see the difference. I get the following exception as soon as I try to execute any statements in the 64-bit build: System.BadImageFormatException: Invalid access to memory location. (Exception from HRESULT: 0x800703E6) at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) at System.Runtime.InteropServices.Marshal.FreeHGlobal(IntPtr hglobal) at FirebirdSql.Data.Client.Common.XsqldaMarshaler.CleanUpNativeData(IntPtr& pNativeData) at FirebirdSql.Data.Client.Native.FesStatement.DescribeParameters() at FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteCommand(CommandBehavior behavior, Boolean returnsSet) at FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteNonQuery() at FbEmbed64BitTest.Program.Main(String[] args) in D:\Projects\FbEmbed64BitTest\Program.cs:line 57 (It's the "Invalid access to memory location." that worries me... I don't know why it's throwing a System.BadImageFormatException -- maybe that's a clue? -- but it's definitely loading the fbembed.dll successfully, because I can see other method calls into fbembed.dll working, it's only when it calls that XsqldaMarshaler.CleanUpNativeData that it has problems... perhaps some sort of memory corruption?) I don't know if the problem is specific to the .NET data provider, or if it's some bug in fbembed.dll itself, though... As an aside, I have also noticed that if I don't call FbConnection.ClearAllPools, my process never exits (you can see that happening in the sample project I posted above -- it doesn't call FbConnection.ClearAllPools() so the process hangs when it exits) > Will ADO.Net provider officially support x64 compilations? I would certainly hope so!! :-) Dean. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Firebird-net-provider mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
