0 Replies Latest reply on Oct 12, 2011 4:11 AM by lizsterine

    iOS Debug error when embedding non-CFF fonts

    lizsterine Level 1

      We have a project where we are embedding fonts for some button skins as per Jason's blog (http://blogs.adobe.com/jasonsj/2011/08/embedding-fonts-in-flex-mobile-projects.html) - our skin uses StyleableTextFields for the label.

       

      When we debug on the iPad we get an error that seems to be occurring when one of the buttons with the embedded font skin is being initialized.  (Debugger stops on UIComponent.as line 7485)

       

      This is the output:

       

      TypeError: Error #1009: Cannot access a property or method of a null object reference.

          at _HOYSiPad_mx_managers_SystemManager/callInContext()[_HOYSiPad_mx_managers_SystemManager.a s:37]

          at mx.core::EmbeddedFontRegistry/getAssociatedModuleFactory()[E:\dev\4.5.1\frameworks\projec ts\framework\src\mx\core\EmbeddedFontRegistry.as:469]

          at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::getFontContext()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:12682]

          at mx.core::UIComponent/createInFontContext()[E:\dev\4.5.1\frameworks\projects\framework\src \mx\core\UIComponent.as:12740]

          at spark.skins.mobile.supportClasses::ButtonSkinBase/createChildren()[E:\dev\4.5.1\framework s\projects\mobiletheme\src\spark\skins\mobile\supportClasses\ButtonSkinBase.as:223]

          at spark.skins.mobile::ButtonSkin/createChildren()[E:\dev\4.5.1\frameworks\projects\mobileth eme\src\spark\skins\mobile\ButtonSkin.as:239]

          at net.hoys.display.skins.buttons::SecondaryButtonSkin_mobile/createChildren()[T:\Homework\S erver\HOYS Frontend Repository\HOYS-iPad\src\net\hoys\display\skins\buttons\SecondaryButtonSkin_mobile.as:100 ]

          at mx.core::UIComponent/initialize()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\ UIComponent.as:7624]

          at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:7485]

          at mx.core::UIComponent/addChild()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UI Component.as:7166]

          at spark.components.supportClasses::SkinnableComponent/attachSkin()[E:\dev\4.5.1\frameworks\ projects\spark\src\spark\components\supportClasses\SkinnableComponent.as:692]

          at spark.components.supportClasses::SkinnableComponent/validateSkinChange()[E:\dev\4.5.1\fra meworks\projects\spark\src\spark\components\supportClasses\SkinnableComponent.as:443]

          at spark.components.supportClasses::SkinnableComponent/createChildren()[E:\dev\4.5.1\framewo rks\projects\spark\src\spark\components\supportClasses\SkinnableComponent.as:406]

          at mx.core::UIComponent/initialize()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\ UIComponent.as:7624]

          at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent.as:7485]

          at mx.core::UIComponent/addChildAt()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\ UIComponent.as:7189]

          at spark.components::Group/addDisplayObjectToDisplayList()[E:\dev\4.5.1\frameworks\projects\ spark\src\spark\components\Group.as:2037]

          at spark.components::Group/http://www.adobe.com/2006/flex/mx/internal::elementAdded()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\Group.as:1628]

          at spark.components::Group/setMXMLContent()[E:\dev\4.5.1\frameworks\projects\spark\src\spark \components\Group.as:633]

          at spark.components::Group/set mxmlContent()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\Group.as:573]

          at spark.components::SkinnableContainer/set mxmlContent()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\SkinnableContai ner.as:657]

          at spark.components::SkinnableContainer/set mxmlContent()

          at spark.components::SkinnableContainer/createDeferredContent()[E:\dev\4.5.1\frameworks\proj ects\spark\src\spark\components\SkinnableContainer.as:1050]

          at spark.components::SkinnableContainer/createContentIfNeeded()[E:\dev\4.5.1\frameworks\proj ects\spark\src\spark\components\SkinnableContainer.as:1078]

          at spark.components::SkinnableContainer/createChildren()[E:\dev\4.5.1\frameworks\projects\sp ark\src\spark\components\SkinnableContainer.as:885]

          at spark.components::Application/createChildren()[E:\dev\4.5.1\frameworks\projects\spark\src \spark\components\Application.as:1480]

          at mx.core::UIComponent/initialize()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\ UIComponent.as:7624]

          at spark.components::Application/initialize()[E:\dev\4.5.1\frameworks\projects\spark\src\spa rk\components\Application.as:1334]

          at HOYSiPad/initialize()

          at mx.managers.systemClasses::ChildManager/childAdded()[E:\dev\4.5.1\frameworks\projects\fra mework\src\mx\managers\systemClasses\ChildManager.as:189]

          at mx.managers.systemClasses::ChildManager/initializeTopLevelWindow()[E:\dev\4.5.1\framework s\projects\framework\src\mx\managers\systemClasses\ChildManager.as:359]

          at mx.managers::SystemManager/initializeTopLevelWindow()[E:\dev\4.5.1\frameworks\projects\fr amework\src\mx\managers\SystemManager.as:3063]

          at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::kickOff()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:2849]

          at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::preloader_completeHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:2729]

          at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::preloader_completeHandler()

          at flash.events::EventDispatcher/dispatchEvent()

          at mx.preloaders::Preloader/timerHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx \preloaders\Preloader.as:542]

          at mx.preloaders::Preloader/timerHandler()

          at flash.utils::Timer/tick()

          at flash.utils::Timer/tick()

       

       

      We then reverted the button skins  back to one that we use for a web app the debugging runs fine - the web skin uses a embedded font where CFF is set to true.

       

      Is this possibly a bug with the SDK, debugging or something we aren't quite setting correctly?

      Any infomation or direction would be greatly appreciated.

       

      - Liz