Lazarus

Announcements => Third party => Topic started by: tonyw on December 06, 2018, 05:29:53 pm

Title: IBX 2.3.2 is now available for download
Post by: tonyw on December 06, 2018, 05:29:53 pm
MWA Software is pleased to announce that release 2.3.2 of IBX for Lazarus is now available for download from https://mwasoftware.co.uk/ibx. Older versions of IBX will fail to compile with Lazarus 2.0 and upgrade to this version is necessary for use with Lazarus 2.0. All users are recommended to upgrade to the new release. Please read the changelog before upgrading. The release also includes a new SQL Tokeniser and the ability to select the Firebird Library (DLL or shared object) as a property of TIBDatabase or TIBXServicesConnection. Several minor bug fixes are also included.

The release fixes two problems with use of Lazarus 2.0:


The new SQL Tokeniser has been primarily developed in order to avoid mis-identification of PSQL parameters within BEGIN..END blocks as IBX query parameters. This allows parameterised EXECUTE BLOCK statements to be supported. The new SQL Tokeniser is also used for TIBSQLParser and TIBXScript, in both cases removing duplicate code.

Both TIBDatabase and TIBXServicesConnection now include a new property "FirebirdLibraryPathName". This can be used to explicitly specify the full path to the firebird client library (DLL or shared object). For example, when the library is in a non-standard location or to avoid ambiguity when more than one library is installed. In principle, each instance of TIBDatabase or TIBXServicesConnection could use a different version of the library.
Title: Re: IBX 2.3.2 is now available for download
Post by: zoltanleo on December 06, 2018, 05:52:30 pm
Both TIBDatabase and TIBXServicesConnection now include a new property "FirebirdLibraryPathName".
This is great news. Thank you.
Title: Re: IBX 2.3.2 is now available for download
Post by: patyi on December 06, 2018, 11:12:09 pm
Hi all !

How to enable WireCompression protocol ?
Adding WireCompression=True to Connection parameters gives me an error.
I can't find anything about WireCompresson theme in documentation.

Thanks for grate work !
Title: Re: IBX 2.3.2 is now available for download
Post by: tonyw on December 06, 2018, 11:44:39 pm
Hi all !

How to enable WireCompression protocol ?
Adding WireCompression=True to Connection parameters gives me an error.
I can't find anything about WireCompresson theme in documentation.

Thanks for grate work !

IBX can't help you here. Wire encryption has to enabled in the firebird.conf file on both client and server . Also make sure that you are using the Srp authentication scheme. This is the only  scheme that supports wire encryption. For more info see the Firebird 3.0.3 release notes.
Title: Re: IBX 2.3.2 is now available for download
Post by: zoltanleo on December 11, 2018, 11:11:41 pm
Hi.

I tried to install ibx r265. After rebuilding, the IDE showed the following message:
Quote
IBX is unable to locate the Firebird Library - have you remembered to install it?
But tabs with ibx components in the toolbar of IDE I didn't find.

At the same time, I have a Firebird server running as an application:
Code: Pascal  [Select]
  1. "D:\Portable_program\Firebird_server\Firebird_3_0_3\firebird.exe" -a -p3303

Сan you fix the source code so that your component correctly handles both situations: if server firebird is running as a service or running as an application?
Title: Re: IBX 2.3.2 is now available for download
Post by: tonyw on December 12, 2018, 12:14:08 am
Hi.

I tried to install ibx r265. After rebuilding, the IDE showed the following message:
Quote
IBX is unable to locate the Firebird Library - have you remembered to install it?
But tabs with ibx components in the toolbar of IDE I didn't find.

At the same time, I have a Firebird server running as an application:
Code: Pascal  [Select]
  1. "D:\Portable_program\Firebird_server\Firebird_3_0_3\firebird.exe" -a -p3303

Сan you fix the source code so that your component correctly handles both situations: if server firebird is running as a service or running as an application?
If you have installed Firebird in a non-standard location on your development system then you have to tell the IDE where to find it by setting the FBLIB environment variable to the flull pathname of the fbclient.dll library.

Under Windows, that is usually done (e.g udner Windows 7) by going to the Control Panel, clicking on "User Accounts" and then clicking on "Change my environment variables".

