[ 
https://issues.apache.org/jira/browse/FLEX-33747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mihai Chira updated FLEX-33747:
-------------------------------

    Attachment: _ByeByeCreationComplete.fxp

> LayoutManager does not fail gracefully if error thrown as a result of its code
> ------------------------------------------------------------------------------
>
>                 Key: FLEX-33747
>                 URL: https://issues.apache.org/jira/browse/FLEX-33747
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Layout - General
>    Affects Versions: Apache Flex 4.10.0
>         Environment: Windows 8
> Apache Flex SDK 4.10
>            Reporter: Mihai Chira
>              Labels: easytest
>             Fix For: Apache Flex 4.11.0
>
>         Attachments: _ByeByeCreationComplete.fxp
>
>
> Compile and run the attached project.
> If the checkbox is selected, an error is thrown that stops future validation 
> of the stage and prevents new components to have the .initialized flag set to 
> true (which is the prerequisite for having their CREATION_COMPLETE event 
> thrown. Lots of frameworks depend on this event for mediator initialization 
> and others).
> If the checkbox is not selected and you then click on the "Throw Error" 
> button, then a similar error as before is thrown which does not prevent 
> future execution of LayoutManager or other key framework components. As a 
> result, the error dialogue is correctly shown with a green rectangle on the 
> top to indicate that it had its CREATION_COMPLETE event thrown.
> I'm not exactly sure whether this is a bug per se, but from looking at 
> LayoutManager.validateClient, it appears that it is possible for this 
> function to fail gracefully and continue normal execution when an error is 
> thrown in the middle of its while() loop. I tried using a try/catch block 
> which caught the error, allowed the last if block execute (which sets 
> initialized to true), then threw the error again. This worked slightly better 
> than not having it, but still future validations would not happen unless 
> validateNow() was called on various components.
> What I haven't tried is to empty the invalidatePropertiesQueue or reset other 
> important variables. But I really don't know enough about the LayoutManager 
> to implement such changes.
> The reason I'm opening this is that I've been investigating a bug that would 
> open an empty dialogue in our application, and the reason the dialogue was 
> not showing the error was all the above.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to