History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: LPP-3921
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: P1 P1
Assignee: Unassigned
Reporter: Antun Karlovac
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenLaszlo

Client hangs when destroying deeply nested tree

Created: 27/Apr/07 02:16 PM   Updated: Today 11:55 AM
Component/s: Laszlo Foundation Classes (LFC)
Affects Version/s: 3.4
Fix Version/s: Legals, 4.0.3

Time Tracking:
Not Specified

File Attachments: 1. File hangdestroy.lzx (3 kb)


Severity: Minor
Fixed in Change#: 5,101
Runtime: N/A
Flags: Support
Fix in hand: False


 Description  « Hide
The client "hangs" when you destroy a deeply nested tree. See the attached example.

Steps:

1. Click button to instantiate window.
2. Open the tree as far as it will go (use the right keyboard arrow to do this quickly).
3. Close the window. Its close method will destroy the tree.

The client hangs. There no "script-running-slowly" error. Just no further mouse or keyboard response from the app.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Philip Romanik - 28/Apr/07 08:12 AM
I reduced the example to not use databinding or windows. On 3.4 this example works if I open until the item "test15" is displayed. It stops responding if I have more open.

This also fails on legals swf in a similar fashion although I need at least 18 items open. It works in dhtml.


<canvas debug="true">
        
<view name="toplevel" width="800" height="600">
  <simplelayout axis="y"/>
  <button text="close" onclick = "this.parent.destroy();"/>
        
  <view name="test11" bgcolor="red">
    <tree name="root" text="root">
     <tree name="test0" text="test0">
      <tree name="test1" text="test1">
       <tree name="test2" text="test2">
        <tree name="test3" text="test3">
         <tree name="test4" text="test4">
          <tree name="test5" text="test5">
           <tree name="test6" text="test6">
            <tree name="test7" text="test7">
             <tree name="test8" text="test8">
              <tree name="test9" text="test9">
               <tree name="test10" text="test10">
                <tree name="test11" text="test11">
                 <tree name="test12" text="test12">
                  <tree name="test13" text="test13">
                   <tree name="test14" text="test14">
                    <tree name="test15" text="test15">
                     <tree name="test16" text="test16">
                      <tree name="test17" text="test17">
                       <tree name="test18" text="test18">
                        <tree name="test19" text="test19">
                        </tree>
                       </tree>
                      </tree>
                     </tree>
                    </tree>
                   </tree>
                  </tree>
                 </tree>
                </tree>
               </tree>
              </tree>
             </tree>
            </tree>
           </tree>
          </tree>
         </tree>
        </tree>
       </tree>
      </tree>
     </tree>
  
    </tree>
  </view>
</view>
        
</canvas>

Philip Romanik - 04/May/07 08:00 AM
Actually, my app demonstrates only one issue. When I found a fix to it, the original app still failed. The change I made is to add a destroy() method in basetree.lzx. This will get submitted as a changeset soon:

         <!--- @keywords private -->
         <method name="destroy">
             // Close all child windows and destroy them first
             this.openChildren (false);
             this.children.destroy();
             super.destroy();
         </method>

Philip Romanik - 18/May/07 09:52 AM
Change 20070517-Philip-6 by Philip@Philip-DC on 2007-05-17 13:11:53 EST
     in /cygdrive/f/laszlo/svn/src/svn/openlaszlo/branches/legals

Summary: Client hangs when destroying deeply nested tree (in swf)

New Features:

Bugs Fixed: LPP-3921

Technical Reviewer: jcrowley
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:
Added basetree.destroy() to close the tree and destroy the children
elements before anything else. This reduces the stack depth in swf and the
problem is no longer seen. This was never an issue with dhtml.

Tests:
Run the attached example in the comments. The original example doesn't run
properly in legals. Other tree examples continue to work just fine. If you
run tree_example.lzx, you'll see some display issues that are caused by
another bug (LPP-3959).

Files:
M lps/components/base/basetree.lzx

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20070517-Philip-6.tar

Mamye Kratt - 17/Jul/07 10:47 AM
(4.0 branch (4.0.3) local build r5678)
Closing, Phil's example works in swf. See LPP-4305 for dhtml problem.