In the "Environment Variable" dialog, click on the "New" button and enter "FBLIB" as the variable name and the path to the fbclient.dll file as the value. Given your post the value is probably

D:\Portable_program\Firebird_server\Firebird_3_0_3\fbclient.dll

Although this may be different in a non-standard deployment.

Once this is set, you can restart the IDE and hopefully IBX will find the Firebird Libary.
Title: Re: IBX 2.3.2 is now available for download
Post by: incendio on December 12, 2018, 04:24:56 am
Hi all !

How to enable WireCompression protocol ?
Adding WireCompression=True to Connection parameters gives me an error.
I can't find anything about WireCompresson theme in documentation.

Thanks for grate work !

IBX can't help you here. Wire encryption has to enabled in the firebird.conf file on both client and server . Also make sure that you are using the Srp authentication scheme. This is the only  scheme that supports wire encryption. For more info see the Firebird 3.0.3 release notes.

I have enabled WireCompression=true and enable Srp authentication in server side via firebird.conf.
How to enable in client side?

Btw, on client side in windows OS, when using IBX, should Firebird install or it is enough just supply fbclient.dll?
Title: Re: IBX 2.3.2 is now available for download
Post by: dsiders on December 12, 2018, 06:48:04 am
How to enable WireCompression protocol ?
Adding WireCompression=True to Connection parameters gives me an error.
I can't find anything about WireCompresson theme in documentation.

IBX can't help you here. Wire encryption has to enabled in the firebird.conf file on both client and server . Also make sure that you are using the Srp authentication scheme. This is the only  scheme that supports wire encryption. For more info see the Firebird 3.0.3 release notes.

Hello Tony. Sorry for coming late to the thread.

In the release notes, client-side set up is supposedly accomplished by:

Quote
To activate Wirecompression from the client side, pass the appropriate tag in the config item of the DPB or SPB call:
 isc_dbp_config/isc_sbp_config <string-length> "WireCompression=true"

Would that not require isc_dbp_* to include the corresponding option too? I read that it requires zlib1.dll (on Windows) for client-side decompression.

Just curious...

Don
Title: Re: IBX 2.3.2 is now available for download
Post by: zoltanleo on December 12, 2018, 10:30:51 am
Once this is set, you can restart the IDE and hopefully IBX will find the Firebird Libary.
It's doesn't work  even after rebooting the system :'(

And what to do if the system has several FB servers running as an application? This situation is often found on the developer's machine.

ps. If my memory serves me right in the original ibx version of delphi, components are installed and displayed. But when trying to drop TIBDatabase on a form, the developer receives a message "InterBase library gds32.dll not found in the path. Please install InterBase to use this functionality." And it forces him to install the server, define the variable FBLIB, etc.
Title: Re: IBX 2.3.2 is now available for download
Post by: jujibo on December 12, 2018, 11:51:40 am
Once this is set, you can restart the IDE and hopefully IBX will find the Firebird Libary.
It's doesn't work  even after rebooting the system :'(

And what to do if the system has several FB servers running as an application? This situation is often found on the developer's machine.

ps. If my memory serves me right in the original ibx version of delphi, components are installed and displayed. But when trying to drop TIBDatabase on a form, the developer receives a message "InterBase library gds32.dll not found in the path. Please install InterBase to use this functionality." And it forces him to install the server, define the variable FBLIB, etc.

Hi!

Try: Download from firebird site Firebird Zip kit for manual/custom installs for win32 if your lazarus is win32 or x64 if your lazarus is 64 bits.

https://www.firebirdsql.org/en/firebird-3-0/

Extract the files: fbclient.dll,  firebird.conf, firebird.msg, msvcp100.dll and msvcr100.dll  (optional zlib1.dll)

Copy these files in the folder where your lazarus executable is.

All is done, you don't neet do install firebird server. You also need these files for your executable if you want to distribute it as portable. (remember extract the correct version like your executable, 32bit or 64 bits)

Regards
Title: Re: IBX 2.3.2 is now available for download
Post by: zoltanleo on December 12, 2018, 12:24:10 pm
Copy these files in the folder where your lazarus executable is.

All is done, you don't neet do install firebird server. You also need these files for your executable if you want to distribute it as portable. (remember extract the correct version like your executable, 32bit or 64 bits)

