I can not use tdbimage, access violation!
loadpicture error?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20080901/28f8672e/attachment-0001.html

Mailing lists / lazarus / 2008-09
4 messages · 3 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
I can not use tdbimage, access violation!
loadpicture error?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20080901/28f8672e/attachment-0001.html
Op maandag 01-09-2008 om 12:05 uur [tijdzone -0300], schreef Osvaldo Filho:
I can not use tdbimage, access violation! loadpicture error?
Hmm... I had that working with a few hacks. Maybe that it doesn't work anymore with the latest image changes in Lazarus-svn. So which fpc and lazarus version are you using?
Joost
Hi, the error is in loadpicture ???
gc := s.readansistring ???My environment:
Ubuntu 8.04.1
FPC 2.2.3 - svn copy
Lazarus 0.9.25 r16351 - svn copy
Op maandag 01-09-2008 om 12:05 uur [tijdzone -0300], schreef Osvaldo Filho: Hmm... I had…
With my image: a .jpg file
---------------------------
in dbimage.inc, line 163:
try
GraphExt := s.ReadAnsiString; gc := GetGraphicClassForFileExtension(GraphExt);
if assigned(gc) then
begin
AGraphic := gc.Create;
AGraphic.LoadFromStream(s);
Picture.Assign(AGraphic);
end;
-------------------------------------------gc is not assigned, is it correct?
==========================================================
The AV ocour here:
dbimage.inc line 175
----------------------
Picture.Assign(AGraphic);
end;
finally
line 175>> if assigned(AGraphic) then AGraphic.Free;
s.Free;
end {try}
----------------------