Lazarus

Programming => Packages and Libraries => Topic started by: IPguy on August 19, 2011, 02:32:53 am

Title: [Solved] VirtualStringTree DeleteSelectedNodes or EndUpdate error?
Post by: IPguy on August 19, 2011, 02:32:53 am
I'm getting SIGGEGVs when I select some number of nodes and call vst.DeleteSelectedNodes.  See the gdb output, below (and the bug report I created for additional information.
http://code.google.com/p/virtual-treeview/issues/detail?id=200)

The error appears to be an "Access Violation" of some sort.

The number of selected nodes which results in the error is ~ 1500 (most times) and it occurs when I select / delete all 1500 or when I select / delete multiple groups of nodes that total 1500.

Any thoughts or suggestions?

Update: 0.9.31-31848-2.5.1-win32-Vista, using vtv.4.8.7 from the SVN.
This has existed at least since I was using 0.9.29-27389 & vtv 4.8.6.

Code: [Select]
Program received signal SIGSEGV, Segmentation fault.
0x0058c008 in TBASEVIRTUALTREE__PACKARRAY (THEARRAY=0x12ebe0, COUNT=15,
    this=<error reading variable>) at VirtualTrees.pas:13168
13168       if vsSelected in TheArray[i]^.States then begin


(gdb) info stack
#0  0x0058c008 in TBASEVIRTUALTREE__PACKARRAY (THEARRAY=0x12ebe0, COUNT=15,
    this=<error reading variable>) at VirtualTrees.pas:13168
#1  0x005a2a0f in TBASEVIRTUALTREE__ENDUPDATE (this=<error reading variable>)
    at VirtualTrees.pas:24863
#2  0x005a278c in TBASEVIRTUALTREE__DELETESELECTEDNODES (
    this=<error reading variable>) at VirtualTrees.pas:24763
#3  0x00427ee4 in TFRIMMAIN__BDELETESELECTEDCLICK (SENDER=0x3c49460,
    this=<error reading variable>) at RIMMain.pas:792

Title: Re: VirtualStringTree DeleteSelectedNodes or EndUpdate error?
Post by: IPguy on August 19, 2011, 02:50:23 am
as an FYI - here is my code snippet.

 
Code: [Select]
VST.BeginUpdate;
try
   VST.DeleteSelectedNodes;
finally
   VST.Refresh;
   VST.EndUpdate;                    // error happens inside this stmt
end;                     
Title: Re: VirtualStringTree DeleteSelectedNodes or EndUpdate error?
Post by: LuizAmérico on August 19, 2011, 03:30:03 am
The correct place to report VTV bugs with Lazarus is http://bugs.freepascal.org/ section Lazarus-ccr
Title: Re: VirtualStringTree DeleteSelectedNodes or EndUpdate error?
Post by: IPguy on August 19, 2011, 03:53:53 am
Luiz,
I agree with your comment and I have opened a VST/VTV ticket for another issue a while ago.  I will create a ticket for this issue shortly.

I was hoping to get to get some hints on debugging. 
The above was my first attempt at using gdb and I'm wanted to be sure I was collecting useful information and not doing anything stupid (like using .Terminate in OnClose) before I created the ticket. 
Title: Re: VirtualStringTree DeleteSelectedNodes or EndUpdate error?
Post by: LuizAmérico on August 19, 2011, 04:38:58 am
I can confirm the bug, but is really hard to know whats going on ...
Title: [Solved] Re: VirtualStringTree DeleteSelectedNodes or EndUpdate error?
Post by: IPguy on September 04, 2011, 02:21:37 am
FYI - This bug was fixed in Lazarus-CCR, v1888.
TinyPortal © 2005-2018