For what purpose? You offer me to use embedded firebird, but I have no problems using a full-fledged firebird server. I want to help the author make his component without conditional restrictions. IMHO, it's pretty easy to do. We have already discussed this with the component author here:

http://forum.lazarus.freepascal.org/index.php/topic,40933.msg284673.html#msg284673

But at that moment I couldn't convince him of this. Perhaps I will succeed this time.  ;)
Title: Re: IBX 2.3.2 is now available for download
Post by: jujibo on December 12, 2018, 12:54:35 pm

For what purpose? You offer me to use embedded firebird, but I have no problems using a full-fledged firebird server. I want to help the author make his component without conditional restrictions. IMHO, it's pretty easy to do. We have already discussed this with the component author here:

http://forum.lazarus.freepascal.org/index.php/topic,40933.msg284673.html#msg284673

But at that moment I couldn't convince him of this. Perhaps I will succeed this time.  ;)

The purpose is to fix the error you get: "IBX is unable to locate the Firebird Library - have you remembered to install it?"

If you install in your windows, firebird server 64bits and you run lazarus 32 bits, you'll get this error because the dll's installed in your system are 32 bits. The same happens when you install firebird server 32 bits and un lazarus 64 bits.

In my case, I haven't firebird installed in the windows computer where I develop. I connect to external servers.

I'm not talking about firebird embedded. I'm talking about client/server. In fact, the concept of embedded for firebird 3 changed.

Edited: Well, I see you are looking for another solution :)

Regards.

Title: Re: IBX 2.3.2 is now available for download
Post by: zoltanleo on December 12, 2018, 04:10:09 pm
If you install in your windows, firebird server 64bits and you run lazarus 32 bits, you'll get this error because the dll's installed in your system are 32 bits. The same happens when you install firebird server 32 bits and un lazarus 64 bits.

Yeah. What are you talking about ...  ::)
In my case, I have the x32 firebird client installed and the x32 Lazarus trunk (r59797).

I can post screenshots if it is necessary to make me believe  :D
Title: Re: IBX 2.3.2 is now available for download
Post by: incendio on December 13, 2018, 03:49:28 am
Hi all !

How to enable WireCompression protocol ?
Adding WireCompression=True to Connection parameters gives me an error.
I can't find anything about WireCompresson theme in documentation.

Thanks for grate work !

IBX can't help you here. Wire encryption has to enabled in the firebird.conf file on both client and server . Also make sure that you are using the Srp authentication scheme. This is the only  scheme that supports wire encryption. For more info see the Firebird 3.0.3 release notes.

I think IBX still not supports WireCompression in Firebird 3.

I have tested on Windows OS, Lazarus 1.8.4, and Firebird 3.0.4.

Add SQL to TIBQuery :
Code: Pascal  [Select]
  1. select RDB$GET_CONTEXT('SYSTEM', 'WIRE_COMPRESSED') as st from rdb$database.
It returns empty, if supported, it should return True.
Title: Re: IBX 2.3.2 is now available for download
Post by: tonyw on December 26, 2018, 04:36:42 pm
How to enable WireCompression protocol ?
Adding WireCompression=True to Connection parameters gives me an error.
I can't find anything about WireCompresson theme in documentation.

IBX can't help you here. Wire encryption has to enabled in the firebird.conf file on both client and server . Also make sure that you are using the Srp authentication scheme. This is the only  scheme that supports wire encryption. For more info see the Firebird 3.0.3 release notes.

Hello Tony. Sorry for coming late to the thread.

In the release notes, client-side set up is supposedly accomplished by:

Quote
To activate Wirecompression from the client side, pass the appropriate tag in the config item of the DPB or SPB call:
 isc_dbp_config/isc_sbp_config <string-length> "WireCompression=true"

Would that not require isc_dbp_* to include the corresponding option too? I read that it requires zlib1.dll (on Windows) for client-side decompression.

Just curious...

Don

Don, you are correct. I got wire compression mixed up wire encryption. There does need to be a minor update to IBDatabase.pas to add the dbp param. I will make this available by svn shortly.
Title: Re: IBX 2.3.2 is now available for download
Post by: tonyw on December 26, 2018, 07:47:31 pm
There is more to the Wire Compression issue than I first thought. The Firebird documentation is confusing and needed some interpretation and testing.

