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

Key: SDK-15496
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: C C
Assignee: Jacob Goldstein
Reporter: Radoslaw Krzepkowski
Votes: 0
Watchers: 2
Operations

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

Canvas addChild throws error when adding child already added to it

Created: 05/08/08 05:25 AM   Updated: 02/06/09 04:35 PM
Component/s: mx: Canvas View
Security Level: Public (All JIRA Users )

File Attachments: 1. File sdk15496.mxml (0.4 kb)


Severity: Incorrectly Functioning with Workaround
Reproducibility: Every Time
Discoverability: Low
Found in Version: SDK Flex 3 (Released)
Milestone: SDK Gumbo Iteration 7
Affected OS(s): Windows - Vista
Steps to Reproduce:
Steps to reproduce:
1. Create two canvas bigger and smaller inside it.
2. Call addChild on bigger canvas with reference to smaller one as a method parameter
3. Close error alert
 
 Actual Results:
 Throws error:

 RangeError: Error #2006: The supplied index is out of bounds.
at flash.display::DisplayObjectContainer/getChildAt()
at mx.core::Container/getChildAt()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\Container.as:2332]
at mx.containers.utilityClasses::CanvasLayout/updateDisplayList()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\containers\utilityClasses\CanvasLayout.as:279]
at mx.containers::Canvas/updateDisplayList()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\containers\Canvas.as:363]
at mx.core::UIComponent/validateDisplayList()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:6214]
at mx.core::Container/validateDisplayList()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\Container.as:2675]
at mx.managers::LayoutManager/validateDisplayList()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:602]
at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:675]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8460]
at mx.core::UIComponent/callLaterDispatcher()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8403]

 Expected Results:
Should swap smaller canvas on the top of all children.
 
 Workaround (if any):
 Check if child exists and remove it before adding again.
 
 
Language Found: English
Bugbase Id: none
Triaged: Yes
Regression: No
QA Owner: Joan Lafferty
Resolved by: Corey Lucier
Participants: Corey Lucier, Jacob Goldstein, Joan Lafferty, Lauren Park, Radoslaw Krzepkowski and Shaun Etherton
Browser: Firefox 2.x

Sub-Tasks  All   Open   
 Sub-Task Progress: 

 All   Comments      Sort Order:
Shaun Etherton - [07/16/08 11:08 AM ]
I've created a patch for this bug but i still need to sign a contributor agreement, once thats sorted out i'll upload the patch.

Joan Lafferty - [08/23/08 06:42 PM ]
reproduced in the Flex 3 and latest build 2969.

Corey Lucier - [09/04/08 03:29 PM ]
Fixed in 3.0.x branch, revision 3104.

Jacob Goldstein - [02/06/09 04:34 PM ]
Created the attached bug file "sdk15496.mxml" to verify fix

Jacob Goldstein - [02/06/09 04:35 PM ]
Verified fix on:
3.3.0.4799 and 4.0.0.4875

No more error