wweifu / as3-commons

Automatically exported from code.google.com/p/as3-commons
0 stars 0 forks source link

NPE when ByteCodeType.fromLoader is invoked in an empty Application #143

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create an empty Flex Application
2. Define applicationComplete Handler
3. In handler, execute ByteCodeType.fromLoader(this.loaderInfo)

What is the expected output? What do you see instead?
The expected would be ByteCodeType loading the classes successfully. I get an 
error instead.

TypeError: Error #1009: Cannot access a property or method of a null object 
reference.
    at org.as3commons.reflect::JSONTypeProvider/getAccessorsForType()[C:\projects\as3-commons\as3-commons-reflect\src\main\actionscript\org\as3commons\reflect\JSONTypeProvider.as:71]
    at org.as3commons.reflect::Type/get accessors()[C:\projects\as3-commons\as3-commons-reflect\src\main\actionscript\org\as3commons\reflect\Type.as:478]
    at org.as3commons.bytecode.reflect::ReflectionDeserializer/readTraitsInfo()[C:\projects\as3-commons\as3-commons-bytecode\src\main\actionscript\org\as3commons\bytecode\reflect\ReflectionDeserializer.as:408]
    at org.as3commons.bytecode.reflect::ReflectionDeserializer/readTypes()[C:\projects\as3-commons\as3-commons-bytecode\src\main\actionscript\org\as3commons\bytecode\reflect\ReflectionDeserializer.as:621]
    at org.as3commons.bytecode.reflect::ReflectionDeserializer/readABCTag()[C:\projects\as3-commons\as3-commons-bytecode\src\main\actionscript\org\as3commons\bytecode\reflect\ReflectionDeserializer.as:96]
    at org.as3commons.bytecode.reflect::ReflectionDeserializer/readTags()[C:\projects\as3-commons\as3-commons-bytecode\src\main\actionscript\org\as3commons\bytecode\reflect\ReflectionDeserializer.as:715]
    at org.as3commons.bytecode.reflect::ReflectionDeserializer/read()[C:\projects\as3-commons\as3-commons-bytecode\src\main\actionscript\org\as3commons\bytecode\reflect\ReflectionDeserializer.as:84]
    at org.as3commons.bytecode.reflect::ByteCodeTypeProvider/fromByteArray()[C:\projects\as3-commons\as3-commons-bytecode\src\main\actionscript\org\as3commons\bytecode\reflect\ByteCodeTypeProvider.as:131]
    at org.as3commons.bytecode.reflect::ByteCodeTypeProvider/fromLoader()[C:\projects\as3-commons\as3-commons-bytecode\src\main\actionscript\org\as3commons\bytecode\reflect\ByteCodeTypeProvider.as:119]
    at org.as3commons.bytecode.reflect::ByteCodeType$/fromLoader()[C:\projects\as3-commons\as3-commons-bytecode\src\main\actionscript\org\as3commons\bytecode\reflect\ByteCodeType.as:136]
    at bytecode/application1_applicationCompleteHandler()[E:\workspaces\evo-llamadas-base\bytecode-test\src\bytecode.mxml:15]
    at bytecode/___bytecode_Application1_applicationComplete()[E:\workspaces\evo-llamadas-base\bytecode-test\src\bytecode.mxml:5]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.core::UIComponent/dispatchEvent()
    at mx.managers::SystemManager/preloader_preloaderDoneHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:2682]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.preloaders::Preloader/displayClassCompleteHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\preloaders\Preloader.as:582]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.preloaders::SparkDownloadProgressBar/initCompleteHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\preloaders\SparkDownloadProgressBar.as:1087]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.preloaders::Preloader/dispatchAppEndEvent()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\preloaders\Preloader.as:380]
    at mx.preloaders::Preloader/appCreationCompleteHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\preloaders\Preloader.as:590]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.core::UIComponent/dispatchEvent()
    at mx.core::UIComponent/set initialized()
    at mx.managers::LayoutManager/doPhasedInstantiation()
    at mx.managers::LayoutManager/doPhasedInstantiationCallback()

What version of the product are you using? On what operating system?

Flex SDK: 4.5.1.A
as3commons-bytecode: 1.1.1
as3commons-lang: 0.3.7
as3commons-logging: 2.7
as3commons-reflect: 1.6.4

Original issue reported on code.google.com by ilo...@gmail.com on 14 Oct 2013 at 5:11

Attachments:

GoogleCodeExporter commented 8 years ago
Hi, have you got any workaround for this?

Original comment by sagar.ro...@gmail.com on 13 Nov 2013 at 12:07