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
Contributor
erich412
Posts: 11
Registered: ‎02-01-2013
My Device: 9900 bold
My Carrier: vgsdfg

web browser freeze with black berry 9900 OS 7.1

[ Edited ]

Hi, I need to maintain a web application that causes a browser deadlock. When the freeze occurs I have to wait 5 minutes for the browser to crash or remove the battery.

 

I tracked down the problem and the cause is simply a javascript alert that is called when the page loads. If the user drags the page at the same time, it freeze.

Obviously, it doesn't happen 100% of the time since I believe it is a deadlock. One has to load the page several time and drag it to see the issue.

 I can reproduce the issue with a page containing the following code only.

( I also tried doing the alert in the window.load event but with no success)

 

<html>
<head>
</head>
<body>
<script type="text/javascript">
<!--
alert("ERROR - The notification no longer exists.");// -->
</script>
</body>
</html>

 

I manage to fix this by wrapping the alert in a timeout function. however, I do not like this solution at all nor do I know if it is 100% safe. Anyone know a more solid fix to this?

I was thinking of removing the alert and simulating it with a div but would prefer to do as little modification as possible to the code.

 

Thanks.

Please use plain text.
Developer
JRab
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: web browser freeze with black berry 9900 OS 7.1

hey erich412,

 

you can try putting your alert into the body's onload listener function like this:

 

<script>
window.onload = function () { alert("ERROR - The notification no longer exists."); }
</script>

 

This will cause the alert to show up after the page is done loading (which maybe attribute to why your browser may be failing). Good luck!

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Please use plain text.
Contributor
erich412
Posts: 11
Registered: ‎02-01-2013
My Device: 9900 bold
My Carrier: vgsdfg

Re: web browser freeze with black berry 9900 OS 7.1

Thanks for the tip,

 

Unfortunately I already tried using the "load" event and it still freeze if I drag the window while the page is loading and the alert window shows up.

Please use plain text.
Contributor
erich412
Posts: 11
Registered: ‎02-01-2013
My Device: 9900 bold
My Carrier: vgsdfg

Re: web browser freeze with black berry 9900 OS 7.1

I managed to make the browser freeze with the timeout function wrapping the alert.

The problems occurs only when I drag the screen when the alert shows up. Because of this result, the browser hang has nothing to do with the fact that the page is loading. (This explains the reason why the onLoad event did not work)

 

I made another demo. A button on screen that calls the alert function when I click on it. This case do not freeze since the onclick event seems to cancel itself when I drag the screen after clicking the button. So I cannot reproduce the behavior.

 

Also, I tried other blackberrys with the same OS and the freeze also occurs. So it's not only my device that is bugged.

Please use plain text.
Developer
araskin
Posts: 128
Registered: ‎08-01-2008
My Device: Bold 9900, 9810, 9780, 9650 and so many others
My Carrier: T-Mobile

Re: web browser freeze with black berry 9900 OS 7.1

I assume you are compiling this 'app' with Ripple? If so, what version of the SDK are you using?

Please use plain text.
Contributor
erich412
Posts: 11
Registered: ‎02-01-2013
My Device: 9900 bold
My Carrier: vgsdfg

Re: web browser freeze with black berry 9900 OS 7.1

[ Edited ]

Hi,

 

I do not use Ripple. The app is a simple web page made with asp.net. and visual studio that runs on a web server. Nothing is run on the blackberry itself beside the browser.

 

The html code I posted above can also reproduce the problem when I copy it in a .html page on the same web server. I can access the page with no problem using IE, firefox chrome etc. but when using the blackberry browser it can freeze.

Please use plain text.
Developer
JRab
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: web browser freeze with black berry 9900 OS 7.1

Hey Erich412,

 

Do you have a link to the page that is causing the issues? I wanna try it out here. Thanks!

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Please use plain text.
Contributor
erich412
Posts: 11
Registered: ‎02-01-2013
My Device: 9900 bold
My Carrier: vgsdfg

Re: web browser freeze with black berry 9900 OS 7.1

Unfortunately, the html page is on an Intranet.

You could download a web server on your pc and create a html page containing only the above code,

 then access the page using your blackberry browser.

 

It freezes about 10% of time while loading the page if you drag the browser window during the process.

Please use plain text.
Contributor
erich412
Posts: 11
Registered: ‎02-01-2013
My Device: 9900 bold
My Carrier: vgsdfg

Re: web browser freeze with black berry 9900 OS 7.1

[ Edited ]

I managed the reproduce the issue with this page :

 

http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_body_onload

 

It took me about 9 tries to make it freeze. The alert window was displayed but I could not click on the "ok" button.

 

You will need to drag the window constantly to make it freeze ( you will see the browser background with squares in it).

This page is quite long to load. I found out that the quicker it is to load the page, the easier it is to reproduce the problem.

Please use plain text.
Developer
araskin
Posts: 128
Registered: ‎08-01-2008
My Device: Bold 9900, 9810, 9780, 9650 and so many others
My Carrier: T-Mobile

Re: web browser freeze with black berry 9900 OS 7.1

Do you have latest version of 7.1 installed on this device?

Please use plain text.