Points of note:

1. My initial post was correct in itself and setting "WireCompression = true" in both client and Server "firebird.conf" files does force wire compression to be on.

2. Adding an isc_dpb_config item to the connection DPB set to "WireCompression=true" will force wire compression from the client side event when the local "firebird.conf" does not include "WireCompression = true".

3. If have no idea where the suggestion came from that executing

select RDB$GET_CONTEXT('SYSTEM', 'WIRE_COMPRESSED') as st from rdb$database

will do anything other than return an error message.

4. According to the "readme" with the Firebird source

"When compression is turned on Z flag is shown in client/server version info – for example: LI-T3.0.0.31451 Firebird 3.0 Beta 1/tcp (fbs)/P13:Z."

I had to search the Firebird-devel list to understand what this meant. In a very useful post back in 2016, the implementor (of wire compression) said "This is requested by isc_version() in legacy API and IUtil::getFbVersion() in new one."

5. I have as a result added the following function to the Firebird Pascal API IAttachment interface:

procedure getFBVersion(version: TStrings);

This seems to be the only way to check whether wire compression is in use, and returns the client/server version information.

6. Referring to item 2 above, adding "WireCompresion=true" to the TIBDatabase params is not going to be a natural way for the client to request wire compression. I have thus added a new published property to TIBDatabase (and to TIBXServicesConnection). This is

WireCompression: boolean;

If this property is set to true then WireCompression will be requested by the client. Note: it is still necessary to include "WireCompression = true" in the firebird.conf file on the server.

7. For an example of how to determine if wire compression is in used, see the ibx/examples/dbInfo example. This prints out the result of calling getFBVersion as part of the database information. Note: this information is the same as IBSQL returns with the "-z" option.

An updated version of IBX incorporating the above is now available from svn. Note: documentation update is to follow. Checkout using

svn co https://svn.mwasoftware.co.uk/public/ibx/trunk



Title: Re: IBX 2.3.2 is now available for download
Post by: dsiders on December 26, 2018, 10:18:31 pm
There is more to the Wire Compression issue than I first thought. The Firebird documentation is confusing and needed some interpretation and testing.

Hi, Tony.

Thanks for your hard work. I'd be glad to help in testing the changes.

3. If have no idea where the suggestion came from that executing

select RDB$GET_CONTEXT('SYSTEM', 'WIRE_COMPRESSED') as st from rdb$database

will do anything other than return an error message.

I'm the source of that misconception. I found it in a StackOverflow conversation about using WireCompression in FireDAC. If I had read a little closer, I would have seen that it is a feature added in Firebird 4.X. I assume to provide a better way of checking it than using the version information. My bad...

An updated version of IBX incorporating the above is now available from svn. Note: documentation update is to follow. Checkout using

svn co https://svn.mwasoftware.co.uk/public/ibx/trunk

Hmm, guess I need to brush some dust off of the SVN skills I haven't used for 15 years. Is Tortoise still the SVN client of choice for Windows?
Title: Re: IBX 2.3.2 is now available for download
Post by: tonyw on December 26, 2018, 11:45:24 pm
There is more to the Wire Compression issue than I first thought. The Firebird documentation is confusing and needed some interpretation and testing.

Hi, Tony.

Thanks for your hard work. I'd be glad to help in testing the changes.

3. If have no idea where the suggestion came from that executing

select RDB$GET_CONTEXT('SYSTEM', 'WIRE_COMPRESSED') as st from rdb$database

will do anything other than return an error message.

I'm the source of that misconception. I found it in a StackOverflow conversation about using WireCompression in FireDAC. If I had read a little closer, I would have seen that it is a feature added in Firebird 4.X. I assume to provide a better way of checking it than using the version information. My bad...

An updated version of IBX incorporating the above is now available from svn. Note: documentation update is to follow. Checkout using

svn co https://svn.mwasoftware.co.uk/public/ibx/trunk

Hmm, guess I need to brush some dust off of the SVN skills I haven't used for 15 years. Is Tortoise still the SVN client of choice for Windows?

Tortoise works but I prefer to use the command line svn for Windows.
Title: Re: IBX 2.3.2 is now available for download
Post by: incendio on December 27, 2018, 02:42:43 am
As I wrote in http://forum.lazarus-ide.org/index.php?topic=43682.0, I use Firebird 3.0.4 to run this command :
Code: Pascal  [Select]
  1. select RDB$GET_CONTEXT('SYSTEM', 'WIRE_COMPRESSED') as st from rdb$database

