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
Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Focus based navigation hangs device

LATEST UPDATE...

 

We are actively working on the solution and are trying to get a fix out as soon as possible.  We understand the impact and importance of this issue and it is a top priority.

 

Now for some background information so that you aren't left in the dark and also have a better understanding of the root of the problem.

 

The root of the issue is that a deadlock occurs between the JavaScript thread and the UI thread when using the Navigation mode in certain scenarios.

 

Scenario 1:

 

  • User Navigates or "clicks" (this event originates in the UI thread)
  • This triggers an action to be taken 
  • An Event is triggered, or JavaScript is triggered, in the Browser Rendering Engine
  • The Navigation event waits for result of triggered event
  • Resultant DOM changes in the Browser Rendering Engine either by CSS transforms on hover, or JavaScript manipulation of the DOM occur.  Another culprit is a JavaScript  "focus.setFocus()" call
  • One of these resultant changes can require information from the UI thread and therefore it waits for the result
  • Now the JavaScript thread can't finish because the UI thread is waiting for a result from the JavaScript thread
  • The UI thread can't finish because the JavaScript thread is waiting for a result from the UI thread
  • Thus a deadlock
Scenario 2:
  • An Asynchronous event fires in JavaScript (AJAX, push, setTimeout, Worker result etc)
  • While this is happening the user is in the middle of Navigating
  • Now it becomes a race condition
  • This then triggers Scenario 1 only that the JavaScript thread is the initiator instead of the UI thread
lock.png
Solution:
The solution is to run a third thread that handles all of the interaction with the JavaScript thread that is initiated by the UI thread.  This will ensure that there is never a blocking scenario where the UI thread is waiting on the completion of the JavaScript thread.  The UI thread will simply spawn a thread and then return
This is the solution we are currently pursuing.
The one bright side is that it appears that the fix does not require any handheld changes but only changes to our widget packaging process.  We have some initial estimates for the fix, but we wanted to give our RIM developers/testers a week to dig into the solution to have a better idea of the accuracy of the original estimates so that we can better understand timing.
Temporary Workaround:
This deadlock issue does not appear to surface when not using navigation mode capabilities.  It appears that the pointer mode is utilizing a separate thread solution much like the one we will be putting in place for widget navigation. If you temporarily use the default pointer mode until the fix is available you should be able to continue your development without lock-ups.
Thank you for your patience as we work through this fix.

 

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Focus based navigation hangs device

Hi Everyone,

 

I thought I would provide an update.  We have successfully completed our fix for the frozen navigation issue and we are currently going through our rounds of testing.  We should have an update available for download fairly soon.  How soon will all depend on how little we find during our testing cycles.

 

Thanks again for your patience on this issue

 

Cheers

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Developer
Posts: 40
Registered: ‎04-16-2010
My Device: na
My Carrier: na

Re: Focus based navigation hangs device

Hi Tim,

 

How are you guys getting on with this? Have you got a rough ETA yet?

 

Kind regards.

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

Re: Focus based navigation hangs device

 


confinedspace wrote:

Hi Tim,

 

How are you guys getting on with this? Have you got a rough ETA yet?

 

Kind regards.


 

We have the issue resolved from the development side now... there was a bit of a hiccup where we also found some issues with Menus in a similar situation. 

 

We are just trying to get the final testing fit into the testing group's cycles.  Most folks are all consumed with testing BlackBerry 6 at the moment so unfortunately I don't have an ETA for you yet

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Focus based navigation hangs device

Hi everyone,

 

I figured I would give an update on this topic.  The latest patch released to support BlackBerry 6 includes the patch to resolve the hanging issue with focus based navigation mode.  

 

You may want to try out the patch to ensure that it resolves your issues.

 

http://supportforums.blackberry.com/t5/Web-Development/Supporting-BlackBerry-Widget-applications-on-...

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
New Contributor
Posts: 5
Registered: ‎01-12-2011
My Device: Javenlin 8900

Re: Focus based navigation hangs device

Hi Tim,

 

any work around for Blackberry 5?

 

in case of have patch worked on Blackberry 5 simulator, may it able to run on existing Blackberry 5 device? or we have to upgrade device too?

 

New Contributor
Posts: 5
Registered: ‎01-12-2011
My Device: Javenlin 8900

Re: Focus based navigation hangs device

I updated to web-work 2.5.1 eclipse plugin today and it worked.

 

thanks

New Contributor
Posts: 5
Registered: ‎04-11-2011
My Device: BlackBerry Z10
My Carrier: Verizon Wireless

Re: Focus based navigation hangs device

Tim we have installed WebWorks 2.5.1 for Visual Studio and are still experiencing this issue.  We don't have a deadlock, but there is a significant delay in UI response from trackpad. 

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

Re: Focus based navigation hangs device

Is the delay showing up on both 6.0 and 5.0?  Or just 6.0?

 

We have made some improvements on the focus based navigation mode coming up in the  next release of the SDK.  Mostly these improvements are surrounding mixing trackpad with touch navigation like what is found on the Torch.

 

We also have a group working on speed improvements for Navigation mode.  We have found some places where we can significantly speed it up.  We are just working on what is the best way to implement these changes.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
New Contributor
Posts: 5
Registered: ‎04-11-2011
My Device: BlackBerry Z10
My Carrier: Verizon Wireless

Re: Focus based navigation hangs device

Tim, we resolved the problem using information from your Peformance Tip on DOM updates.  In our application, we load a single main page. 

 

If we get and load data in the body onload event, trackpad navigation is fine.  If after loading the main page, we load data from a button click and update our data container div, the trackpad navigation is very sluggish as moves and clicks are delayed in the event processing queue.  The more data we return the more poor the response.

 

We format all of our html on the server and inject it into innerHTML in one shot.  Using your perfomance tip of removing our container div from the DOM, filling the container with content, and then injecting back into the DOM solved the problem. 

 

The issue was worse on 6.0 than 5.0 devices.  Thanks so much for the tip!