Compiling and testing full android firebird server from Visual Studio
Because I need share sources from C#-Windows and Xamarin-Android, I’ve decided try to compile Firebird sources in Visual Studio Cross-Platform and test it.
From the Windows version projects structure, I’ve used the sources list of makefile Linux projects and the auto generated sources files of Mariuz method.
Actually, I’ve been able to compile ok, making a few changes on source code.
On the other hand, I’ve compile de .NET provider to Android too making a few changes on source code.
I’ve three goals:
Goal 1: Android client and Windows/Linux server -> Compiled, running and a few test.
Goal 2: Android embedded server -> Compiled and debugging
Goal 3: Android server and any platform client -> Compiled but not tested yet
The Goal 2:
I’ve been able to create a new Database and afterward the program crash. The Database integrity is ok. I’ve pulled it from Android Virtual Machine and put into Windows server to confirm it.
I’ve been able to open the created Database and afterward the program crash.
The status vector returned to the NET Provider, tell me “isc_bad_db_handle = 335544324L”. After a few time debugging, I’ve seen that the handle returned from “isc_...”functions like create or attach database, is not reusable for isc_detach_database (is called after create, then crash -commented above-) or for isc_database_info(is called after open, then crash -commented above-).
From the NET Provider, the “ref _handle” seems be ok before the call to native libfbclient.so into why.cppfile (values 1 or 2 are shown by Visual Studio debugger) . In Windows debug, the value stored in the handle continue being the same after native call. However, the handle value stored in Android debug is 0, and exception/error is raise in status vector.