[fpc-devel] lazarus project crash on paticular event handler call if Objects unit is used

Jonas Maebe jonas.maebe at elis.ugent.be
Sat Sep 26 16:38:11 CEST 2009


On 26 Sep 2009, at 16:25, Paul Ishenin wrote:

> Can someone explain how it is possible: http://bugs.freepascal.org/view.php?id=14670 
>  ?
>
> Objects.pp has only one trivial line of code which executes on the  
> start. Maybe because it uses "begin end." instead of  
> "initialiaztion"? I guess that in any case it is a compiler bug  
> rather than a lazarus bug.

The problem is most likely that the "objects" unit declares a TObject  
type, which is a TP-style object. As a result, the TForm1 methods do  
not expect a Delphi-style TObject parameter, but a TP-style TObject  
parameter (by value). I don't know how the ListView1EndDrag and  
MenuItem1Click methods in unit1 are called, but I assume that's done  
somehow indirectly with an objpas.TObject parameter, which would  
result in an unbalanced stack.


Jonas



More information about the fpc-devel mailing list