BUG Causes TGDSConnection.GetProp to crash with prMaxStringSize

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
mWaltari
Posts: 6
Joined: Thu 10 Jul 2014 09:18

BUG Causes TGDSConnection.GetProp to crash with prMaxStringSize

Post by mWaltari » Mon 18 Apr 2016 11:26

This in lattest BbDAC version : 5.6.21

The FCharLength = 0 and this causes Int div by Zero.

This problem appears if I try to create Database with TIBCConnection.CreateDataBase

And whole DB creating Code is here.

AConnection.Close;

AConnection.Params.Clear;
AConnection.Params.Add('USER ' + QuotedStr(AConnection.Username));
AConnection.Params.Add('PASSWORD ' + QuotedStr(AConnection.Password));
AConnection.Params.Add('PAGE_SIZE 8192');
AConnection.Params.Add('DEFAULT CHARACTER SET ' + AConnection.Options.Charset);
// AConnection.Options.CharLength := 1; // <- Addign This helps,
AConnection.CreateDataBase;
AConnection.Params.Clear;

Result := AConnection.Connected;


----
seems that in this case the CharLength is not initialized by the Charset given. Which is '' in our DB.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: BUG Causes TGDSConnection.GetProp to crash with prMaxStringSize

Post by ViktorV » Wed 20 Apr 2016 12:20

Unfortunately, we couldn't reproduce the issue. We got no errors on dividing by zero. Note that when using the DEFAULT CHARACTER SET charset parameter in construct CREATE DATABASE, charset can't be equal to empty string. Please add the following line in your sample:
if AConnection.Options.Charset <> '' then
before the line:
AConnection.Params.Add('DEFAULT CHARACTER SET ' + AConnection.Options.Charset);
And check if the issue is reproduced. If the issue persists, please compose a full sample demonstrating the issue and send it to us.

mWaltari
Posts: 6
Joined: Thu 10 Jul 2014 09:18

Re: BUG Causes TGDSConnection.GetProp to crash with prMaxStringSize

Post by mWaltari » Fri 22 Apr 2016 11:48

Charset is ISO8859_1

Not Empty I think, but I'll Check...

Yes, it is initialized, problem is not that

-tee-

mWaltari
Posts: 6
Joined: Thu 10 Jul 2014 09:18

Re: BUG Causes TGDSConnection.GetProp to crash with prMaxStringSize

Post by mWaltari » Fri 22 Apr 2016 11:53

Also added the Check for the Empty Charset because that would be bug in out code.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: BUG Causes TGDSConnection.GetProp to crash with prMaxStringSize

Post by ViktorV » Mon 25 Apr 2016 09:24

Unfortunately, we still can't reproduce the issue. Please compose a full sample demonstrating the issue and send it to viktorv*devart*com.

mWaltari
Posts: 6
Joined: Thu 10 Jul 2014 09:18

Re: BUG Causes TGDSConnection.GetProp to crash with prMaxStringSize

Post by mWaltari » Mon 25 Apr 2016 10:50

Hello,

I'll try to cut out this from our project

-Tee-

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: BUG Causes TGDSConnection.GetProp to crash with prMaxStringSize

Post by ViktorV » Tue 26 Apr 2016 09:39

When you get any results concerning this question, please let us know about them.

Post Reply