[Lazarus] EXC_BAD_ACCESS, Could not access memory

Mattias Gaertner nc-gaertnma at netcologne.de
Tue Apr 28 15:38:26 CEST 2009


On Tue, 28 Apr 2009 15:23:42 +0200
Roland Turcan <konf at rotursoft.sk> wrote:

> <<< 27.4.2009 19:26 - Mattias Gaertner "nc-gaertnma at netcologne.de" >>>
> MG> Use packed records and add gap variables.
> 
> Uffff, look at this:
> 
> TYPE TPackedGap =PACKED RECORD
>                    VarInteger :INTEGER;
>                    Dummy1     :INTEGER;
>                    VarDouble  :DOUBLE;
>                    VarBoolean :BOOLEAN;
>                    VarBoolean2:BOOLEAN;
>                    Dummy2     :Word;
>                    Dummy3     :INTEGER;
>                  END;
> 
> 
> ... and I would expect, that the binary representation of this
> definition will keep the order of variables from definition, but it
> doesn't.

It does.
 
> Could somebody explain what rules is applied to change the order of
> variables in memory?

You forgot to explain why you think that the order is wrong.

Mattias



More information about the Lazarus mailing list