17 Replies Latest reply on Nov 25, 2008 12:33 PM by 2JZ

    Error: ModuleManager.as:671

    2JZ Level 1
      I have encountered this weird error when loading a module.

      TypeError: Error #1009: Cannot access a property or method of a null object reference.
      at ModuleInfo/completeHandler()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\modules\Mo duleManager.as:671]

      I really have no clue because I've been loadint this module like others.
        • 1. Re: Error: ModuleManager.as:671
          *gsb* Level 1
          Try running clean on the project and then rebuild it and test.

          • 2. Re: Error: ModuleManager.as:671
            Level 7

            "2JZ" <webforumsuser@macromedia.com> wrote in message
            news:gfv61u$p1$1@forums.macromedia.com...
            >I have encountered this weird error when loading a module.
            >
            > TypeError: Error #1009: Cannot access a property or method of a null
            > object
            > reference.
            > at
            > ModuleInfo/completeHandler()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\m
            > odules\ModuleManager.as:671]
            >
            > I really have no clue because I've been loadint this module like others.

            You may find that Q8 is useful
            http://www.magnoliamultimedia.com/flex_examples/Amys_Flex_FAQ.pdf


            • 3. Re: Error: ModuleManager.as:671
              2JZ Level 1
              I just found something.
              http://bugs.adobe.com/jira/browse/FB-13014

              My code is actually have a loop to load the same module in multiple times. Is this really a bug? I can't find anything else beside the link above. :(
              • 4. Re: Error: ModuleManager.as:671
                2JZ Level 1
                It seems that I can load the same module twice in the loop. It gives me the error below when it tries to load more than twice of the same modules.

                TypeError: Error #1009: Cannot access a property or method of a null object reference.
                at ModuleInfo/completeHandler()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\modules\Mo duleManager.as:671]
                • 5. Re: Error: ModuleManager.as:671
                  *gsb* Level 1

                  Did you try the workaround he put at the bottom of that post?

                  • 6. Re: Error: ModuleManager.as:671
                    2JZ Level 1
                    Yes! I did put the definitation on the application. But, I ran out of luck. :(
                    • 7. Re: Error: ModuleManager.as:671
                      2JZ Level 1
                      Does anyone knows if this really is a bug?

                      http://bugs.adobe.com/jira/browse/FB-13014
                      • 8. Re: Error: ModuleManager.as:671
                        josh1093
                        I am getting the same error loading modules. For me I found that changing the layout properties of the container that I am loading the module in made the problem appear and go away. I'm loading a module as an itemrenderer in a TileList. If I set the columnWidth and rowHeight properties of the list then I have problems. If I don't set them both, then I get the "ModuleManager.as:671" null pointer problem. I'm guessing that by setting the size ahead of time for the itemRenderer flex doesn't need to query the module until later which gives it time to load. Seems like a race condition to me. This is yet another bug in flex.
                        • 9. Re: Error: ModuleManager.as:671
                          josh1093 Level 1
                          I am getting the same error loading modules. For me I found that changing the layout properties of the container that I am loading the module in made the problem appear and go away. I'm loading a module as an itemrenderer in a TileList. If I set the columnWidth and rowHeight properties of the list then I have problems. If I don't set them both, then I get the "ModuleManager.as:671" null pointer problem. I'm guessing that by setting the size ahead of time for the itemRenderer flex doesn't need to query the module until later which gives it time to load. Seems like a race condition to me. This is yet another bug in flex.
                          • 10. Re: Error: ModuleManager.as:671
                            Level 7

                            "josh1093" <webforumsuser@macromedia.com> wrote in message
                            news:gg71q9$hjj$1@forums.macromedia.com...
                            >I am getting the same error loading modules. For me I found that changing
                            >the
                            > layout properties of the container that I am loading the module in made
                            > the
                            > problem appear and go away. I'm loading a module as an itemrenderer in a
                            > TileList. If I set the columnWidth and rowHeight properties of the list
                            > then I
                            > have problems. If I don't set them both, then I get the
                            > "ModuleManager.as:671"
                            > null pointer problem. I'm guessing that by setting the size ahead of
                            > time for
                            > the itemRenderer flex doesn't need to query the module until later which
                            > gives
                            > it time to load. Seems like a race condition to me. This is yet another
                            > bug
                            > in flex.

                            Where in the invalidation process are you setting them?


                            • 11. Re: Error: ModuleManager.as:671
                              2JZ Level 1
                              quote:

                              Originally posted by: josh1093
                              I am getting the same error loading modules. For me I found that changing the layout properties of the container that I am loading the module in made the problem appear and go away. I'm loading a module as an itemrenderer in a TileList. If I set the columnWidth and rowHeight properties of the list then I have problems. If I don't set them both, then I get the "ModuleManager.as:671" null pointer problem. I'm guessing that by setting the size ahead of time for the itemRenderer flex doesn't need to query the module until later which gives it time to load. Seems like a race condition to me. This is yet another bug in flex.


                              My application populates a number of VBox ( the number of boxes are based on the xml data). Each VBox loads the module with different data set. The module only contain advancedatagrid. The VBox's size are preset with percentwidth and percentheight prior calling a module loader. I also tried to specified the size in pixels. But, no luck.


                              Once a while, I got the below messages at the console window running in debug mode. Is the unload swf message normal? I have no intention to unload the module in my code. If the module shouldn't be unload, then obviously there is a problem.

                              [SWF] /SARA/CellDashboard.swf - 1,564,059 bytes after decompression
                              [SWF] /SARA/modules/TrendChart.swf - 1,576,416 bytes after decompression
                              [SWF] /SARA/modules/StdDataGrid.swf - 1,043,055 bytes after decompression
                              [SWF] /SARA/modules/StdDataGrid.swf - 1,043,055 bytes after decompression
                              [SWF] /SARA/modules/AdvDataGrid.swf - 1,259,638 bytes after decompression
                              [SWF] /SARA/modules/AdvDataGrid.swf - 1,259,638 bytes after decompression
                              [Unload SWF] /SARA/modules/AdvDataGrid.swf
                              • 12. Re: Error: ModuleManager.as:671
                                2JZ Level 1
                                I really need help. Does anyone knows where I can download the ModuleManager.as file? I want to find out what happens on that line.
                                • 13. Re: Error: ModuleManager.as:671
                                  2JZ Level 1
                                  This is what I have in my app.

                                  podContent:VBoxExtend = null;
                                  for each( var PodNode:XML in podXMLList )
                                  {
                                  :
                                  :
                                  :
                                  if (ItemNode.name().toString() == "grid")
                                  {
                                  podContent = new GridContent();
                                  }
                                  else if (ItemNode.name().toString() == "advdatagrid")
                                  {
                                  podContent = new ADGridContent();
                                  }

                                  podContent is extended from VBox. GridContent & ADGridContent are components (with different layouts).
                                  Inside these components, they have the similar for loop above to load a grid module based on the supplied xml data.
                                  GridContent loads a number of standard grid modules and ADGridContent loads a number of advanced grid modules.

                                  I modify the supplied data and the code so that:

                                  podContent1:VBoxExtend = new GridContent();
                                  podContent2:VBoxExtend = new ADGridContent();
                                  podContent3:VBoxExtend = new GridContent();
                                  podContent4:VBoxExtend = new ADGridContent();

                                  Just a bunch of hardcoding for debugging purpose. Supprisingly, the error is gone.

                                  It seems like there is a problem referencing multiple modules with a single variable? Can anyone points me to the right direction?
                                  • 14. Re: Error: ModuleManager.as:671
                                    Level 7

                                    "2JZ" <webforumsuser@macromedia.com> wrote in message
                                    news:ggfpps$m0k$1@forums.macromedia.com...
                                    > This is what I have in my app.
                                    >
                                    > podContent:VBoxExtend = null;
                                    > for each( var PodNode:XML in podXMLList )
                                    > {
                                    > :
                                    > :
                                    > :
                                    > if (ItemNode.name().toString() == "grid")
                                    > {
                                    > podContent = new GridContent();
                                    > }
                                    > else if (ItemNode.name().toString() == "advdatagrid")
                                    > {
                                    > podContent = new ADGridContent();
                                    > }
                                    >
                                    > podContent is extended from VBox. GridContent & ADGridContent are
                                    > components
                                    > (with different layouts).
                                    > Inside these components, they have the similar for loop above to load a
                                    > grid
                                    > module based on the supplied xml data.
                                    > GridContent loads a number of standard grid modules and ADGridContent
                                    > loads a
                                    > number of advanced grid modules.
                                    >
                                    > I modify the supplied data and the code so that:
                                    >
                                    > podContent1:VBoxExtend = new GridContent();
                                    > podContent2:VBoxExtend = new ADGridContent();
                                    > podContent3:VBoxExtend = new GridContent();
                                    > podContent4:VBoxExtend = new ADGridContent();
                                    >
                                    > Just a bunch of hardcoding for debugging purpose. Supprisingly, the error
                                    > is
                                    > gone.
                                    >
                                    > It seems like there is a problem referencing multiple modules with a
                                    > single
                                    > variable? Can anyone points me to the right direction?

                                    See my earlier response.


                                    • 15. Re: Error: ModuleManager.as:671
                                      2JZ Level 1
                                      Can you be more specific? If that's the problem, what's the solution? I really don't know the answer after reading the ppt and the links. Can you briefly explain about the solution? I've already created the module variable in my app. Didn't that suppose to solve the problem?
                                      • 16. Re: Error: ModuleManager.as:671
                                        Level 7

                                        "2JZ" <webforumsuser@macromedia.com> wrote in message
                                        news:ggg58o$5j5$1@forums.macromedia.com...
                                        > Can you be more specific? If that's the problem, what's the solution? I
                                        > really
                                        > don't know the answer after reading the ppt and the links. Can you briefly
                                        > explain about the solution? I've already created the module variable in my
                                        > app.
                                        > Didn't that suppose to solve the problem?

                                        Without seeing your code, it's difficult to say. You may want to try
                                        posting this question on the flexcoders list, being sure to mention that
                                        you've read all this stuff and what you've tried. There are people over
                                        there who wrote the Module code who can give you better specifics on what's
                                        going on.


                                        • 17. Re: Error: ModuleManager.as:671
                                          2JZ Level 1
                                          Are you actually referingto the flexcoders@yahoogroups?