3 Replies Latest reply on Sep 1, 2009 12:05 PM by CoreyRLucier

    Timeout issue in Flex 4

    DilipShah Level 1
      I 'ported' my Flex 3 project to Flex 4 and on a particular component I have been facing a peculiar problem.
      Through the application navigation, when I come to this component, the application times out with the following exception:
      Error: Error #1502: A script has executed for longer than the default timeout period of 15 seconds.
      at mx.managers.layoutClasses::PriorityQueue/contains()
      at mx.managers.layoutClasses::PriorityQueue/removeSmallestChild()[E:\dev\beta1\fra meworks\projects\framework\src\mx\managers\layoutClasses\PriorityQueue.as:285]
      at mx.managers::LayoutManager/validateClient()[E:\dev\beta1\frameworks\projects\fr amework\src\mx\managers\LayoutManager.as:966]
      at mx.core::UIComponent/validateNow()[E:\dev\beta1\frameworks\projects\framework\s rc\mx\core\UIComponent.as:6881]
      at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::validateBaseli nePosition()[E:\dev\beta1\frameworks\projects\framework\src\mx\core\UIComponent. as:6917]
      at spark.components.supportClasses::SkinnableComponent/getBaselinePositionForPart( )[E:\dev\beta1\frameworks\projects\flex4\src\spark\components\supportClasses\Ski nnableComponent.as:902]
      at spark.components.supportClasses::TextBase/get baselinePosition()[E:\dev\beta1\frameworks\projects\flex4\src\spark\components\ supportClasses\TextBase.as:290]
      at mx.containers::FormItem/updateDisplayList()[E:\dev\beta1\frameworks\projects\fr amework\src\mx\containers\FormItem.as:993]
      at mx.core::UIComponent/validateDisplayList()[E:\dev\beta1\frameworks\projects\fra mework\src\mx\core\UIComponent.as:7691]
      at mx.core::Container/validateDisplayList()[E:\dev\beta1\frameworks\projects\frame work\src\mx\core\Container.as:3208]
      at mx.managers::LayoutManager/validateDisplayList()[E:\dev\beta1\frameworks\projec ts\framework\src\mx\managers\LayoutManager.as:663]
      at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\beta1\frameworks\proj ects\framework\src\mx\managers\LayoutManager.as:718]
      at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\beta1\framewo rks\projects\framework\src\mx\managers\LayoutManager.as:1067]

      The problem seems to be associated with two-way data binding that I have implemented on this component that has FormItems in Spark Group container. The behavior is inconsistent and seemingly unpredictable though!

      Has anyone experienced this type of behavior? Any suggestions on way out of this?

      Dilip Shah
        • 1. Re: Timeout issue in Flex 4
          CoreyRLucier Adobe Employee

          I am not aware of anyone else having run into this.  Can you please make an attempt to put together a test case that reproduces the hang?

           

          Regards,

           

          Corey Lucier

          • 2. Re: Timeout issue in Flex 4
            DilipShah Level 1
            Hi Corey,
            The screen where my application 'froze' contained a  few mx:FormItem elements inside Group containers (and not inside a Form  container). I replaced FormItems with HBox and VBox and that particular issue  got resolved!! You may want to look into this  issue in light of this discovery.
            However, even after implementing this 'fix', I'm  facing yet another issue in the same component and I'm not sure if the  underlying root cause is the same. I have created a sample application to bring  out the issue.
            I've put up this sample application at: http://208.109.28.58:9080/OCNIssue/OCNIssue.html (view  source enabled)
            Application description: The application reads a  simple XML data file (in the real app, it's a Spring-BlazeDS service) and  renders the information. It allows user to add more data / update existing data.  I'm using two-way binding for adding / updating data.
            Issue description: Two-way data binding wipes clean  first selected record in the model. Works fine then onwards. It's as though,  blank fields in the view overwrites model before model has an opportunity to  populate the view.
            Please follow this workflow to reproduce the  issue:
            1. Hit the URL
            2. Click on the place holder image for any of the 3  data elements
            3. Click on Update button
            4. You'll notice that the form is blank. The data,  where two-way binding was used, corresponding to the selected raw has gone  blank. The component is (VideoAddUpdateCore.mxml
            If you replace the two-way binding with Flex 3 type  one-way binding in this component, it'll start behaving as expected! Replacing @  with a reverse binding using fx:Binding leads to the same issue described  above.
            Let me know if you need any further clarification  on this.
            Dilip
            • 3. Re: Timeout issue in Flex 4
              CoreyRLucier Adobe Employee

              Thanks Dilap.

               

              If you create a JIRA bug for the Group/FormItem hang, someone can address.

               

              I would suggest promoting your two-way binding issue to a new thread, as I'm sure there are folks with domain expertise that can help you.

               

              -C