Good afternoon people!
I'm new here on the forum, and I would like to report a problem that occurred recently. Here at the company we use Zeos in our applications, which is phenomenal, and we started testing the TZIBEventAlerter component to help us update configurations and information on terminal machines on a network.
In the tests carried out on our network, everything works ok, without crashes or anything, but when we update the application at our client's company, the application crashes when calling the "RegisterEvents" routine (which did not happen in the internal tests at our company) .
To check if there was a problem with my system, I made a new simple project from scratch, a simple application containing just 4 TEdit to collect the server, database, firebird port and fbclient path. In addition, it has the TZConnection and TZIBEventAlerter components and a TButton to connect. I left two ShowMessagens in ZConnection1.AfterConnect, just to check if it was actually crashing at this point, as shown below:
ShowMessage('before');
ZIBEventAlerter1.RegisterEvents;
ShowMessage('after');
and it actually crashes when calling ZIBEventAlerter1.RegisterEvents.
I am using version 7.2 of Zeos, together with Delphi 7.
I also tested it in Delphi 11, and had the same result.
in the TZIBEventAlerter component there is only one event registered.
I would like to know if anyone has any idea what could be causing this slowness when calling this routine.
My suspicions are
1- Could it be the installation of Firebird on the company's machines?
2- Could it be some Windows configuration?
Application crashes when calling ZIBEventAlerter1.RegisterEvents routine.
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: Application crashes when calling ZIBEventAlerter1.RegisterEvents routine.
After sending the question here on the forum, I did some further research and found an article https://firebirdsql.org/file/documentat ... events.pdf explaining the use of Events in Firebird. In short, it explains that to use events, a port must be configured in the RemoteAuxPort configuration in the firebird.conf file, if not defined, Firebird assumes a random port. I did a test by defining a port for RemoteAuxPort and the application went through the ZIBEventAlerter1.RegisterEvents routine without crashing.
That was just the problem, but thanks for responding. You can close the topic.
That was just the problem, but thanks for responding. You can close the topic.
Re: Application crashes when calling ZIBEventAlerter1.RegisterEvents routine.
I’m happy to hear that your problem was solved but I would still like to know what error you received, how it crashed.
If you received an access violation it probably should be changed to a meaningful message; that’s why I’m asking.
If you received an access violation it probably should be changed to a meaningful message; that’s why I’m asking.
Delphi 12.2, Zeos 8 from latest GIT snapshot
Using:
- MySQL server 8.0.18; libmysql.dll 8.0.40 x64 5.7.19 x68, libmariadb.dll 3.3.11
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.15
- MSSQL 2012, 2019; sybdb.dll FreeTDS_3102
- SQLite 3.47
Using:
- MySQL server 8.0.18; libmysql.dll 8.0.40 x64 5.7.19 x68, libmariadb.dll 3.3.11
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.15
- MSSQL 2012, 2019; sybdb.dll FreeTDS_3102
- SQLite 3.47
Re: Application crashes when calling ZIBEventAlerter1.RegisterEvents routine.
Good morning!
I apologize for the delayed response.
I'll explain in more detail what's happening. Below are some screenshots I took from a test application, with only the database connection and the call to the ZIBEventAlerter1.RegisterEvents routine. In the Connect button, there is the following code:
1 - In this first image, the ShowMessage appears as soon as I click the Connect button.
2 - In this second image, the application freezes and becomes unresponsive. At this moment, it is in the call to the ZIBEventAlerter1.RegisterEvents routine. It stays frozen for about 20 seconds.
3 - In this third image, after going through the ZIBEventAlerter1.RegisterEvents routine, the ShowMessage('after ZEvent.RegisterEvents') appears.
There are no errors or Access Violations in the application; it just becomes unresponsive.
To resolve this, I had to modify the firebird.conf file in the RemoteAuxPort configuration and add the Firebird application to the "Allow an app or feature through Windows Defender Firewall" option in the Windows Firewall.
After that, I tested the application again, and it ran without freezing.
I apologize for the delayed response.
I'll explain in more detail what's happening. Below are some screenshots I took from a test application, with only the database connection and the call to the ZIBEventAlerter1.RegisterEvents routine. In the Connect button, there is the following code:
Code: Select all
ShowMessage('before ZEvent.RegisterEvents');
ZEvent.RegisterEvents;
ShowMessage('after ZEvent.RegisterEvents');
2 - In this second image, the application freezes and becomes unresponsive. At this moment, it is in the call to the ZIBEventAlerter1.RegisterEvents routine. It stays frozen for about 20 seconds.
3 - In this third image, after going through the ZIBEventAlerter1.RegisterEvents routine, the ShowMessage('after ZEvent.RegisterEvents') appears.
There are no errors or Access Violations in the application; it just becomes unresponsive.
To resolve this, I had to modify the firebird.conf file in the RemoteAuxPort configuration and add the Firebird application to the "Allow an app or feature through Windows Defender Firewall" option in the Windows Firewall.
After that, I tested the application again, and it ran without freezing.
You do not have the required permissions to view the files attached to this post.