flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Mclean (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (FLEX-13994) ListBase throws an exception due to lack of error checking
Date Fri, 10 May 2013 00:27:15 GMT

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

Justin Mclean resolved FLEX-13994.
----------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: Adobe Flex SDK 3.0 (Release))
                   Apache Flex 4.10.0

Forgot to resolve issue. Checked into develop.
                
> ListBase throws an exception due to lack of error checking
> ----------------------------------------------------------
>
>                 Key: FLEX-13994
>                 URL: https://issues.apache.org/jira/browse/FLEX-13994
>             Project: Apache Flex
>          Issue Type: Improvement
>          Components: mx: List
>    Affects Versions: Adobe Flex SDK 3.0 (Release)
>         Environment: Affected OS(s): Windows
> Affected OS(s): Windows XP
> Browser: Internet Explorer 7.x
> Language Found: English
>            Reporter: Adobe JIRA
>            Priority: Minor
>              Labels: easyfix
>             Fix For: Apache Flex 4.10.0
>
>
> Steps to reproduce:
> 1. Create a ListBox object
> 2. Dynamicaly load a dataProvider every so often
>  
>  Actual Results:
> ListBase throws an exception every once in a while
>   
>  Expected Results:
> No exception thrown
>   
>  Workaround (if any):
>  None
> Description:
> In the file ListBase.as there is a function "makeRowsAndColumnsWithExtraRows" starting
on line 1326.
> line 1337 reads:
>         offscreenExtraRowsTop = Math.min(desiredExtraRowsTop, verticalScrollPosition);
> Every so often, and I'm not sure why,  the value for verticalScrollPosition is set to
-1 and so the value for offscreenExtraRowsTop is also -1.
> Line 1348 reads:
>         var curY:Number = offscreenExtraRowsTop ? rowInfo[offscreenExtraRowsTop-1].y
+ rowHeight : 0;
> and should read:
>         var curY:Number = (offscreenExtraRowsTop > 0) ? rowInfo[offscreenExtraRowsTop-1].y
+ rowHeight : 0;
> When verticalScrollPosition is set to -1 this causes the calculation (offscreenExtraRowsTop-1)
on line 1348 to come out at -2 and an exception is thrown since -2 is not a valid entry in
'rowInfo.'
> If my proposed change to line 1348 was made then the exception would not be thrown because
the calculation would not happen and the default value of 0 would be returned.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message