The stack trace is very useful. It contains the line number of the code so we know where to look. Please file a bug with a simplified test case.
It looks like a sub-application's systemManager is not on stage. For this to happen, it would require that either something is delaying the applicationComplete event of the main app long enough for the sub-apps to get to this point in their startup, or someone is removing a SWFLoader as it is starting up its sub-app. I would try to find out how many invalidation phases it takes to get to applicationComplete. Set a breakpoint on LayoutManager.doPhasedInstantiation and on an applicationComplete handler and see how many times doPhasedInstantiation gets hit before applicationComplete. Should be a single digit number. If not, then find out why. Alex Harui Flex SDK Developer Adobe Systems Inc.<http://www.adobe.com/> Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of rob_mcmichael Sent: Tuesday, September 15, 2009 4:05 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Very odd null object RTE on FocusManager Hi all, I am getting this error, randomly when I start my application (and it's sub applications). As you can see the stack trace is rather useless, although through the debugger I can see the parent of container (second in the stack) is an MXML class that has a repeater that repeats another component. TypeError: Error #1009: Cannot access a property or method of a null object reference. at mx.managers::FocusManager/getFocus()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\managers\FocusManager.as:542] at mx.core::Container/createOrDestroyScrollbars()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Container.as:4571] at mx.core::Container/createScrollbarsIfNeeded()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Container.as:4402] at mx.core::Container/createContentPaneAndScrollbarsIfNeeded()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Container.as:4218] at mx.core::Container/validateDisplayList()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Container.as:2734] at mx.managers::LayoutManager/validateDisplayList()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\managers\LayoutManager.as:622] at mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\managers\LayoutManager.as:677] at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\UIComponent.as:8733] at mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\UIComponent.as:8673] Therefore I guess the component with the problem is that repeated component, although I am unsure what I can change to stop this from happening. If anyone can give me some insight to the FocusManager or the getFocus() function it would be really handy. http://stackoverflow.com/questions/1423896/very-odd-null-object-rte-on-focusmanager