Page 1 of 1

External:SIGSEGV ZAbstractRODtaset.pas Line 4978

Posted: 25.04.2020, 08:31
by ZEOSFIREBIRD
Downloaded Zeos 7.3 today (zeoslib-code-0-r6475-branches-testing-7.3).
The operating system used is Windows 10 with all updates available to date,
Lazarus 2.0.8, Firebird 4.0 Beta 1.

The database used is Firebird 4.0 Beta 1 embedded. The setting
of ControlCodePage was also previously cCP_UTF8 (can no longer
be changed, as far as I have noticed), client code page is UTF8.

After changing Zeos, I recompiled Lazarus and recompiled my
application. That went perfectly. However, when I started the
program, I received the following error message:

Exception class "External: SIGSEGV" raised
In file '.. \ .. \ src \ component \ ZAbstractRODtaset.pas' in
line 4978: 'Result: = Clob.GetStream (CP);'

The blob is defined as follows:
FIELD NAME BLOB SUB_TYPE TEXT CHARACTER SET UTF8

Have replaced this line 4978 with "Result: = Blob.GetStream;"
As far as I've seen it, I can initially continue working with the new
version. My application should be ready by the end of the year,
that's why Firebird 4.

Re: External:SIGSEGV ZAbstractRODtaset.pas Line 4978

Posted: 27.04.2020, 09:16
by marsupilami
Hello,

thank you for the bugreport. I have some questions:
  • Could you post the code that triggers the problem?
  • I assume, the field type is blob sub_type text?
  • What is the database codepage? Is it UTF8?
  • What is the blob field code page? Is it the database default codepage?
About Firebird 4.0: The Beta 1 build is quite aged. Maybe it makes more sense to use a nightly build? Will Firebird 4.0 be released this year? I didn't read anything about this (yet).

Best regards,

Jan

Re: External:SIGSEGV ZAbstractRODtaset.pas Line 4978

Posted: 06.05.2020, 16:11
by EgonHugeist
Ping.. Please answer Jan questions if you expect support.

Re: External:SIGSEGV ZAbstractRODtaset.pas Line 4978

Posted: 28.05.2020, 14:58
by ZEOSFIREBIRD
Hello Jan,

excuse me, has no time until now to work for programming. Here are the Infos I have download Zeos 7.3
today and worked with them.

To post the code is difficult, because much. But I can make a zip-file and send you a link for download. It is a stand-alone program and can be copied with source everywhere.

In advance I would like to say that today I use the same ZConnection settings and SQL statements with the same 2 linked tables to do my SQL tutorial for check. The error did not show up there. However, I do not use the rx components there.

The error occors immediately when I open the second table CONTACT. The Tables are linked via ADRESSID and CLIENTID.

The line I have changed is now on line 5001.

if Blob <> nil then begin
case Field.DataType of
{$IFDEF WITH_WIDEMEMO}
ftWideMemo: begin
Assert(Blob.QueryInterface(IZCLob, CLob) = S_OK);
Result := Clob.GetStream(zCP_UTF16);
end;
{$ENDIF}
ftMemo, ftFmtMemo: begin
ConSettings := FConnection.DbcConnection.GetConSettings;
if FConnection.AutoEncodeStrings or (ConSettings.ClientCodePage.Encoding = ceUTF16)
then CP := ConSettings.CTRL_CP
else CP := ConSettings.ClientCodePage.CP;
Assert(Blob.QueryInterface(IZCLob, CLob) = S_OK);
// This I have changed from Clob. to Blob.
// Result := Clob.GetStream(CP); <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Result := Blob.GetStream;
end;
else Result := Blob.GetStream
end;
if Mode <> bmRead then
Blob.SetOnUpdateHandler(OnBlobUpdate, NativeInt(Field));
end;

The SQL Statements for creating Tables:
--------------
CREATE TABLE ADRESS
(
CLIENTID Smallint,
ADRESSID Bigint,
LOOKUP Varchar(10) CHARACTER SET UTF8,
SALUTATION VARCHAR(14) CHARACTER SET UTF8,
TITLE VARCHAR(50) CHARACTER SET UTF8,
FORENAME Varchar(20) CHARACTER SET UTF8,
MIDDLENAME Varchar(20) CHARACTER SET UTF8,
...
ADRESSMEMO BLOB SUB_TYPE TEXT CHARACTER SET UTF8,
PRIMARY KEY (ADRESSID)
);
-------------
CREATE TABLE CONTACT
(
CLIENTID Smallint,
CONTACTID Bigint,
ADRESSID Bigint,
DESCRIPTIONID Bigint,
DESCRIPTION Varchar(30) CHARACTER SET UTF8,
CONTACT Varchar(60) CHARACTER SET UTF8,
CONTACTINFO Varchar(60) CHARACTER SET UTF8,
CONTACTGROUP Varchar(50) CHARACTER SET UTF8,
CONTACTCREATED Date,
CONTACTMEMO BLOB SUB_TYPE TEXT CHARACTER SET UTF8,
PRIMARY KEY (CONTACTID)
);
----------------

Settings from ZConnection:
ClientCodePage: 'UTF8'
ControlsCodePage: 'cCP_UTF8'
AutoEncodeStrings: T or F, always the error
AutoCommit 'True'
TransActIsolationLevel 'tiReadCommitted'

I think, the best ist you take my program for testing. When you need my program for checking, please say me, because is any work and I want make only, when you need them.

Wish you all healthy and happy days ;-)

Re: External:SIGSEGV ZAbstractRODtaset.pas Line 4978

Posted: 28.05.2020, 15:07
by ZEOSFIREBIRD
I have forget to say you, I have take ZEOS from today - 28. Mai 2020

Re: External:SIGSEGV ZAbstractRODtaset.pas Line 4978

Posted: 31.05.2020, 07:18
by tkamphuis
T have the same problem with already existing projects compiled with an earlear version of zeos. When I try to compile the application with zeos 7.3 build 6582 I get those errror message. I use persistent fields.

When I remove all the persisting fields in the field editor and put them back everything is ok and the error is gone.

I use:
zeos 7.3 build 6582
SQLite 64 bits
Windows 10 prof 1903 18363.836
The latests SQLite dll