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
Ted_Hopp
Posts: 1,305
Registered: ‎01-21-2009
My Device: Not Specified
Accepted Solution

Z10 browser crash on web page

[ Edited ]

We have a web app (built using Enyo 2.2) that runs fine on the PlayBook, but users are reporting that it crashes the browser on the Z10. I don't have a Z10 device to test with, but I did verify that it also crashes the browser in the simulator. The crash happens while the page is loading, before anything is displayed. Are there any tools I can use to find out what's going on? I tried using BlackBerry Web Inspector, but that's useless since the page never opens. Besides, that would let me see the JS console, but not why the browser itself crashes.

 

If anyone wants to try it, the app is available at www.hebrewinhand.com/app/. (The app has now been fixed--see below.)

 

I don't think it's the Enyo framework; they claim that BB10 is a supported platform and an earlier app using Enyo (at www.hebrewinhand.com/shema/) works fine. So I assume it's something I'm doing, but I can't figure out what. The only significant difference between the apps is the complexity of the page layout, which is considerably greater in the app that crashes the browser.




Solved? click "Accept as solution". Helpful? give kudos by clicking on the star.
Developer
JRab
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Z10 browser crash on web page

Hey Ted_Hopp,

 

Yep -- interesting -- it does crash the browser every time consistently. I'm using a Dev Alpha -- so should be close to the real thing -- as confirmed by you inspector doesn't show anyhting. I'll keep looking into it.

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
Developer
Ted_Hopp
Posts: 1,305
Registered: ‎01-21-2009
My Device: Not Specified

Re: Z10 browser crash on web page

[ Edited ]

JRab -- thanks for the confirmation. If you have a way of obtaining any useful information about the cause of the crash, I'd be most grateful to hear it!




Solved? click "Accept as solution". Helpful? give kudos by clicking on the star.
Developer
interfaSys
Posts: 817
Registered: ‎11-19-2009
My Device: Z10, Q10, 9900, 9790, PlayBook,

Re: Z10 browser crash on web page

Please report this bug into the tracker so that the browser team can take a look at it. Sencha touch used to make the browser crash and they were able to fix this before launch.
--
Olivier - interfaSys ltd
Developing for BlackBerry 10 devices using the Sencha Touch framework.
Developer
Ted_Hopp
Posts: 1,305
Registered: ‎01-21-2009
My Device: Not Specified

Re: Z10 browser crash on web page

[ Edited ]

After a bit of mucking around, selectively commenting out parts of my code, I think I found the cause of the crash. I'm using a canvas element in my app and it turns out that this code is the culprit:

 

if (this.ctx2d.webkitImageSmoothingEnabled) {
    this.ctx2d.webkitImageSmoothingEnabled = false;
}

Evidently, assigning to webkitImageSmoothingEnabled will crash the browser. It doesn't help to wrap the above in a try/catch block; the browser crashes anyway.

 

The work-around, obviously, is to just skip the assignment (at least in environments that have "BB10" in the user agent string). Unfortunately, this causes a lot of what I draw on the canvas to appear blurry. (The blurring is odd, because webkitBackStorePixelRatio is 1, but that's a different problem.)

 

Olivier -- I will report this to the tracker. As suspected, it has nothing to do with Enyo at all.

 

EDIT: It turns out that the culprit code only causes a crash if the canvas width and/or height is zero at the time the assignment is executed. I'll include that in the tracker report.




Solved? click "Accept as solution". Helpful? give kudos by clicking on the star.
BlackBerry Development Advisor
rcraigbarnes
Posts: 40
Registered: ‎01-11-2013
My Device: BlackBerry Z10

Re: Z10 browser crash on web page

Just an FYI I created a basic test case using the information you posted. I then ran it on our latest internal build and this is no longer an issue. I don't have an ETA for this particular release, but it is coming. Don't worry about filing an issue if you haven't yet.

 

Rory

--
Website Relations - Web Technologies

@roryboy

1.Please resolve your thread by clicking the "Accept as Solution" button below the post which solved your problem!
2. If any post helps you please click the like/thumbs up button below the post(s)
Developer
Ted_Hopp
Posts: 1,305
Registered: ‎01-21-2009
My Device: Not Specified

Re: Z10 browser crash on web page

Thanks for the update; that's good news. I've been lazy about filing the issue and for once my laziness paid off! :smileyhappy:



Solved? click "Accept as solution". Helpful? give kudos by clicking on the star.