views:

824

answers:

1

I have recently upgraded from Flex SDK 3.3 to SDK 3.4. Now I suddenly get this error message throughout the application:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at mx.managers::FocusManager/focusInHandler()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\managers\FocusManager.as:601]

It occurs fairly at random, but most often when I click on a tab in a tabNavigator. The problem is fixed when I add the attribute 'focussable="false"' to the tabNavigator, but I'd like to keep the tabNavigator focussable, and I definately can't make all the elements in my app unfocussable.
Someone told me that this is a bug in the SDK. Is that true? If so, is there a workaround other than 'focussable="false"'?

A: 

There are definitely issues of this kind when updating SDK's to 3.4. I've seen it on many other class types. Fixes I've found include rebuilding the project itself or rebuilding your workspace - in my experience it's a corruption in the workspace and not an issues in the SDK itself.

I've also seen a problem where included libraries you might be referencing were compiled using a previous library - specifically I've seen issues like this when mixing 3.2 and 3.3.

I'm not 100% sure this is your exact issue and I'm sorry for only offering anecdotes instead of being able to address the root cause, but in my experience this sort of thing can be caused by multiple environment-specific issues so it's difficult to address.

In my case the issue was around the "flash" package, but this sounds similar. I have a list of the solutions I've found on my blog, but your mileage may vary. Hope this helps - comment back if it doesn't.

RJ Owen
Well, I tried creating a new workspace and reinstalling the SDK, but unfortunately it didn't work. I then went on to search bugs.adobe.com (via a link on your blog) and found this bugreport: https://bugs.adobe.com/jira/browse/SDK-21780 Guess it's an existing bug in 3.4, but a more recent build should contain a fix. So I'll download the newest SDK and see if it's fixed . Thanks for your help!
Maurits de Boer
Update: It seems this bug is fixed in version 3.4.10468, but the downloadable sdks only go up to 3.4.0.9271 (milestone) or 3.4.1.10084 (stable). I'm not gonna try a nightly build ;). So for now We'll return to SDK 3.3 and wait until the bugfix is released.
Maurits de Boer
Sure! Glad it helped - that sounds like a tricky one to track down, but luckily they're on it already. I wouldn't risk a nightly build either. :)
RJ Owen
Just ran into this as well, and we're on the "latest" 3.4 (9271) - still all that's offered. 3.5, here we come.
Rob S.