Application crashes when calling ZIBEventAlerter1.RegisterEvents routine.

The forum for ZeosLib 7.2 Report problems. Ask for help, post proposals for the new version and Zeoslib 7.2 features here. This is a forum that will be edited once the 7.2.x version goes into RC/stable!!

My personal intention for 7.2 is to speed up the internals as optimal a possible for all IDE's. Hope you can help?! Have fun with testing 7.2
Post Reply
cromao_
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 07.02.2024, 19:13

Application crashes when calling ZIBEventAlerter1.RegisterEvents routine.

Post by cromao_ »

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?
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: Application crashes when calling ZIBEventAlerter1.RegisterEvents routine.

Post by marsupilami »

Hello cromao_,
cromao_ wrote: 07.02.2024, 19:42 and it actually crashes when calling ZIBEventAlerter1.RegisterEvents.
In which way does it crash?
cromao_
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 07.02.2024, 19:13

Re: Application crashes when calling ZIBEventAlerter1.RegisterEvents routine.

Post by cromao_ »

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.
User avatar
aehimself
Zeos Dev Team
Zeos Dev Team
Posts: 796
Joined: 18.11.2018, 17:37
Location: Hungary

Re: Application crashes when calling ZIBEventAlerter1.RegisterEvents routine.

Post by aehimself »

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.
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
cromao_
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 07.02.2024, 19:13

Re: Application crashes when calling ZIBEventAlerter1.RegisterEvents routine.

Post by cromao_ »

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:

Code: Select all

ShowMessage('before ZEvent.RegisterEvents');
ZEvent.RegisterEvents;
ShowMessage('after ZEvent.RegisterEvents');
1 - In this first image, the ShowMessage appears as soon as I click the Connect button.

Image

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.

Image

3 - In this third image, after going through the ZIBEventAlerter1.RegisterEvents routine, the ShowMessage('after ZEvent.RegisterEvents') appears.

Image

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.
Post Reply