Re: [Firebird-net-provider] Problem reading resources on linux

2014-07-30 Thread diskuze
Can you try running that under Mono 3.4.x?

--
Mgr. Jiri Cincura
Independent IT Specialist

From: Ernesto Cullen [mailto:ernestocul...@gmail.com]
Sent: Tuesday, July 29, 2014 3:28 PM
To: firebird-net-provider@lists.sourceforge.net
Subject: [Firebird-net-provider] Problem reading resources on linux

I've created a small program to test firebird access with an embedded server on 
linux (with mono), but I am getting errors related to resources.

This is the program:
namespace ConsoleFBTest
{
class MainClass
{
public static void Main (string[] args)
{
Console.WriteLine ("Creating database...");
FbConnection.CreateDatabase("ServerType=1;client 
library=libfbembed;Dialect=3;Database=test.fdb;User=sysdba;password=masterkey");
}
}
}

easy enough, I just want to create a database. I've copied all firebird lib/* 
files into target dir, along with firebird.msg, security2.fdb, firebird.conf, 
intl/*. I tested that the embedded server works copying also isql and executing 
from command line.
When I run previous program, both from MonoDevelop and from command line, I get 
the output below. I think it may have to do with resources formatting or 
embedding in the firebird client dll? maybe eol characters? old mono version? 
running out of ideas here, please help!
Ernesto Cullen

Mono version:
-
mono --version
Mono JIT compiler version 2.10.8 (tarball Mon Apr  7 03:54:27 IST 2014)
Copyright (C) 2002-2011 Novell, Inc, Xamarin, Inc and Contributors. 
www.mono-project.com
TLS:   __thread
SIGSEGV:   altstack
Notifications: epoll
Architecture:  amd64
Disabled:  none
Misc:  debugger softdebug
LLVM:  supported, not enabled.
GC:Included Boehm (with typed GC and Parallel Mark)
NETProvider: NETProvider-4.2.0.0-MONO_LINUX
Firebird: FirebirdCS-2.5.3.26778-0.amd64

program output
---
Creating database...

Unhandled Exception: System.ObjectDisposedException: The object was used after 
being disposed.
  at System.IO.UnmanagedMemoryStream.Seek (Int64 offset, SeekOrigin loc) 
[0x0] in :0
  at System.Resources.ResourceReader.LoadResourceValues (.ResourceCacheItem[] 
store) [0x0] in :0
  at System.Resources.ResourceReader+ResourceEnumerator.FillCache () [0x0] 
in :0
  at System.Resources.ResourceReader+ResourceEnumerator..ctor 
(System.Resources.ResourceReader readerToEnumerate) [0x0] in :0
  at System.Resources.ResourceReader.GetEnumerator () [0x0] in :0
  at System.Resources.ResourceSet.ReadResources () [0x0] in :0
  at System.Resources.ResourceSet.GetObjectInternal (System.String name, 
Boolean ignoreCase) [0x0] in :0
  at System.Resources.ResourceSet.GetObject (System.String name, Boolean 
ignoreCase) [0x0] in :0
  at System.Resources.ResourceSet.GetStringInternal (System.String name, 
Boolean ignoreCase) [0x0] in :0
  at System.Resources.ResourceSet.GetString (System.String name) [0x0] in 
:0
  at FirebirdSql.Data.Common.IscException.BuildSqlState () [0x0] in 
:0
  at FirebirdSql.Data.Common.IscException.BuildExceptionData () [0x0] in 
:0
  at FirebirdSql.Data.Client.Native.FesConnection.ParseStatusVector 
(System.IntPtr[] statusVector, FirebirdSql.Data.Common.Charset charset) 
[0x0] in :0
  at FirebirdSql.Data.Client.Native.FesDatabase.ParseStatusVector 
(System.IntPtr[] statusVector) [0x0] in :0
  at FirebirdSql.Data.Client.Native.FesDatabase.CreateDatabase 
(FirebirdSql.Data.Common.DatabaseParameterBuffer dpb, System.String dataSource, 
Int32 port, System.String database) [0x0] in :0
  at FirebirdSql.Data.FirebirdClient.FbConnectionInternal.CreateDatabase 
(FirebirdSql.Data.Common.DatabaseParameterBuffer dpb) [0x0] in :0
  at (wrapper remoting-invoke-with-check) 
FirebirdSql.Data.FirebirdClient.FbConnectionInternal:CreateDatabase 
(FirebirdSql.Data.Common.DatabaseParameterBuffer)
  at FirebirdSql.Data.FirebirdClient.FbConnection.CreateDatabase (System.String 
connectionString, Int32 pageSize, Boolean forcedWrites, Boolean overwrite) 
[0x0] in :0
  at FirebirdSql.Data.FirebirdClient.FbConnection.CreateDatabase (System.String 
connectionString) [0x0] in :0
  at ConsoleFBTest.MainClass.Main (System.String[] args) [0x0] in :0
[ERROR] FATAL UNHANDLED EXCEPTION: System.ObjectDisposedException: The object 
was used after being disposed.
  at System.IO.UnmanagedMemoryStream.Seek (Int64 offset, SeekOrigin loc) 
[0x0] in :0
  at System.Resources.ResourceReader.LoadResourceValues (.ResourceCacheItem[] 
store) [0x0] in :0
  at System.Resources.ResourceReader+ResourceEnumerator.FillCache () [0x0] 
in :0
  at System.Resources.ResourceReader+ResourceEnumerator..ctor 
(System.Resources.ResourceReader readerToEnumerate) [0x0] in :0
  at System.Resources.ResourceReader.GetEnumerator () [0x0] in :0

Re: [Firebird-net-provider] Compiling for mono

2014-07-30 Thread diskuze
Hi, probably best idea is to use the build for Mono/Linux from firebirdsql.org. 
Or you can build it yourself, there’s a configuration with same name in project.

--
Mgr. Jiri Cincura
Independent IT Specialist
--
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


Re: [Firebird-net-provider] Compiling for mono

2014-07-30 Thread Jiri Cincura
Hi, probably best idea is to use the build for Mono/Linux from firebirdsql.org. 
Or you can build it yourself, there’s a configuration with same name in project.

--
Mgr. Jiri Cincura
Independent IT Specialist
--
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider