Re: [Lazarus] WindowsVersion

2013-07-10 Thread Howard Page-Clark

On 10/07/2013 06:33, Richard Mace wrote:

Hi,
Could someone let me know what until WindowsVersion is in please?


The unit is win32proc.

Howard


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Improper initialization of manged types

2013-07-10 Thread Paul Ishenin

10.07.13, 12:38, Anthony Walter пишет:

http://bugs.freepascal.org/view.php?id=24449


Thanks. I remember I debugged that report and found that RTL initialized 
the record variable.


Do you still have the problem with given (in the bug report) example or 
should I test your bigger example from first mail of this thread?


At the same time can you check (using the debugger) whether 
fpc_initialize routine is called for the method where you see an error 
and what happens in this routine (whether it calls recordrtti or not, 
whether recordrtti routine calls rttiproc(), whether in the later call 
you see PPchar(Data)^ := Nil is executed for the interface field or not).


Best regards,
Paul Ishenin

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Improper initialization of manged types

2013-07-10 Thread 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:

UIntPtr(Result.FProp) := 0;

This works somewhat, but in other places this isn't possible or is very
impractical:

procedure TListTItem.DeleteItem(var Item: ItemType); { virtual }
begin
  Item := default(TItem); // BOOM when TItem is TVec(n)Prop
end;
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] External SigFPE

2013-07-10 Thread Kostas Michalopoulos

 But maybe (not tested) this directive can help:
 http://www.freepascal.org/docs-html/prog/progsu69.html

Thanks, this is what i was asking for :-)
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Improper initialization of manged types

2013-07-10 Thread Paul Ishenin

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

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] WindowsVersion

2013-07-10 Thread Richard Mace
Thanks Howard


On 10 July 2013 07:09, Howard Page-Clark h...@talktalk.net wrote:

 On 10/07/2013 06:33, Richard Mace wrote:

 Hi,
 Could someone let me know what until WindowsVersion is in please?


 The unit is win32proc.

 Howard


 --
 __**_
 Lazarus mailing list
 Lazarus@lists.lazarus.**freepascal.orgLazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarushttp://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus