Subject | Problems in TIB_BlobStream with the last Beta |
---|---|
Author | m. Th. |
Post date | 2009-07-20T09:46:25Z |
Hi,
I made a more complex test bed with the latest beta, real life databases
and DevExpress's components. It's a little bit harder to explain it in
few words but here is what I got:
in IB_Components.pas we have:
procedure TIB_BlobStream.Initialize;
var
ParentBlobRef: PIB_BlobNode;
tmpBlobNode: PIB_BlobNode;
tmpArrayDesc: PISC_ARRAY_DESC;
procedure GetNewBlobNode( ForReading: boolean );
begin
FBlobNode := AllocMem( SizeOf( TIB_BlobNode ));
ClearBlobNodeData( BlobNode );
BlobNode.BlobID := pisc_quad(SQLVAR.SQLData)^;
BlobNode.BlobFieldNo := FColumn.FieldNo; //<----------------!!!
blows here!!!
if ForReading then
try
tmpArrayDesc := nil;
//.... etc.
It's a query with persistent fields which has some blob fields tied to a
TcxGrid (DevExpress's DBGrid).
It throws an AV immediately after .Open on the marked line because
FColumn is nil.
[Stack trace:]
//...snipped...
TMemoField.GetAsVariant
TIBODataset.CreateBlobStream
TIBOBlobStream.Create
TIB_BlobStream.Create
TIB_BlobStream.Initialize
GetNewBlobNode( True ) //called from 'case Mode of ... bsmReadOld:'
(see source)
[End Stack trace]
What's interesting is that in TIB_BlobStream.Create we have...
begin
FRow := ARow;
FPSQLVAR := ASQLVar;
FFieldNo := AFieldNo;
FBlobNode := ABlobNode;
FPBlobHead := APBlobHead;
FMode := AMode;
FPosition := 0;
Initialize;
inherited Create;
end;
So, there's _no_way_ AFAIS to have FColumn different to nil (note that
Initialize is the 1st call above).
Can someone (Jason) shed some light on this?
TIA,
m. Th.
[Non-text portions of this message have been removed]
I made a more complex test bed with the latest beta, real life databases
and DevExpress's components. It's a little bit harder to explain it in
few words but here is what I got:
in IB_Components.pas we have:
procedure TIB_BlobStream.Initialize;
var
ParentBlobRef: PIB_BlobNode;
tmpBlobNode: PIB_BlobNode;
tmpArrayDesc: PISC_ARRAY_DESC;
procedure GetNewBlobNode( ForReading: boolean );
begin
FBlobNode := AllocMem( SizeOf( TIB_BlobNode ));
ClearBlobNodeData( BlobNode );
BlobNode.BlobID := pisc_quad(SQLVAR.SQLData)^;
BlobNode.BlobFieldNo := FColumn.FieldNo; //<----------------!!!
blows here!!!
if ForReading then
try
tmpArrayDesc := nil;
//.... etc.
It's a query with persistent fields which has some blob fields tied to a
TcxGrid (DevExpress's DBGrid).
It throws an AV immediately after .Open on the marked line because
FColumn is nil.
[Stack trace:]
//...snipped...
TMemoField.GetAsVariant
TIBODataset.CreateBlobStream
TIBOBlobStream.Create
TIB_BlobStream.Create
TIB_BlobStream.Initialize
GetNewBlobNode( True ) //called from 'case Mode of ... bsmReadOld:'
(see source)
[End Stack trace]
What's interesting is that in TIB_BlobStream.Create we have...
begin
FRow := ARow;
FPSQLVAR := ASQLVar;
FFieldNo := AFieldNo;
FBlobNode := ABlobNode;
FPBlobHead := APBlobHead;
FMode := AMode;
FPosition := 0;
Initialize;
inherited Create;
end;
So, there's _no_way_ AFAIS to have FColumn different to nil (note that
Initialize is the 1st call above).
Can someone (Jason) shed some light on this?
TIA,
m. Th.
[Non-text portions of this message have been removed]