2009/3/22 Luiz Americo Pereira Camara <luiz...@oi.com.br>:
> Starting from revision 19044, when i put a TVirtualStringTree control in a
> form the IDE crashes (see attached log). I could not reproduce with other
> controls and i'm not sure if the problem is in the changes introduced in
> 19044 or if just revealed a TVirtualStringTree bug.
>
> The VTV code can be obtained from:
> https://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus-ccr/components/virtualtreeview-new
> It requires LCLExtension package:
> https://luipack.googlecode.com/svn/trunk/lclextensions
>
>
> Any help is appreciated.

This code was introduced recently by me. This is either my bug or yours,
depending on how we decide ;-)

>  $00641C2A  TLISTPROPERTYEDITOR__GETELEMENTCOUNT,  line 3394 of propedits.pp
>  $0064218A  TLISTPROPERTYEDITOR__DOSAVEELEMENTS,  line 3501 of propedits.pp
>  $00641EBD  TLISTPROPERTYEDITOR__SAVEELEMENTS,  line 3436 of propedits.pp
>  $006426D1  TLISTPROPERTYEDITOR__INITIALIZE,  line 3608 of propedits.pp
>  $0064AEEC  REC,  line 6817 of propedits.pp
>  $0064ACE2  ISINTERESTING,  line 6832 of propedits.pp
>  $0062979D  TOICUSTOMPROPERTYGRID__EDITORFILTER,  line 2169 of
> objectinspector.pp

This code does:

      ed := edClass.Create(nil, 1);
      try
        ed.SetPropEntry(0, A.GetComponent(0), propList^[i]);
        ed.Initialize;

note the "nil" hook parameter. So you have to do one of the following:

1) apply the attached patch
  (but note that the hook it will pass might be not the right one -- I
am not sure)
2) check for nil hook in your Initialize function
3) explain to me how to obtain the correct hook ;-)

If (1) helps, please apply the patch to Lazarus, if you have commit rights.

-- 
Alexander S. Klenin
Index: propedits.pp
===================================================================
--- propedits.pp	(revision 19044)
+++ propedits.pp	(working copy)
@@ -6811,7 +6811,7 @@
       if not (propList^[i]^.PropType^.Kind in AFilter + [tkClass]) then continue;
       edClass := GetEditorClass(propList^[i], A.GetComponent(0));
       if edClass = nil then continue;
-      ed := edClass.Create(nil, 1);
+      ed := edClass.Create(FPropertyHook, 1);
       try
         ed.SetPropEntry(0, A.GetComponent(0), propList^[i]);
         ed.Initialize;
_______________________________________________
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to