Re: [Lazarus] Help to find cause of crash in IDE after revision 19044
As a general design note, I think that PropertyEditor.GetAttributes function should be split into static and dynamic parts, where static part supplies type-specific attributes, and dynamic -- value-specific ones. -- Alexander S. Klenin ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Help to find cause of crash in IDE after revision 19044
On Sun, Mar 22, 2009 at 16:37, Alexander Klenin kle...@gmail.com wrote: 1) apply the attached patch I somehow managed to save incorrect patch. Please use this version instead. -- Alexander S. Klenin Index: propedits.pp === --- propedits.pp (revision 19058) +++ 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(AEditor.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
Re: [Lazarus] Help to find cause of crash in IDE after revision 19044
Alexander Klenin escreveu: On Sun, Mar 22, 2009 at 16:37, Alexander Klenin kle...@gmail.com wrote: 1) apply the attached patch I somehow managed to save incorrect patch. Please use this version instead. I applied this patch but it gives the same problem. FYI, VTV does not define any custom property editor. How can i know what is the property giving problem? i tried to get the name through calling GetValue in Initialize method of the TListPropertyEditor but returned Unknown. Luiz ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Help to find cause of crash in IDE after revision 19044
On Sun, Mar 22, 2009 at 20:37, Luiz Americo Pereira Camara luiz...@oi.com.br wrote: FYI, VTV does not define any custom property editor. Ok, I was too lazy to download and install VirtualTree and so shot in the dark. How can i know what is the property giving problem? Call GetName or GetPropertyPath. i tried to get the name through calling GetValue in Initialize method of the TListPropertyEditor but returned Unknown. Hm, I do not see a way TListPropertyEditor.GetValue can return 'Unknown'... Are you sure there is no inherited class? -- Alexander S. Klenin ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Help to find cause of crash in IDE after revision 19044
Alexander Klenin escreveu: On Sun, Mar 22, 2009 at 20:37, Luiz Americo Pereira Camara luiz...@oi.com.br wrote: FYI, VTV does not define any custom property editor. Ok, I was too lazy to download and install VirtualTree and so shot in the dark. How can i know what is the property giving problem? Call GetName or GetPropertyPath. Now i've got: Columns and TVirtualStringTree.Columns The problem is that Columns is a property of Header (TVirtualStringTree.Header.Columns). Previously Columns where streamed as a direct child of TVirtualStringTree using DefineProperties method as a workaround to Delphi bug. I removed this hack and now Columns is streamed as child of Header. Is there any method, other than DefineProperty, that can change a property hierarchy? FYI Columns.GetOwner returns the Header instance. i tried to get the name through calling GetValue in Initialize method of the TListPropertyEditor but returned Unknown. Hm, I do not see a way TListPropertyEditor.GetValue can return 'Unknown'... Are you sure there is no inherited class? I called both GetValue (0 items) and inherited GetValue (Unknown). Luiz ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Help to find cause of crash in IDE after revision 19044
Luiz Americo Pereira Camara escreveu: Alexander Klenin escreveu: On Sun, Mar 22, 2009 at 20:37, Luiz Americo Pereira Camara luiz...@oi.com.br wrote: How can i know what is the property giving problem? Call GetName or GetPropertyPath. Now i've got: Columns and TVirtualStringTree.Columns Columns is a TCollection descendant but is using a TList property editor. The crash probably is due to the cast to TList (TheList:=TList(GetObjectValue);) in TListPropertyEditor.ReadElementCount Luiz ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Help to find cause of crash in IDE after revision 19044
On Sun, Mar 22, 2009 at 23:22, Luiz Americo Pereira Camara luiz...@oi.com.br wrote: Luiz Americo Pereira Camara escreveu: Columns is a TCollection descendant but is using a TList property editor. The crash probably is due to the cast to TList (TheList:=TList(GetObjectValue);) in TListPropertyEditor.ReadElementCount I'm looking at the same piece of code now, but this seems unlikely to me. Columns should use TCollectionPropertyEditor unless it is specifically overridden by VTV. Debug printing seems to confirm that. Anyway, stacktrace points at Result:=ReadElementCount like, which is totally insane. Is seems that virtual function table is broken?! -- Alexander S. Klenin ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Help to find cause of crash in IDE after revision 19044
Alexander Klenin escreveu: BTW, perhaps it would be easier to use IRC? I'm _Ask_ on #lazarus-ide. Yes. Lazarus mailing list has a big lag for me Luiz ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Help to find cause of crash in IDE after revision 19044
After IRC discussion the fix was submitted to Mantis as http://bugs.freepascal.org/view.php?id=13381 -- Alexander S. Klenin ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus