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

Java Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Highlighted
Developer
Posts: 21
Registered: ‎03-28-2011
My Device: Style 9670
My Carrier: Sprint

BrowserField + ProtocolController + handleResourceRequest

We extend the ProtocolController so we can implement caching for our web artifacts.  Sporatically we encounter a weird issue where not all of the artifacts are being processed through handleResourceRequest. The end result is that we display a blank page since one of the missing artifacts is the JS that is required to render the page.  

 

One thing that is consistent is that its always the same set of artifacts that are not processed by handleResourceRequest, and we encounter the issue on OS6, OS7, and OS7.1. 

 

We extend BrowserFieldListener so we can monitor when focument creation has begin and when it has ended.


The trace below shows the failure case where you will note documentCreated and documentLoaded are being called:

 

20:32:46.168 [Thread-504167424,5] handleNavigationRequest https://acme.example.com:9404/mobile/blogs/ call super

20:32:46.169 [Thread-504167424,5] RequestHandler handleNavigation https://acme.example.com:9404/mobile/blogs/

20:32:48.873 [Thread-504167424,5] handleNavigationRequest https://acme.example.com:9404/mobile/blogs/ done

20:32:50.007 [Thread-504167424,5] documentCreated https://acme.example.com:9404/mobile/blogs/

20:32:50.008 [Thread-504167424,5] ConnectionsScreen showBrowser true

20:32:50.362 [BackgroundTaskThreadPool[ProcessId=280] worker40,5] handleResourceRequest https://acme.example.com:9404/mobile/bundles/css/N1849577185/coreBundle.css retrieved from cache

20:32:50.400 [BackgroundTaskThreadPool[ProcessId=280] worker38,5] handleResourceRequest https://acme.example.com:9404/mobile/static/stylesheets/20120715.222611/application-bb.css retrieved from cache

20:32:50.428 [BackgroundTaskThreadPool[ProcessId=280] worker37,5] handleResourceRequest https://acme.example.com:9404/mobile/images/lconmSprite.png retrieved from cache

20:32:50.599 [BackgroundTaskThreadPool[ProcessId=280] worker42,5] handleResourceRequest https://acme.example.com:9404/mobile/images/Launch_Conn_Mobile_57px_Flat2.png retrieved from cache

20:32:50.634 [Thread-504167424,5] documentLoaded https://acme.example.com:9404/mobile/blogs/

 

 

The trace below shows a successful rendering of the page:

 

20:38:23.577 [Thread-504167424,5] handleNavigationRequest https://acme.example.com:9404/mobile/blogs/ call super

20:38:23.577 [Thread-504167424,5] RequestHandler handleNavigation https://acme.example.com:9404/mobile/blogs/

20:38:26.777 [Thread-504167424,5] handleNavigationRequest https://acme.example.com:9404/mobile/blogs/ done

20:38:27.117 [Thread-504167424,5] documentCreated https://acme.example.com:9404/mobile/blogs/

20:38:27.117 [Thread-504167424,5] ConnectionsScreen showBrowser true

20:38:27.189 [BackgroundTaskThreadPool[ProcessId=280] worker54,5] handleResourceRequest https://acme.example.com:9404/mobile/bundles/css/N1849577185/coreBundle.css retrieved from cache

20:38:27.221 [BackgroundTaskThreadPool[ProcessId=280] worker55,5] handleResourceRequest https://acme.example.com:9404/mobile/static/stylesheets/20120715.222611/application-bb.css retrieved from cache

20:38:27.238 [BackgroundTaskThreadPool[ProcessId=280] worker56,5] handleResourceRequest https://acme.example.com:9404/mobile/images/lconmSprite.png retrieved from cache

20:38:27.308 [BackgroundTaskThreadPool[ProcessId=280] worker54,5] handleResourceRequest https://acme.example.com:9404/mobile/static/dojo_1.4/20120715.222611/dojo/dojo.js retrieved from cache

20:38:27.407 [BackgroundTaskThreadPool[ProcessId=280] worker55,5] handleResourceRequest https://acme.example.com:9404/mobile/images/loading.gif retrieved from cache

20:38:28.284 [BackgroundTaskThreadPool[ProcessId=280] worker56,5] handleResourceRequest https://acme.example.com:9404/mobile/static/dojo_1.4/20120715.222611/dojo/nls/dojo_en.js retrieved from cache

20:38:29.314 [BackgroundTaskThreadPool[ProcessId=280] worker55,5] ConnectionsScreen restartTimer LoadingDialog

20:38:29.315 [BackgroundTaskThreadPool[ProcessId=280] worker55,5] handleResourceRequest https://acme.example.com:9404/mobile/images/lconmSprite.png retrieved from cache

20:38:29.492 [BackgroundTaskThreadPool[ProcessId=280] worker56,5] handleResourceRequest https://acme.example.com:9404/mobile/images/Launch_Conn_Mobile_57px_Flat2.png retrieved from cache

20:38:29.711 [Thread-504167424,5] documentLoaded https://acme.example.com:9404/mobile/blogs/


 

The artifacts that are missing from the failure case are as follows:

 

20:38:27.308 [BackgroundTaskThreadPool[ProcessId=280] worker54,5] handleResourceRequest https://acme.example.com:9404/mobile/static/dojo_1.4/20120715.222611/dojo/dojo.js retrieved from cache

20:38:27.407 [BackgroundTaskThreadPool[ProcessId=280] worker55,5] handleResourceRequest https://acme.example.com:9404/mobile/images/loading.gif retrieved from cache

20:38:28.284 [BackgroundTaskThreadPool[ProcessId=280] worker56,5] handleResourceRequest https://acme.example.com:9404/mobile/static/dojo_1.4/20120715.222611/dojo/nls/dojo_en.js retrieved from cache


Again, when handleResouceRequest is not called, its always on these three files.

 

Has anyone seen anything like this?  Is there any sensible way to debug this issue?

 

Thanks,

Mark