1. Stefan Glienke
  2. Spring4D
  3. Issues

Issues

Issue #171 new

ReadBlobData StackOverflow

Cesar Romero
created an issue

When using TObjectDataSet with a TBlobField in Delphi Seattle, it is raising StackOverflow in Spring.Persistence.ObjectDataset.Blob.TODBlobStream.ReadBlobData

procedure TODBlobStream.ReadBlobData;
begin
  {$IF CompilerVersion >= 24}
  FFieldData := FField.AsVariant;
  {$ELSE}
  FDataSet.GetFieldData(FField, @FFieldData, True);
  {$IFEND}

When "FFieldData := FField.AsVariant;" is executed, it turns to call ReadBlobData again and the app stops in a StackOverflow error.

if this code and the compiler directive is commented it works as expected, but the compiler shows the warning:

[dcc32 Warning] Spring.Persistence.ObjectDataset.Blobs.pas(109): W1000 Symbol 'GetFieldData' is deprecated: 'Use overloaded method instead'

procedure TODBlobStream.ReadBlobData;
begin
// TODO -cBUG : StackOVerflow
//  {$IF CompilerVersion >= 24}
//  FFieldData := FField.AsVariant;
//  {$ELSE}
  FDataSet.GetFieldData(FField, @FFieldData, True);
//  {$IFEND}
//...

Comments (6)

  1. Log in to comment