Previous version, will return an error.

I have IBDAC + C++ Builder, this IBDAC support WireCompression and it returns TRUE.

I also test it in action, retrieved about 10K rows by 15 columns via internet. zlib1.dll location is the same wtih app, performance difference between with WireCompression and without WireCompression, is quite noticeable.
 
Title: Re: IBX 2.3.2 is now available for download
Post by: dsiders on December 28, 2018, 12:13:33 am
I finally got my install updated to IBX-trunk, and tested with the DBInfo demo.

Success!

Code: [Select]
Firebird/Windows/AMD/Intel/x64 (access method), version "WI-V3.0.4.33054 Firebird 3.0"
Firebird/Windows/AMD/Intel/x64 (remote server), version "WI-V3.0.4.33054 Firebird 3.0/tcp (HP17Z)/P15:CZ"
Firebird/Windows/AMD/Intel/x64 (remote interface), version "WI-V3.0.4.33054 Firebird 3.0/tcp (HP17Z)/P15:CZ"

But it did take a bit of fiddling.

I modified the firebird.conf file for the server to include
Code: [Select]
WireCompression = true.

I also copied zlib1.dll to the directory for the project (dbinfo). I did this because (thanks to Windows DLL-Hell) I already have four other versions of zlib1.dll on my system. I was afraid adding another version to the system path would hose one of the other applications.

I changed the WireCompression property in my TIBDatabase instance to True.

It will not actually use zlib compression until you add zlib to the uses clause in your app. I tried both the .lpk file and the .pas where the TIBDatabase unit resides. Both worked.

Zlib compression cannot be enabled for local connections (XNET). It works for IP addresses (INET). Haven't tried NETBEUI (WNET) yet.

Title: Re: IBX 2.3.2 is now available for download
Post by: dsiders on December 28, 2018, 12:18:45 am
As I wrote in http://forum.lazarus-ide.org/index.php?topic=43682.0, I use Firebird 3.0.4 to run this command :
 
Code: Pascal  [Select]
  1. select RDB$GET_CONTEXT('SYSTEM', 'WIRE_COMPRESSED') as st from rdb$database

I can confirm that this works on Firebird 3.0.4. Documented in Firebird doc/sql.extensions/README.context_variables2.txt.
Title: Re: IBX 2.3.2 is now available for download
Post by: tonyw on December 28, 2018, 12:55:18 pm
I finally got my install updated to IBX-trunk, and tested with the DBInfo demo.

Success!

Code: [Select]
Firebird/Windows/AMD/Intel/x64 (access method), version "WI-V3.0.4.33054 Firebird 3.0"
Firebird/Windows/AMD/Intel/x64 (remote server), version "WI-V3.0.4.33054 Firebird 3.0/tcp (HP17Z)/P15:CZ"
Firebird/Windows/AMD/Intel/x64 (remote interface), version "WI-V3.0.4.33054 Firebird 3.0/tcp (HP17Z)/P15:CZ"

But it did take a bit of fiddling.

I modified the firebird.conf file for the server to include
Code: [Select]
WireCompression = true.

I also copied zlib1.dll to the directory for the project (dbinfo). I did this because (thanks to Windows DLL-Hell) I already have four other versions of zlib1.dll on my system. I was afraid adding another version to the system path would hose one of the other applications.

I changed the WireCompression property in my TIBDatabase instance to True.

It will not actually use zlib compression until you add zlib to the uses clause in your app. I tried both the .lpk file and the .pas where the TIBDatabase unit resides. Both worked.
I have tried connecting from Windows to a Linux server. In this case, I had no problem enabling wire compression - and with no zlib included in the application. Maybe something about the location of your zlib. I have zlib1.dll in the same folder as the fbclient.dll (default Firebird install).

