Page 1 of 1

BUG Causes TGDSConnection.GetProp to crash with prMaxStringSize

Posted: Mon 18 Apr 2016 11:26
by mWaltari
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.

Re: BUG Causes TGDSConnection.GetProp to crash with prMaxStringSize

Posted: Wed 20 Apr 2016 12:20
by ViktorV
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.

Re: BUG Causes TGDSConnection.GetProp to crash with prMaxStringSize

Posted: Fri 22 Apr 2016 11:48
by mWaltari
Charset is ISO8859_1

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

Yes, it is initialized, problem is not that

-tee-

Re: BUG Causes TGDSConnection.GetProp to crash with prMaxStringSize

Posted: Fri 22 Apr 2016 11:53
by mWaltari
Also added the Check for the Empty Charset because that would be bug in out code.

Re: BUG Causes TGDSConnection.GetProp to crash with prMaxStringSize

Posted: Mon 25 Apr 2016 09:24
by ViktorV
Unfortunately, we still can't reproduce the issue. Please compose a full sample demonstrating the issue and send it to viktorv*devart*com.

Re: BUG Causes TGDSConnection.GetProp to crash with prMaxStringSize

Posted: Mon 25 Apr 2016 10:50
by mWaltari
Hello,

I'll try to cut out this from our project

-Tee-

Re: BUG Causes TGDSConnection.GetProp to crash with prMaxStringSize

Posted: Tue 26 Apr 2016 09:39
by ViktorV
When you get any results concerning this question, please let us know about them.