[Lazarus] EXC_BAD_ACCESS, Could not access memory

Bogusław Brandys brandys at o2.pl
Fri Apr 24 18:40:11 CEST 2009


Roland Turcan pisze:
> Hello Dmitry,
> 
> <<< 24.4.2009 16:17 - dmitry boyarintsev "skalogryz.lists at gmail.com" >>>
>>> Stream.Read (HeaderLen, SIZEOF (HeaderLen));
>>>
>>> where information header's length is stored into binary.
> 
> db> HeaderLen is integer, right?
> db> have you checked HeaderLen being large that sizeof(TSomeHeader)
> 
> Of course, that I know now that the problem is, that the binary which
> is parsed contains bigger size that size if Header is.
> 
> db> it's possible, especiialy for Mac files, because of PowerPC and some
> db> structures may use Big-endian byte order, rather than Intel
> db> (little-endian)
> 
> This I know, but are there other differences? I mean sizes of
> datatypes between Win&Linux and Mac (intel/ppc)?
> 

hmm,I smell somthing related to not packed records and different size of 
record in different platforms ..


you should really check what is written to the file and what is read 
from stream.

Not sure, maybe it could be related ? : http://www.freepascal.org/port.var

Boguslaw



More information about the Lazarus mailing list