Zlib compression cannot be enabled for local connections (XNET). It works for IP addresses (INET). Haven't tried NETBEUI (WNET) yet.
Title: Re: IBX 2.3.2 is now available for download
Post by: tonyw on December 28, 2018, 01:00:03 pm
Looking again at the Firebird 3 release notes, it looks like I overlooked the extent of the use of the new DPB item code "isc_dpb_config". This is used at database connection time to provide a list of client side configuration overrides in the same syntax as "firebird.conf". Wire Compression is only one of the overrides that may be applied - e.g. use of Wire Encryption is another. I have added a new property to both TIBDatabase and TIBXServicesConnection to allow client side configuration overrides to be provided. This is now included in the development version of IBX which may be viewed at:

https://svn.mwasoftware.co.uk/viewvc/public/ibx/trunk/

To check out, install subversion and enter the following at a command line (should work on both Windows and Linux).

svn co https://svn.mwasoftware.co.uk/public/ibx/trunk/ ibx

Lazarus 2.0.0 RC3 is recommended for this update, but earlier versions should work.

The corresponding changelog entry is:

IBX Change Log  version (2.3-3 Build 11288) Fri, 28 Dec 2018 10:04:17 +0000

1. New property for TIBDatabase and TIBXServicesConnection. This is "ConfigOverrides"
   and is used to override the default settings in the client side "firebird.conf" This
   includes "WireCompression" and "WireCrypt". The value of this property is a "TStrings".
   Each line of the string list should be a setting in the same format as "firebird.conf".
   For example "WireCompression = true" in order to request wire compression on the client side.

   Note: explicit settings in the client side "firebird.conf" appear to take precedence
   over settings given in TIBDatabase and TIBXServicesConnection. Many client side settings
   also require a compatible setting in the server side "firebird.conf". For example
   "WireCompression = true" must also be set in the server's "firebird.conf" for wire
   compression to be used.

   Whether or not WireCompression or WireCrypt are in use can be checked using the information
   returned with the Client/Server protocol version. See ibx/examples/dbadmin and
   ibx/examples/dbinfo for examples of how to display this information.

2. New property for TIBDatabase and TIBXServicesConnection: "WireCompression". This
   is a "convenience" property. If checked then the setting "WireCompression=true" is added to the
   ConfigOverrides. If unchecked then this setting is removed.

Documentation should now be up-to-date. The TIBDatabase and TIBXServicesConnection property editors are also updated.

Note: with Firebird 3 before 3.0.4, the only way to check whether Wire Compression or encryption is in use is to get the Client/Server version and protocol information using the IAttachment interface method "getFBVersion", and inspect the second and third lines. Both the DBAdmin and DBInfo example applications provide an example of use. The information returned is the same as calling isql with the "-z" option. The second and third lines will end in "Z" is compression is used, "CZ" if both encryption and compression is in use and "C" if encryption only is in use.


Title: Re: IBX 2.3.2 is now available for download
Post by: dsiders on December 28, 2018, 02:28:10 pm

I also copied zlib1.dll to the directory for the project (dbinfo). I did this because (thanks to Windows DLL-Hell) I already have four other versions of zlib1.dll on my system. I was afraid adding another version to the system path would hose one of the other applications.

It will not actually use zlib compression until you add zlib to the uses clause in your app.

I have tried connecting from Windows to a Linux server. In this case, I had no problem enabling wire compression - and with no zlib included in the application. Maybe something about the location of your zlib. I have zlib1.dll in the same folder as the fbclient.dll (default Firebird install).

Updated to 2.3-3 Build 11288.

I tried it with zlib1.dll in the Firebird Library Path and in the application directory. Both worked. And neither required adding zlib to the uses clause.

My database server is on a LAN, so I can't really judge how Wire Compression is affecting throughput... but it is working.
Title: Re: IBX 2.3.2 is now available for download
Post by: incendio on February 04, 2019, 09:33:40 am
I can test it Wire Encription performance on remote server, but how to download the entire folder ibx/trunk ?

And should old IBX 2.3.2 uninstall before install ver 2.3.3?
Title: Re: IBX 2.3.2 is now available for download
Post by: dsiders on February 04, 2019, 06:14:51 pm
I can test it Wire Encription performance on remote server, but how to download the entire folder ibx/trunk ?

I used the instructions in Reply # 22 above. Requires an SVN client. I used Tortoise SVN (for Windows) initially, but decided to use the command line client (Slik SVN).

And should old IBX 2.3.2 uninstall before install ver 2.3.3?

