10 Replies Latest reply on Aug 9, 2016 1:54 PM by leono18688451

    Bug? - HaloBorder TypeError #1009 (null) with border side style

    TomBurgundy Level 1

      Hello Adobe,

       

      running my application, which was developed for 3.5, with Flex SDK 4.1, using the Halo theme, and with Flex 3 compatibility turned on, I get the following error message:

       

      Main Thread (Suspended: TypeError: Error #1009: Der Zugriff auf eine Eigenschaft oder eine Methode eines null-Objektverweises ist nicht möglich.)

      mx.skins.halo::HaloBorder/get borderMetrics

      mx.core::Container/get borderMetrics

      mx.core::Container/get viewMetrics

      mx.core::Container/get viewMetricsAndPadding

      mx.containers.utilityClasses::BoxLayout/http://www.adobe.com/2006/flex/mx/internal::widthPadding

      mx.containers.utilityClasses::BoxLayout/measure

      mx.containers::Box/measure

      mx.core::UIComponent/measureSizes

      mx.core::UIComponent/validateSize

      mx.core::Container/validateSize

      mx.managers::LayoutManager/validateSize

      mx.managers::LayoutManager/doPhasedInstantiation

      mx.managers::LayoutManager/doPhasedInstantiationCallback

      I could track it down to an HBox with style "TopAndBottomShadow", which I define in my CSS file as:
      .TopAndBottomShadow {
      background-color: #cdced0;
      background-alpha: 1;
      background-image: Embed("images/bg-shadowTopAndBottom2.png", scaleGridTop="14", scaleGridBottom="16", scaleGridLeft="1", scaleGridRight="29");
      background-size: "100%";
      padding-left: 20;
      padding-right: 17;
      padding-top: 7;
      padding-bottom: 7;
      border-sides: bottom;
      border-style: solid;
      border-color: #999999;
      }
      When removing or commenting the "border-sides: bottom;" line, the error does not happen.

        • 1. Re: Bug? - HaloBorder TypeError #1009 (null) with border side style
          TomBurgundy Level 1

          Hmm... Lets try again:

           

          Hello Adobe,

           

          running my application, which was developed for 3.5, with Flex SDK 4.1, using the Halo theme, and with Flex 3 compatibility turned on, I get the following error message:

           

           

          TypeError: Error #1009: Der Zugriff auf eine Eigenschaft oder eine Methode eines null-Objektverweises ist nicht möglich.
               at mx.skins.halo::HaloBorder/get borderMetrics()[E:\dev\4.x\frameworks\projects\framework\src\mx\skins\halo\HaloBorder.as:166]
               at mx.core::Container/get borderMetrics()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\Container.as:1031]
               at mx.core::Container/get viewMetrics()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\Container.as:2270]
               at mx.core::Container/get viewMetricsAndPadding()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\Container.as:2365]
               at mx.containers.utilityClasses::BoxLayout/http://www.adobe.com/2006/flex/mx/internal::widthPadding()[E:\dev\4.x\frameworks\projects\framework\src\mx\containers\utilityClasses\BoxLayout.as:346]
               at mx.containers.utilityClasses::BoxLayout/measure()[E:\dev\4.x\frameworks\projects\framework\src\mx\containers\utilityClasses\BoxLayout.as:134]
               at mx.containers::Box/measure()[E:\dev\4.x\frameworks\projects\framework\src\mx\containers\Box.as:314]
               at mx.core::UIComponent/measureSizes()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8216]
               at mx.core::UIComponent/validateSize()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8140]
               at mx.core::Container/validateSize()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\Container.as:3278]
               at mx.managers::LayoutManager/validateSize()[E:\dev\4.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:617]
               at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:733]
               at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:1072]
           
          
          I could track it down to an HBox with style "TopAndBottomShadow", which I define in my CSS file as:
          .TopAndBottomShadow {
               background-color: #cdced0;
               background-alpha: 1;
               background-image: Embed("images/bg-shadowTopAndBottom2.png", scaleGridTop="14", scaleGridBottom="16", scaleGridLeft="1", scaleGridRight="29");
               background-size: "100%";
               padding-left: 20;
               padding-right: 17;
               padding-top: 7;
               padding-bottom: 7;
               border-sides: bottom; 
               border-style: solid;
               border-color: #999999;
          }
          

          • 2. Re: Bug? - HaloBorder TypeError #1009 (null) with border side style
            TomBurgundy Level 1

            When removing or commenting the "border-sides: bottom;" line, the error does not happen.

            • 4. Re: Bug? - HaloBorder TypeError #1009 (null) with border side style
              newton15

              Hello,

               

              Have you find how to resolve the problem? Because I've got the exact same thing and have no clue how to resolve it!!

               

               

              TypeError: Error #1009: Cannot access a property or method of a null object reference.
                  at mx.skins.halo::HaloBorder/get borderMetrics()[E:\dev\4.x\frameworks\projects\framework\src\mx\skins\halo\HaloBorder.as: 166]
                  at mx.core::Container/get borderMetrics()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\Container.as:1031]
                  at mx.core::Container/get viewMetrics()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\Container.as:2270]
                  at mx.core::Container/get viewMetricsAndPadding()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\Container.as :2365]
                  at mx.containers.utilityClasses::BoxLayout/updateDisplayList()[E:\dev\4.x\frameworks\project s\framework\src\mx\containers\utilityClasses\BoxLayout.as:157]
                  at mx.containers::Box/updateDisplayList()[E:\dev\4.x\frameworks\projects\framework\src\mx\co ntainers\Box.as:413]
                  at mx.containers::ControlBar/updateDisplayList()[E:\dev\4.x\frameworks\projects\framework\sr c\mx\containers\ControlBar.as:267]
                  at mx.core::UIComponent/validateDisplayList()[E:\dev\4.x\frameworks\projects\framework\src\m x\core\UIComponent.as:8709]
                  at mx.core::Container/validateDisplayList()[E:\dev\4.x\frameworks\projects\framework\src\mx\ core\Container.as:3296]
                  at mx.managers::LayoutManager/validateDisplayList()[E:\dev\4.x\frameworks\projects\framework \src\mx\managers\LayoutManager.as:663]
                  at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.x\frameworks\projects\framewo rk\src\mx\managers\LayoutManager.as:718]
                  at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.x\frameworks\projects \framework\src\mx\managers\LayoutManager.as:1072]

              • 5. Re: Bug? - HaloBorder TypeError #1009 (null) with border side style
                Darrell Loverin Level 4

                Would you provide a small application so I can see what the issue is?

                • 6. Re: Bug? - HaloBorder TypeError #1009 (null) with border side style
                  Chris Harlow

                  It can't be that hard to fix...

                   

                  HaloBorder.as  line 162 does this:

                   

                  var borderSides:String = getStyle("borderSides");

                   

                  if (borderSides != "left top right bottom")

                   

                  but the style is returned as null...

                   

                  a) the code should handle null gracefully.

                  b) is there anything I c an do to work around it in my css or similar?

                   

                  • 7. Re: Bug? - HaloBorder TypeError #1009 (null) with border side style
                    scretti1

                    We have recently ran into the same problem using Flex 4 with 3.0.0 compatibility compiler flag and found a work-around.  Quote the value of the border-sides property :

                     

                    border-sides: "bottom";

                    or

                    borderSides: "bottom";

                     

                    Also note that we found that it did not like commas in the quoted version.  So, if you need borders on multiple sides it would look like :

                     

                    border-sides: "left top right bottom";

                    or

                    borderSides: "left top right bottom";

                    • 8. Re: Bug? - HaloBorder TypeError #1009 (null) with border side style
                      Peter deHaan Level 4

                      Can you please file a new bug at http://bugs.adobe.com/flex/ and attach a simple test case and somebody from Adobe can take a look.

                       

                      Thanks,

                      Peter

                      • 9. Re: Bug? - HaloBorder TypeError #1009 (null) with border side style
                        scretti1 Level 1

                        Peter,

                        Thanks for your quick reply.  I have created a simple application to show the error and have created the following bug :

                         

                        https://bugs.adobe.com/jira/browse/SDK-28728

                         

                        We are at the tail end of an exhaustive conversion to Flex 4 and have finally been forced to use the 3.0 compatibility mode of the compiler for performance reasons.  During that switch, this issue was found.  Please let me know if there is anything further I can provide to help. 

                         

                        Thanks,

                        ..Shawn Cretti

                        • 10. Re: Bug? - HaloBorder TypeError #1009 (null) with border side style
                          leono18688451

                          Estou tendo o mesmo problema, e no meu arquivo css nao tem nenhumn atributo "border-border-sides:", alguem pode ajudar ?

                          OBS: Estou usando sdk 4.5

                           

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

                            at mx.skins.halo::HaloBorder/http://www.adobe.com/2006/flex/mx/internal::drawBorder()[E:\dev\4.y\frameworks\projects\mx \src\mx\skins\halo\HaloBorder.as:464]

                            at mx.skins.halo::HaloBorder/updateDisplayList()[E:\dev\4.y\frameworks\projects\mx\src\mx\sk ins\halo\HaloBorder.as:239]

                            at mx.skins::ProgrammaticSkin/validateDisplayList()[E:\dev\4.y\frameworks\projects\framework \src\mx\skins\ProgrammaticSkin.as:503]

                            at mx.managers::LayoutManager/validateDisplayList()[E:\dev\4.y\frameworks\projects\framework \src\mx\managers\LayoutManager.as:736]

                            at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.y\frameworks\projects\framewo rk\src\mx\managers\LayoutManager.as:801]

                            at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.y\frameworks\projects \framework\src\mx\managers\LayoutManager.as:1180]