I did a native compilation using lazarus on Ubuntu, and it works normally, I think the problem is only on ZEOS with AlmaLinux 9.4, even compiling on Ubuntu and testing the executable on Almalinux 9.4 the error below occursI did a native compilation using lazarus on Ubuntu, and it works normally, I think the problem is only on ZEOS with AlmaLinux 9.4, even compiling on Ubuntu and testing the executable on Almalinux 9.4 the error below occurs.
[root@localhost samplezeos]# ./samplezeos
An unhandled exception occurred at $00000000004813D0:
EDatabaseError: Operation cannot be performed on an inactive dataset
$00000000004813D0
$000000000048376E
Heap dump by heaptrc unit of /home/samplezeos/samplezeos
26125 memory blocks allocated : 4302794/4305848
26122 memory blocks freed : 4302602/4305656
3 unfreed memory blocks : 192
True heap size : 786432
True free heap : 785568
Should be : 785664
Call trace for block $00007FD5A3D735A0 size 128
$00000000004146F1
$000000000048376E
$0000000000735FD0 CHECKCONNECTED, line 1032 of ../../src/component/ZAbstractDataset.pas
$000000000070B110 INTERNALPREPARE, line 4361 of ../../src/component/ZAbstractRODataset.pas
$000000000070A6A2 SETPREPARED, line 4107 of ../../src/component/ZAbstractRODataset.pas
$000000000070D4EB PREPARE, line 5255 of ../../src/component/ZAbstractRODataset.pas
$00000000007097FD INTERNALOPEN, line 3775 of ../../src/component/ZAbstractRODataset.pas
$00000000007338C7 INTERNALOPEN, line 386 of ../../src/component/ZAbstractDataset.pas
$0000000000736D52 INTERNALOPEN, line 1219 of ../../src/component/ZAbstractDataset.pas
$0000000000483E0D
$00000000007338C7 INTERNALOPEN, line 386 of ../../src/component/ZAbstractDataset.pas
$0000000000736D52 INTERNALOPEN, line 1219 of ../../src/component/ZAbstractDataset.pas
$0000000000483E0D
Erro: ZeosLib 8.0 Access violation AlmaLinux 9.4 Lazarus 3.6
-
- Fresh Boarder
- Posts: 7
- Joined: 16.07.2024, 18:31
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: Erro: ZeosLib 8.0 Access violation AlmaLinux 9.4 Lazarus 3.6
Hello,
What is the source code of your samplezeos project?
Best regards,
Jan
The error in you stack trace isn't an access violation. It is: "EDatabaseError: Operation cannot be performed on an inactive dataset". Normally this happens when you call Edit or something like that on a dataset that isn't opened yet.automacaosamos wrote: ↑15.10.2024, 19:41 An unhandled exception occurred at $00000000004813D0:
EDatabaseError: Operation cannot be performed on an inactive dataset
What is the source code of your samplezeos project?
Best regards,
Jan
-
- Fresh Boarder
- Posts: 7
- Joined: 16.07.2024, 18:31
Re: Erro: ZeosLib 8.0 Access violation AlmaLinux 9.4 Lazarus 3.6
thanks for replying
LinuxMint and Ubuntu, works without problems.
LinuxMint and Ubuntu, works without problems.
You do not have the required permissions to view the files attached to this post.
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: Erro: ZeosLib 8.0 Access violation AlmaLinux 9.4 Lazarus 3.6
Hello,
your sample works for me, but I had to do some adjustments. Here is what I did:
Some notes:
Jan
your sample works for me, but I had to do some adjustments. Here is what I did:
- Install Alma Linux 9
- Add Extra Packages for Enterprise Linux:
sudo dnf install epel-release
- Install Firebird:
sudo dnf install firebird
- create sysdba:
gsec -add sysdba -pw masterkey
- create a database with isql (isql-fb):
create database "localhost:/var/lib/firebird/data/clients.fdb" user sysdba password masterkey default character set UTF8;
- insert the data from your database
- install lazarus via dnf:
sudo dnf install lazarus
While this installs a dated Lazarus, it also installs all the necessary dependencies to build Lazarus. If you know how to install the dependencies without this step, you can skip it. - install Lazarus 3.4 and fpc 3.2.2 with fpcupdeluxe
- checkout and install the latest Zeos 8:
Code: Select all
svn co https://svn.code.sf.net/p/zeoslib/code-0/branches/8.0-patches zeos-8
- modify your source:
Connection.Database='/var/lib/firebird/data/clients.fdb'
Some notes:
- Try to stay inside the package system of your Linux distro - this really helps. I can only assume that you tried to install Firebird 3 because your samplke database is for Firebird 3.
- In 99% of all cases you don't want to use FindField. Use FieldByName instead. FindField will lead to access violations if a field was not found, because it will return nil in that case. FieldByName will raise a descriptive exception in that case. -> Your Access violation could happen because one or more fields are missing in your database!
Jan
-
- Fresh Boarder
- Posts: 7
- Joined: 16.07.2024, 18:31
Re: Erro: ZeosLib 8.0 Access violation AlmaLinux 9.4 Lazarus 3.6
I will do that, thank you.
Mr Silva.
Developer System
Mr Silva.
Developer System