I believe it is a compiler error and will raise a QA ticket
Thanks for your help
D
On 26/08/11 08:17, Peter Ingham wrote:
> Try filling LogData with binary zeros after the Getmem& before the assign.
>
> FillChar (LogData^, sizeof(TLogData), 0);
>
> I believe the uninitialized memory is messi
Try filling LogData with binary zeros after the Getmem & before the assign.
FillChar (LogData^, sizeof(TLogData), 0);
I believe the uninitialized memory is messing up the compiler magic
associated with the dynamic array.
Any reason the local Tlogdata record is referenced via a pointer?
I susp
Hi Peter
Been there done that :)
The function call is fine. It is the assignment that causes the AV -
because the "bucket" is too small.
Assigning it with 16 bytes fixes the problem, regardless of how many
items the array holds.
I smell compiler magic in the background.
Cheers
D
On 25/08/1
Another attempt to reply...
First thing to do is determine if the crash occurs in the procedure call,
on the subsequent assign, or in between.
Give this a try:
procedure TUserClass.Log(const LogType: TLogType; const Args: array of
const );
var
LogData: PLogData;
TempArgs : TConstArra