You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by "Justin Mclean (JIRA)" <ji...@apache.org> on 2013/04/24 00:13:16 UTC
[jira] [Commented] (FLEX-23781) Error #1009 after assigning null to
mx:Image source property
[ https://issues.apache.org/jira/browse/FLEX-23781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13639703#comment-13639703 ]
Justin Mclean commented on FLEX-23781:
--------------------------------------
Confirmed still an issue in Apache Flex 4.9.1
> Error #1009 after assigning null to mx:Image source property
> ------------------------------------------------------------
>
> Key: FLEX-23781
> URL: https://issues.apache.org/jira/browse/FLEX-23781
> Project: Apache Flex
> Issue Type: Bug
> Components: mx: Image
> Affects Versions: Adobe Flex SDK 4.0 (Release)
> Environment: Affected OS(s): Mac
> Affected OS(s): Mac OS 10.6
> Browser: Safari
> Language Found: English
> Reporter: Adobe JIRA
> Assignee: Justin Mclean
> Priority: Minor
> Labels: easyfix, easytest
>
> Steps to reproduce:
> 1. Compile a debug build of attached Main.mxml
> 2. Start fdb and listen for debugging session.
> 3. Open swf in a web browser (e.g. Safari).
> 4. Click "Click me!" button.
> Actual Results:
> No errors.
>
> Expected Results:
> [RTE]
> TypeError: Error #1009: Cannot access a property or method of a null object reference.
> at mx.controls::SWFLoader/contentHolder_addedHandler()[E:\dev\4.x\frameworks\projects\framework\src\mx\controls\SWFLoader.as:2543]
> [/RTE]
> Error #1009 has occurred:
> [Fault] exception, information=TypeError: Error #1009: Cannot access a property or method of a null object reference.
> Execution halted in 'Main.swf' at 0xffffffff (-1)
> (fdb) bt
> #0 this = [Object 610014329, class='mx.controls::Image'].SWFLoader/contentHolder_addedHandler(_arg1=[Object 474409377, class='flash.events::Event']) at <null>:0
> --
> I suspect that in mx:SWFLoader.unloadContent(), contentHolder is not a Loader and the contentHolder_addedHandler listener is not removed. Hence if Event.ADDED is dispatched when contentHolder is null, the last line in contentHolder_addedHandler causes the #1009 error.
> This was working at Flex 4 Beta 1.
> Workaround:
> Since we're using embedded images in this case, we can use s:BitmapImage instead of mx:Image (which subclasses SWFLoader):
> <s:BitmapImage id="sample1" />
--
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