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

Reply
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