Subject RE: [IBO] AV for CreateBlobStream: second post, this time with simple test
Author IBO Support List
Barry,

What version of IBO, Delphi, Firebird, etc. are you at?

Please send me a sample app that will reproduce the crash for me.

Jason

-----Original Message-----
From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On Behalf
Of ifitsx
Sent: 22 January 2012 09:09 AM
To: IBObjects@yahoogroups.com
Subject: Re: [IBO] AV for CreateBlobStream: second post, this time with
simple test



--- In IBObjects@yahoogroups.com, "IBO Support List" <supportlist@...>
wrote:
>
> I'm quite sure this has already been fixed.
>
> Jason

What's been fixed?
The test below crashes on my Win7 x64, DEX2 system.

I don't know how to trace into IBODataset's source with this: setting
breakpoints and using F7 the first time gives the same AV.

Barry

> -----Original Message-----
> From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On
Behalf
> Of ifitsx
> Sent: 20 January 2012 04:55 PM
> To: IBObjects@yahoogroups.com
> Subject: [IBO] AV for CreateBlobStream: second post, this time with simple
> test
>
> I've been using v4.2Hd for many years now, not needing elaborate
> functionality.
>
> However, I have now upgraded to Win7 x64 and DEX2, so I'm trying to move
my
> few apps over.
>
> I'me getting an AV when I try to create a readonly blobstream, however,
> writeonly works well: Kind of an unusual contradiction.
>
> Rather than presume there is something complex amuck in my app, here's a
> simple test using only an IBODatabase and an IBOQuery that I'm now running
> on Win7 x64 and DEX2, and IB v4.9.14.b35, almost the exact update source.
>
> Practically everyone should have some db (I'm still using Firebird 1.5.6,
> wanting to get the 'simple stuff' taken care of before moving to 2.5x)
that
> has any stringfield and a blob - mine's a memofield.
>
> So, take an IBODatabase and an IBOQuery, connect it to any db with a
string
> field and, preferably a memofield - that's what's at issue for me - and
try
> to run this, and hopefully tell me why it doesn't work for me:
>
> procedure TForm1.FormActivate(Sender: TObject);
> begin
> qryTestBlob.Close;
> qryTestBlob.Open;
> edt1.Text := qryTestBlob.FieldByName('Subject').AsString;
> end;
>
> procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
> begin
> qryTestBlob.Close;
> dbTestBlob01.Connected := False;
> end;
>
> procedure TForm1.FormCreate(Sender: TObject);
> begin
> dbTestBlob01.Connected := True;
> end;
>
> procedure TForm1.GetBlobClick(Sender: TObject);
> var
> BlobStrmLoad: TStream;
> begin
> BlobStrmLoad := nil;
> if qryTestBlob.Active then
> begin
> try
> qryTestBlob.Next;
> if NOT qryTestBlob.FieldByName('SUBJECT').IsNull then
> begin
> BlobStrmLoad :=
> qryTestBlob.CreateBlobStream(qryTestBlob.FieldByName('NOTES'), bmRead);
> edt1.Text := qryTestBlob.FieldByName('Subject').AsString;
> end;
> finally
> if Assigned(BlobStrmLoad) then
> FreeAndNil(BlobStrmLoad); end;
> end; // if qryTestBlob.Active
> end;
>
> CreateBlogStream returns, on my system, the ?standard AV, $C0000005.
>
> Yet under 4.2Hd, it works perfectly.
>
> ??
>
> Barry