[Lazarus] Improper initialization of manged types

Paul Ishenin webpirat at mail.ru
Wed Jul 10 16:14:22 CEST 2013

10.07.13, 20:52, Anthony Walter пишет:
> http://cache.codebot.org/snapshops/managederror.jpg
> I put a few lines to test what's going on before the error occurs and a
> screenshot is provided above. WriteLn is writing out a random integer
> value. I don't see any code in the assembler window to initialize the
> result. In that screenshot the test is getting ready to encounter an
> access violation on assignment of nil to FProp.
> Result.FProp := nil; // ERROR: will occur here
> The problem is this sort of thing is happening for me right now in a lot
> of places, for example when I resize a dynamic array holding a
> TVec(N)Prop types, or when I have a local variable.
> You can actually see in that screenshot what I had tried to fix this
> problem previously. That is, putting code like this as the first line in
> some methods:

Can you add a complete example to the bug report you had? The previous 
example attached to it worked for me. Maybe the extended example with 
class operators will not work properly?

Best regards,
Paul Ishenin

More information about the Lazarus mailing list