Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Developer
Posts: 10
Registered: ‎12-02-2009
My Device: Not Specified

Focus based navigation hangs device

Hi,

 

We just downloaded the new Widget Beta 3 SDK and are adding Focus based navigation to our Widget.

 

Some notes about the Widget:

- lots of html elements (div, button, input, img etc)

- an extensive amount of javascript handling application logic, manipulation of DOM tree, ajax requests etc

 

The problem:

 

We have followed the RIM documentation on focus based navigation, and initially it seems to be working fine in the Widget. Navigation between the different elements works and they are properly highlighted. Then suddenly after clicking around, the Widget and the device itself totally hangs. It is probably the UI thread hanging, since the Widget seems to continue sending ajax requests (we can see the 3G traffic arrows in the upper right corner now and then). But the device does not respond to any button clicks.

 

We leave the device, after ~30 minutes there is a popup shown with the following message:

 

Uncaught exception: Application focus(176) is not responding; process terminated"

 

We don't know what the focus(176) means, on different occasions it has stated focus(180) and focus(236) etc. This seems to be one of those nasty randomly occurring errors... It is always triggered by the user clicking an element in the UI, but we can not see any pattern how to trigger it. When the user clicks an element, our underlying javascript code performs DOM manipulations and shows/hides different elements.

 

Focus based navigation is a requirement in our application. We urgently need help on this issue (probably from the RIM developers!), since it might prevent us from using the Widget environment. I realize it is hard to pinpoint the error with the information above, let us know and we can send you some code!

 

Thanks,

/olle

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Focus based navigation hangs device

I've passed this to the development team.  Any chance you could send us some HTML that would replicate the issue?

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
New Developer
Posts: 10
Registered: ‎12-02-2009
My Device: Not Specified

Re: Focus based navigation hangs device

Tim - I have sent you a private message with some download instructions for your team.

 

We have now created a dummy Widget which can trigger the error. This Widget uses jQuery for DOM manipulation, that way we can reproduce the error every time. The error comes when we use focus based navigation, the user clicks an html element and our click handler performs show/hide operations.

 

We suspected jQuery caused the error, so we rewrote our application to handle all DOM manipulations (show/hide etc) without jQuery. Unfortunately that did not solve the problem, it still happens but not as frequently and we can not see any pattern how to reproduce it.

 

Thanks,

/olle

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Focus based navigation hangs device

Thanks for the PM.. I have sent it to our development team for them to investigate

 

Stay tuned...

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
New Developer
Posts: 10
Registered: ‎12-02-2009
My Device: Not Specified

Re: Focus based navigation hangs device

Do we have any progress on this issue from RIM developer team? Seems similar problem has been reported in other posts at the forum as well. It´s sort of a stopper for us...

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Focus based navigation hangs device

We have isolated the issue to a thread blocking scenario between input from the UI thread interacting with the JavaScript thread.  We have a prototype solution that we are now working through to determine if it will solve the threading deadlock.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Developer
Posts: 482
Registered: ‎10-24-2008
My Device: 9300
My Carrier: AT&T

Re: Focus based navigation hangs device

I've had the same issue within a widget. Looking forward to a solution.

_________________________________________
www.jasonmace.com/blackberry
Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Focus based navigation hangs device

Update... 

 

I heard some positive news on the work being performed towards a fix to this issue..  We are running through the scenarios to see if our fix solved all aspects of the problem.

 

Stay tuned....

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
New Contributor
Posts: 3
Registered: ‎05-10-2010
My Device: 9700
My Carrier: TMobile

Re: Focus based navigation hangs device

[ Edited ]

I'm wondering if what I'm seeing is the same problem (and hopefully same eminent fix....):

I have a table with 'hover' effects on the table data and 'x-blackberry...' extensions to catch the up/down focus navigation (so I can direct the next focal point per my desires).   

 

(As an aside, sometimes the  CSS hover effect gets left behind on an element that is no longer in focus -- so I have two table data elements showing the hover effect...)

 

The user does an action to that will add a row to the table after an AJAX interaction (currently I'm simulating the AJAX interaction with a setTimeout-run routine).  If, after kicking off the asynchronous action that will ultimately manipulate the DOM, I then use the trackback to move the focus around then I often will get the typical frozen Blackberry (no input works except the End/hang-up key; and get a pop-up about non-responsive thread upon power cycle of the device via the End key).   This freezing of the device seems to correspond with when the timer kicks off and starts manipulating the DOM.  

 

Seem to be the same issue? 

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Focus based navigation hangs device

Yes this is the same issue.  If the DOM is being updated by an Asynchronous callback in JavaScript at the same time that the navigation is happening, it will cause a threading deadlock.

 

This is the issue that we are concentrating on.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter