You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by OmPrakash Muppirala <bi...@gmail.com> on 2014/01/08 01:46:51 UTC
Mustella broken - Re: git commit: [flex-sdk] [refs/heads/develop] -
FLEX-33836 lazy loading of resource files give performance improvement (esp mobile)
Justin,
It looks like Mustella tests are broken as a result of this change. Here
is the RTE. Can you please take a look at it?
This is the current state of the Mustella run[1] Note that Mustella is
stuck on this test.
Thanks,
Om
[1] http://flex-mustella.cloudapp.net/job/flex-sdk_mustella/640/console
TypeError: Error #1009: Cannot access a property or method of a null
object reference.
at mx.resources::
ResourceManagerImpl/findResourceBundleWithResource()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\framework\src\mx\resources\ResourceManagerImpl.as:882]
at
mx.resources::ResourceManagerImpl/findBundle()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\framework\src\mx\resources\ResourceManagerImpl.as:1094]
at
mx.resources::ResourceManagerImpl/getStringArray()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\framework\src\mx\resources\ResourceManagerImpl.as:952]
at mx.controls::DateField/set dayNames()
at mx.controls::DateField/resourcesChanged()
at
mx.core::UIComponent()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\framework\src\mx\core\UIComponent.as:1722]
at mx.controls::ComboBase()
at mx.controls::DateField()
at mx.core::Container/createComponentFromDescriptor()
at mx.core::Container/createComponentsFromDescriptors()
On Sat, Dec 28, 2013 at 10:38 PM, <jm...@apache.org> wrote:
> Updated Branches:
> refs/heads/develop b0e208c92 -> edd6e20f5
>
>
> FLEX-33836 lazy loading of resource files give performance improvement
> (esp mobile)
>
>
> Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
> Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/edd6e20f
> Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/edd6e20f
> Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/edd6e20f
>
> Branch: refs/heads/develop
> Commit: edd6e20f5b04e41c054877f5798141119c02afc1
> Parents: b0e208c
> Author: Justin Mclean <jm...@apache.org>
> Authored: Sun Dec 29 17:38:04 2013 +1100
> Committer: Justin Mclean <jm...@apache.org>
> Committed: Sun Dec 29 17:38:04 2013 +1100
>
> ----------------------------------------------------------------------
> .../src/mx/resources/ResourceManagerImpl.as | 74 ++++++++++++++++++--
> 1 file changed, 70 insertions(+), 4 deletions(-)
> ----------------------------------------------------------------------
>
>
>
> http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/edd6e20f/frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as
> ----------------------------------------------------------------------
> diff --git
> a/frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as
> b/frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as
> index 9c21ca8..07c6d95 100644
> --- a/frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as
> +++ b/frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as
> @@ -414,16 +414,20 @@ public class ResourceManagerImpl extends
> EventDispatcher implements IResourceMan
> "' for locale '" + locale + "'.");
> }
>
> - // Create an instance of the bundle class.
> - resourceBundle = ResourceBundle(new bundleClass());
> + // Create a proxy
> + var proxy:ResourceBundleProxy = new ResourceBundleProxy();
> +
> + proxy.bundleClass = bundleClass;
> + proxy.useWeakReference = useWeakReference;
>
> // In case we just created a ResourceBundle from a Flex 2 SWC,
> // set its locale and bundleName, because the old constructor
> // didn't used to do this.
> - ResourceBundle(resourceBundle)._locale = locale;
> - ResourceBundle(resourceBundle)._bundleName = bundleName;
> + proxy.locale = locale;
> + proxy.bundleName = bundleName;
>
> // Add that resource bundle instance to the ResourceManager.
> + resourceBundle = proxy;
> addResourceBundle(resourceBundle, useWeakReference);
>
> return resourceBundle;
> @@ -707,6 +711,10 @@ public class ResourceManagerImpl extends
> EventDispatcher implements IResourceMan
> }
> }
> }
> + else if (bundleObject is ResourceBundleProxy)
> + {
> + bundle =
> loadResourceBundleProxy(ResourceBundleProxy(bundleObject));
> + }
> else
> {
> bundle = bundleObject as IResourceBundle;
> @@ -715,6 +723,17 @@ public class ResourceManagerImpl extends
> EventDispatcher implements IResourceMan
> return bundle;
> }
>
> + private function
> loadResourceBundleProxy(proxy:ResourceBundleProxy):ResourceBundle {
> + var proxyClass:Class = proxy.bundleClass;
> + var resourceBundle:ResourceBundle = ResourceBundle(new
> proxyClass());
> + resourceBundle._locale = proxy.locale;
> + resourceBundle._bundleName = proxy.bundleName;
> +
> + addResourceBundle(resourceBundle, proxy.useWeakReference);
> +
> + return resourceBundle;
> + }
> +
> /**
> * @copy mx.resources.IResourceManager#removeResourceBundle()
> *
> @@ -851,6 +870,10 @@ public class ResourceManagerImpl extends
> EventDispatcher implements IResourceMan
> }
> }
> }
> + else if (bundleObject is ResourceBundleProxy)
> + {
> + bundle =
> loadResourceBundleProxy(ResourceBundleProxy(bundleObject));
> + }
> else
> {
> bundle = bundleObject as IResourceBundle;
> @@ -1161,6 +1184,7 @@ import flash.events.EventDispatcher;
> import mx.events.ModuleEvent;
> import mx.events.ResourceEvent;
> import mx.modules.IModuleInfo;
> +import mx.resources.IResourceBundle;
> import mx.resources.IResourceModule;
>
>
> ////////////////////////////////////////////////////////////////////////////////
> @@ -1322,3 +1346,45 @@ class ResourceEventDispatcher extends
> EventDispatcher
> dispatchEvent(resourceEvent);
> }
> }
> +
>
> +////////////////////////////////////////////////////////////////////////////////
> +//
> +// Helper class: ResourceBundleProxy
> +//
>
> +////////////////////////////////////////////////////////////////////////////////
> +
> +/**
> + * @private
> + */
> +class ResourceBundleProxy implements IResourceBundle
> +{
> + public var bundleClass:Class;
> + public var useWeakReference:Boolean;
> +
> + private var _bundleName:String;
> + private var _locale:String;
> +
> + public function ResourceBundleProxy()
> + {
> + }
> +
> + public function get bundleName():String {
> + return _bundleName;
> + }
> +
> + public function set bundleName(value:String):void {
> + _bundleName = value;
> + }
> +
> + public function get content():Object {
> + return null;
> + }
> +
> + public function get locale():String {
> + return _locale;
> + }
> +
> + public function set locale(value:String):void {
> + _locale = value;
> + }
> +}
>
>
Re: Mustella broken - Re: git commit: [flex-sdk]
[refs/heads/develop] - FLEX-33836 lazy loading of resource files give
performance improvement (esp mobile)
Posted by Alex Harui <ah...@adobe.com>.
The fix for the RTE wasn't correct. I just pushed a fix. Are you having
trouble getting the debugger on these tests?
I only tested against the CurrencyValidator. It passes all 60 tests on
that one SWF. Hopefully it will fix everything else, but I did notice
that similar logic appears in ResourceManagerImpl around line 709 and may
need fixing there as well.
-Alex
On 1/12/14 12:52 AM, "Justin Mclean" <ju...@classsoftware.com> wrote:
>Hi,
>
>Just checked in a fix that fixes the RTE, however it causes a few tests
>to fail. Currently no idea why and the formatted value looks correct (eg
> "USD12,345.98-" for CV_validate_default_valid_3).
>
>Looking at the code for CV_validate_default_valid_3 it seems a bit odd ie
>sets the application to "en-US" and set the module locale to "en-US" but
>test description says it's checking application style cascades so I would
>of expected it not to set the module locale
>
>I'd appreciate some help with this.
>
>Thanks,
>Justin
Re: Mustella broken - Re: git commit: [flex-sdk] [refs/heads/develop] - FLEX-33836 lazy loading of resource files give performance improvement (esp mobile)
Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,
Just checked in a fix that fixes the RTE, however it causes a few tests to fail. Currently no idea why and the formatted value looks correct (eg "USD12,345.98-" for CV_validate_default_valid_3).
Looking at the code for CV_validate_default_valid_3 it seems a bit odd ie sets the application to "en-US" and set the module locale to "en-US" but test description says it's checking application style cascades so I would of expected it not to set the module locale
I'd appreciate some help with this.
Thanks,
Justin
Re: Mustella broken - Re: git commit: [flex-sdk] [refs/heads/develop]
- FLEX-33836 lazy loading of resource files give performance improvement (esp mobile)
Posted by Erik de Bruin <er...@ixsoftware.nl>.
Mustella just ran in to this same RTE again, so we can pretty much
rule out coincidence, I think.
Can someone please look at this?
Here is the trace in full:
TypeError: Error #1009: Cannot access a property or method of a null
object reference.
at mx.resources::ResourceManagerImpl/findResourceBundleWithResource()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\framework\src\mx\resources\ResourceManagerImpl.as:882]
at mx.resources::ResourceManagerImpl/findBundle()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\framework\src\mx\resources\ResourceManagerImpl.as:1094]
at mx.resources::ResourceManagerImpl/getStringArray()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\framework\src\mx\resources\ResourceManagerImpl.as:952]
at mx.controls::DateField/set dayNames()
at mx.controls::DateField/resourcesChanged()
at mx.core::UIComponent()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\framework\src\mx\core\UIComponent.as:1722]
at mx.controls::ComboBase()
at mx.controls::DateField()
at mx.core::Container/createComponentFromDescriptor()
at mx.core::Container/createComponentsFromDescriptors()
at mx.core::Container/createChildren()
at mx.containers::FormItem/createChildren()
at mx.core::UIComponent/initialize()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\framework\src\mx\core\UIComponent.as:7695]
at mx.core::Container/initialize()
at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\framework\src\mx\core\UIComponent.as:7556]
at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()
at mx.core::Container/addChildAt()
at mx.containers::Form/addChildAt()
at mx.core::Container/addChild()
at mx.containers::Form/addChild()
at mx.core::Container/createComponentFromDescriptor()
at mx.core::Container/createComponentsFromDescriptors()
at mx.core::Container/createChildren()
at mx.core::UIComponent/initialize()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\framework\src\mx\core\UIComponent.as:7695]
at mx.core::Container/initialize()
at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\framework\src\mx\core\UIComponent.as:7556]
at mx.core::UIComponent/addChildAt()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\framework\src\mx\core\UIComponent.as:7260]
at spark.components::Group/addDisplayObjectToDisplayList()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\spark\src\spark\components\Group.as:2116]
at spark.components::Group/http://www.adobe.com/2006/flex/mx/internal::elementAdded()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\spark\src\spark\components\Group.as:1707]
at spark.components::Group/setMXMLContent()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\spark\src\spark\components\Group.as:653]
at spark.components::Group/set
mxmlContent()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\spark\src\spark\components\Group.as:593]
at spark.components::SkinnableContainer/set
mxmlContent()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\spark\src\spark\components\SkinnableContainer.as:665]
at spark.components::SkinnableContainer/createDeferredContent()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\spark\src\spark\components\SkinnableContainer.as:1092]
at spark.components::SkinnableContainer/createContentIfNeeded()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\spark\src\spark\components\SkinnableContainer.as:1120]
at spark.components::SkinnableContainer/createChildren()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\spark\src\spark\components\SkinnableContainer.as:915]
at mx.core::UIComponent/initialize()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\framework\src\mx\core\UIComponent.as:7695]
at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\framework\src\mx\core\UIComponent.as:7556]
at mx.core::UIComponent/addChildAt()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\framework\src\mx\core\UIComponent.as:7260]
at spark.components::Group/addDisplayObjectToDisplayList()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\spark\src\spark\components\Group.as:2116]
at spark.components::Group/http://www.adobe.com/2006/flex/mx/internal::elementAdded()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\spark\src\spark\components\Group.as:1707]
at spark.components::Group/setMXMLContent()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\spark\src\spark\components\Group.as:653]
at spark.components::Group/set
mxmlContent()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\spark\src\spark\components\Group.as:593]
at spark.components::SkinnableContainer/set
mxmlContent()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\spark\src\spark\components\SkinnableContainer.as:665]
at spark.components::SkinnableContainer/createDeferredContent()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\spark\src\spark\components\SkinnableContainer.as:1092]
at spark.components::SkinnableContainer/createContentIfNeeded()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\spark\src\spark\components\SkinnableContainer.as:1120]
at spark.components::SkinnableContainer/createChildren()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\spark\src\spark\components\SkinnableContainer.as:915]
at mx.core::UIComponent/initialize()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\framework\src\mx\core\UIComponent.as:7695]
at MixedLayoutModuleComp/initialize()
at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\framework\src\mx\core\UIComponent.as:7556]
at mx.core::UIComponent/addChildAt()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\framework\src\mx\core\UIComponent.as:7260]
at spark.components::Group/addDisplayObjectToDisplayList()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\spark\src\spark\components\Group.as:2116]
at spark.components::Group/http://www.adobe.com/2006/flex/mx/internal::elementAdded()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\spark\src\spark\components\Group.as:1707]
at spark.components::Group/addElementAt()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\spark\src\spark\components\Group.as:1466]
at spark.components::Group/addElement()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\spark\src\spark\components\Group.as:1424]
at spark.modules::ModuleLoader/moduleReadyHandler()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\spark\src\spark\modules\ModuleLoader.as:778]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at ModuleInfoProxy/moduleEventHandler()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\framework\src\mx\modules\ModuleManager.as:1157]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at ModuleInfo/readyHandler()[C:\jenkins_slave\workspace\flex-sdk_mustella\frameworks\projects\framework\src\mx\modules\ModuleManager.as:801]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::FlexModuleFactory/update()
Thanks,
EdB
On Wed, Jan 8, 2014 at 2:08 AM, Justin Mclean <ju...@classsoftware.com> wrote:
> Hi,
>
>> It looks like Mustella tests are broken as a result of this change. Here
>> is the RTE. Can you please take a look at it?
> Can do, I'm on a plane/traveling all day but will get to it in the next couple of days.
>
> Thanks,
> Justin
--
Ix Multimedia Software
Jan Luykenstraat 27
3521 VB Utrecht
T. 06-51952295
I. www.ixsoftware.nl
Re: Mustella broken - Re: git commit: [flex-sdk] [refs/heads/develop] - FLEX-33836 lazy loading of resource files give performance improvement (esp mobile)
Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,
> It looks like Mustella tests are broken as a result of this change. Here
> is the RTE. Can you please take a look at it?
Can do, I'm on a plane/traveling all day but will get to it in the next couple of days.
Thanks,
Justin