I always remove a previous version, completely scrub the directory structure, and re-install.  Just to avoid any issues. That may be overkill, but it works for me.
Title: Re: IBX 2.3.2 is now available for download
Post by: incendio on February 06, 2019, 04:53:13 am
Have tested new feature WireCompression.

Data size is about 24K rows x 2 col (width = varchar(125)), loading took

Title: Re: IBX 2.3.2 is now available for download
Post by: gerardus on February 12, 2019, 05:59:45 pm
Hi,
I have a set of apps and services wich rely on a framework with DB drivers to access databases.
So far the IBX driver worked flawlessly with IBX 2.2.0 compiled with Lazarus 1.8.4.
I installed Lazarus 2.0 and the Online Package manager installed IBX 2.3.2.
Now I get a SIGSEV error when the app closes.
It happens when the DB driver checks if the transaction is active and tries to commit:

Code: Pascal  [Select]
  1. procedure TIBXDBConnection.InternalCommit;
  2. begin
  3.   try
  4.     if FTransaction.Active then
  5.       FTransaction.Commit;
  6.   except
  7.   end;
  8. end;
  9.  

TIBXDBConnection is a DB connection wrapper that holds a TIBDatabase and a TIBTransaction.
FTransaction is a TIBTransaction and is valid when this code is executed.

Going back to Lazarus 1.8.4 and IBX 2.2.0 solves the problem, though.
Any idea of what may be wrong?
Title: Re: IBX 2.3.2 is now available for download
Post by: tonyw on February 13, 2019, 01:00:37 pm
I am not sure how Online Package Manager installed IBX 2.3.2 as Online Package Manager is not supported by IBX.

IBX is anyway at 2.3.3. I suggest that you remove all copies of IBX from your PC - as my guess is that you have an inconsistent installation and the install IBX 2.3.3.

Hi,
I have a set of apps and services wich rely on a framework with DB drivers to access databases.
So far the IBX driver worked flawlessly with IBX 2.2.0 compiled with Lazarus 1.8.4.
I installed Lazarus 2.0 and the Online Package manager installed IBX 2.3.2.
Now I get a SIGSEV error when the app closes.
It happens when the DB driver checks if the transaction is active and tries to commit:

Code: Pascal  [Select]
  1. procedure TIBXDBConnection.InternalCommit;
  2. begin
  3.   try
  4.     if FTransaction.Active then
  5.       FTransaction.Commit;
  6.   except
  7.   end;
  8. end;
  9.  

TIBXDBConnection is a DB connection wrapper that holds a TIBDatabase and a TIBTransaction.
FTransaction is a TIBTransaction and is valid when this code is executed.

Going back to Lazarus 1.8.4 and IBX 2.2.0 solves the problem, though.
Any idea of what may be wrong?
Title: Re: IBX 2.3.2 is now available for download
Post by: gerardus on February 13, 2019, 08:12:20 pm
Hi Toni,
I cleaned up everything, downloaded 2.3.3 and installed it (On Lazarus 1.8.4, Win32)
Same SIGSEGV on exit.
So it must be some change between 2.2.0 and 2.3.2.
For the moment it's back to 2.2.0 as I can't afford to spend more time investigating what's going on.
Title: Re: IBX 2.3.2 is now available for download
Post by: tonyw on February 14, 2019, 04:03:42 pm
Well, I've looked at the changelog and code diffs and can't see anything obvious that could cause a a SIGSERV. Not very much has changed in this area apart from tidying up how starttransaction behaves for single database connection versus multiple database connections - and I can't see how that could affect his.

I believe the most likely reason is an out of step error, especially if you have not removed an earlier version o IBX.

The Lazarus IDE is very sticky when it comes to package references and I am just wondering if you are compiling IBX 2.3.3 using the old version of the low level fbintf package. The way to test this is to open the new package (i.e. ibx/fbintf.lpk) in the iDE before compiling your program with IBX 2.3.3. That will make the IDE choose the new version over the old.
Title: Re: IBX 2.3.2 is now available for download
Post by: gerardus on February 14, 2019, 04:41:46 pm
I shall have a look at it as soon as I have some time, in a clean VM with a fresh Lazarus install.
But I'm pretty sure last time I removed  everything, making sure that I couldn't compile my programs before reinstalling  the 2.3.3 package.