1

Any ideas on how to get memory usage, Javascript errors, etc. from Chrome running on Google TV?

I have a page that is getting the "Aw, snap!" error when viewed in the Chrome browser on Google TV (Logitech). The page is fairly simple, but it does load a bunch of photos, though only up to 7 at a time (the photos are loaded using JavaScript). The photos are 640x480 and ~500KB each. They are stacked and the top one fades out (using jQuery) until all are gone then a new batch is loaded.

It only crashes on Google TV (it runs fine on Windows 7) and it takes a while before it crashes (I can get it down to about 10-20 minutes before it crashes by turning on a "fast mode" on our page).

Unfortunately I can't figure out how to get any information that might help me debug it. It would be cool to be able to get Chrome's developer tools on the Google TV device.

Brian
  • 37,399
  • 24
  • 94
  • 109
  • Would love to know how to do this too. I have a web app that plays videos and for some reason it is not playing on the Sony Google TV stand alone box I just bough. Would love to be able to see what is going on with it. – Elijah Lynn Dec 24 '12 at 03:26

1 Answers1

1

Currently there is no way to pull debug information from Chrome on Google TV. The Logitech Review is rather limited in it's RAM and you may be encountering an issue there (I don't know how big these images are). It is also possible that you have a memory leak in your javascript code. This might be hidden on other systems running a browser as there would be more memory to buffer you from seeing the error.

My advice would be to create a virtual machine (VirtualBox is free and runs on Windows) - create a VM with limited memory (256Mb Ram for instance) and install Ubuntu or some other flavor of linux that can run Chrome. Then run your app in the VM and see what happens.

Failing that you could always try loading the imaged with static image tags and see if it is the images that are causing the crash. If it's not the images then I would say look at your JS code closely and perhaps run it through JSLint (http://www.jslint.com/)

Krispy
  • 1,098
  • 1
  • 7
  • 11
  • That was my initial thought too, but I watched the memory (settings > applications > manage applications > running) and it seemed to be fine (there was still plenty of RAM left when it crashed). It did spike a bit just before it crashed, but for the most part it went up and down as expected. – Brian Oct 18 '12 at 00:31
  • Is this code you would be willing to share? Did you try passing the code through JSLint? – Krispy Oct 18 '12 at 16:13
  • JSList said it only parsed 35% of my code, but no real errors were found in the code it parsed (it reported a bunch of non-errors like function used before definition which is why I think it stopped). I don't plan on reorganizing the code just to make JSLint happy :). Currently I just reload the page after it's shown 100 photos and that seems to work, but is not ideal. – Brian Oct 18 '12 at 22:36
  • How big are the photos you are loading? – Krispy Oct 23 '12 at 15:28
  • 640x480 and ~500KB. We load up to 7 at a time then reuse the images tags for the next batch. There are just 2 short lines of text, one above and one below that also get updated when we change the batch. The images fade from one to the next (they are stacked, the top one fades out). – Brian Oct 24 '12 at 16:38
  • I see that you work on the GTV team. If you're willing to look into it more, here's the URL to the app: http://home2.me/Lobby?o=746. This one shouldn't crash since it reloads every 100 or so photos. If you need a version that will crash, I can perhaps get something for you. – Brian Oct 24 '12 at 16:45
  • I ran the site in chrome on a sony device and the logitec review - has been running successfully for 45 min without a crash. Can you provide the system details? what build are you on? How much system space is left? What else is running on the device? – Krispy Oct 25 '12 at 21:44
  • The page reloads before it gets to the point of crashing. I've just updated the JS so you can see the error. Use this url: http://home2.me/Lobby?o=746&reload=10000 – Brian Oct 26 '12 at 17:51