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
Developer
gluth
Posts: 192
Registered: ‎09-23-2009
My Device: 9860/PlayBook/Dev Alpha
My Carrier: Plus GSM

WebWorkds application dies right after onload on 6.0 devices, works correctly on 7.0

I have weirdest issue, my application, build on top of bbui dies right after pushing first screen onto stack (with bbui 0.9.3), but only on 6.0 devices (9800), works correctly on 7.0 devices (I was able to run it without any issues on 5.0 devices, but I dropped support for it. I have denoted that giving some timeout after load may fix this issue, but main reason remains the same. Why and how to hunt for this error?

 

How can I instruct WebWorks to show error which caused such death? How can I check this issue?

Found my post helpfull? Like it! It solves your trouble? Help others and accept it as solution. Search before asking.
My apps: Secret Cod3s | Should my tablet be banned?
--
Jakub Nietrzeba
PGS Software S.A.
Your reliable partner in Poland - IT Outsourcing - BlackBerry, iPhone, Web and Standalone applications
Please use plain text.
Developer
Hithredin
Posts: 404
Registered: ‎06-03-2010
My Device: Z10 Red

Re: WebWorkds application dies right after onload on 6.0 devices, works correctly on 7.0

Have you tried on others OS6 devices? The main difference with the 9800, after the os version, is the keyboard: does it happens the same with the physical keyboard closed/opened?

 

Have you tried to connect the debugger with eclipse for BB Java developers? Usually it is not really verbose, but maybe you can pull an interesting log from it.

 

 

Please use plain text.
Developer
gluth
Posts: 192
Registered: ‎09-23-2009
My Device: 9860/PlayBook/Dev Alpha
My Carrier: Plus GSM

Re: WebWorkds application dies right after onload on 6.0 devices, works correctly on 7.0

I have found source of the issue. I was starting ajax download inside of the onload function. When I have moved ajax outside of this function (with some minimal timeout) application is starting much faster, it is also not breaking on os 6.0. It looks like webworks show splash until all loading processes are over, and each ajax started during onload is counted as crutial resource which must be downloaded before splash is off.

 

 

Conclusion: do not start ajax in onload function, use setTimeout and queue it for later.

Found my post helpfull? Like it! It solves your trouble? Help others and accept it as solution. Search before asking.
My apps: Secret Cod3s | Should my tablet be banned?
--
Jakub Nietrzeba
PGS Software S.A.
Your reliable partner in Poland - IT Outsourcing - BlackBerry, iPhone, Web and Standalone applications
Please use plain text.
BlackBerry Development Advisor
chadtatro
Posts: 620
Registered: ‎10-01-2009
My Device: Z10

Re: WebWorkds application dies right after onload on 6.0 devices, works correctly on 7.0

Hi gluth,

 

Might be a good idea to make use of the 'ondomready' function provided in bbUI if you're not already.  I've found timeouts alone aren't always the most reliable. :smileyhappy:

 

 

bb.init(onscreenready : function(element, id) {
        },

        ondomready: function(element, id) {
           // your code here
        });

 

 

 

Chad Tetreault | App Development Consultant | BlackBerry Developer Relations | developer.blackberry.com | @chadtatro
Please use plain text.
Developer
gluth
Posts: 192
Registered: ‎09-23-2009
My Device: 9860/PlayBook/Dev Alpha
My Carrier: Plus GSM

Re: WebWorkds application dies right after onload on 6.0 devices, works correctly on 7.0

Well ondomready is fired with some delay, when screen is visible (look into bbui sources, it still setTimeout :smileywink: ). It ends with clean screen which is filled after noticable moment. This is not good from user point of view. I'm using onscreenloaded events to fill screen.

Found my post helpfull? Like it! It solves your trouble? Help others and accept it as solution. Search before asking.
My apps: Secret Cod3s | Should my tablet be banned?
--
Jakub Nietrzeba
PGS Software S.A.
Your reliable partner in Poland - IT Outsourcing - BlackBerry, iPhone, Web and Standalone applications
Please use plain text.