2 Replies Latest reply on Mar 13, 2007 11:24 AM by Brandon Ellis

    TabNavigator + Module bug

    jpwrunyan Level 1
      Now that I converted my application to use modules, I get a 1009 error "reference to null object" whenever I try to use a TabNavigator (first line of debugger: mx.managers::HistoryManager$/unregister [no source]). This problem is inconsistent. It happens when I load a module with a component using TabNavigator and only when it is the 3rd or so module to be loaded (in sequence).
      Changing the TabNavigator to a ViewStack resolves the problem. However, it is an unhappy work-around.

      I expect no errors from simply implementing a TabNavigator. If I click through the errors, the component actually seems to display properly inside the module. However, it is unstable and locks up on occasion. Furthermore, I cannot bypass this error with a try catch as the debugger won't point to a specific line in my code.

      Has anyone seen this bug?
        • 1. Re: TabNavigator + Module bug
          jpwrunyan Level 1
          Well, I sort of fixed this. I put a null reference to TabNavigator in my shell application and so now the TabNavigator is existant in the shell library instead of each module library. For some reason this fixed my problem.

          However, now I get a memory leak with each module that uses TabNavigator.
          • 2. Re: TabNavigator + Module bug
            Brandon Ellis Level 1
            Hi,
            I had a problem similar to that with an accordion that had component children receiving values before the actually existed (Flex only creates the components that are actually in view when it starts and only creates the others as the view changes.).

            It's not recommended but for a small performance hit you could use creationPolicy="all" attribute in your TabNavigator. That solved the problem for me.

            good luck.