0

Grid of Images crashes widget toolkit on TVs

We have a full-screen view that contains a 5x2 grid of Images with two pages.

I have discovered that I can reliably crash the toolkit on an LG TV by paging the grid between the two pages. It malfunctions even when the images have been shrunk to postage stamps (56x47).

And by "crash the toolkit" I mean the widgets disappear and I have to press the purple button and wait for it to scan for updates before the snippets appear again.

Is it related to lines of the following form that appear when I run the app in the simulator?

CODE
SB 00:03:05:051: [T:20423] SurfaceBook: curr =  18.034MB (113) : peak =  29.760MB (212)
SB 00:03:13:231: [T:20423] SurfaceBook: curr = 19.852MB (120) : peak = 29.760MB (212)
SB 00:03:18:681: [T:20423] SurfaceBook: curr = 21.711MB (131) : peak = 29.760MB (212)
SB 00:03:26:032: [T:20423] SurfaceBook: curr = 23.529MB (138) : peak = 29.760MB (212)
SB 00:03:41:872: [T:20423] SurfaceBook: curr = 11.174MB (93) : peak = 29.760MB (212)


I have tried code like this in the cellUpdater of the grid:

CODE
                if (false) {
cell.content.setSource(dataItem.imageURL);
} else {

if (cell.content != null) {
cell.removeChild(cell.content);
cell.content = null;
}

var image = new KONtx.element.Image({
missingSrc: "image/blankMovie.png",
loadingSrc: "image/loadingMovie.png",
src: dataItem.imageURL,

remoteAsync: true,
styles: {
height: cell.height - 5,
width: cell.width - 5,
vOffset: 0
//hAlign: 'center',
//vAlign: 'bottom'
}
});
cell.content = image.appendTo(cell);

var fitImageCallback = function() {
return;
OSUtils.centerImageInRectangle(cell.content, {
x: 2,
y: 2,
width: cell.width-4,
height: cell.height-4
})
};
// make sure that we resize the image correctly once we know its dimensions
fitImageCallback.subscribeTo(cell.content, 'onLoaded', cell.content);

}


You can spot several variations we have tried and disabled.

What tactics should we use to prevent crashes in image-intensive views?

by
6 Replies
  • We gave up on trying to use the PhotoGrid in the FullscreenView. We ran into the same issues with it crashing, also there were issues with the images not updating and/or not being removed if the cell was supposed to be blank.

    We instead used just a Grid and then manually created the "PhotoGrid" appearance (borders, etc).

    Hope this helps. I am sure it will be attested that the PhotoGrid works fine in a FullscreenView, but needless to say we hit the same hurdles and came out with little resolution.
    0
  • QUOTE (WidgetRealm @ Jan 27 2010, 07:28 PM) <{POST_SNAPBACK}>
    We instead used just a Grid and then manually created the "PhotoGrid" appearance (borders, etc).

    I am using a Grid, not a PhotoGrid.
    0
  • Well... Those were our thoughts. Not sure how else to test/debug this one.
    0
  • The LG 2009 TVs have a number of issues. It's not related to any specific framework control, feature, or piece of functionality in the framework. If you have luck with using a Grid instead of a PhotoGrid, great, but realize that will be very specific to the code you already have loaded and running and will not be indicative of what works for someone else in many (most?) cases.
    0
  • QUOTE (Jeremy Johnstone @ Feb 2 2010, 03:40 AM) <{POST_SNAPBACK}>
    The LG 2009 TVs have a number of issues. It's not related to any specific framework control, feature, or piece of functionality in the framework. If you have luck with using a Grid instead of a PhotoGrid, great, but realize that will be very specific to the code you already have loaded and running and will not be indicative of what works for someone else in many (most?) cases.


    Aside from there clearly being an issue with 2009 LG TV's, I guess we will wait to see how many other people experience the same issue. Any idea when the LG devices will be representative of an actual testing device? Based on the above response, we now have $1,400 testing device that is useless for test widgets...

    Thanks.
    0
  • QUOTE (WidgetRealm @ Feb 2 2010, 09:20 AM) <{POST_SNAPBACK}>
    Based on the above response, we now have $1,400 testing device that is useless for test widgets...


    If you want a widget to be deployed on LG, it's definitely not useless. If it doesn't work on your TV, very likely it won't work on any LG _2009_ TV. If you were expecting to use an LG exclusively to test widgets you would deploy on any platform, then sure, you wasted your money. The LG 2009 TVs are not a good indicator if a widget will run overall on all platforms well (they are faster than Samsung 2009 TVs for example, but also less stable and lack certain things related to video playback).

    -Jeremy
    0

Recent Posts

in Design / Interaction - Yahoo! TV Widgets