imberezin / google-cast-sdk

Automatically exported from code.google.com/p/google-cast-sdk
0 stars 0 forks source link

Chromecast crashes loading large javascript files #683

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Chromecast (2013 and 2015) crash when loading large Javascript files. 

For example, Emscripten generates a single Javascript file as a result of its 
compile and these can be 10's to 100's of megabytes. I first ran into this 
attempting to load a simple Unity3D game compiled via Unity's il2cpp to 
emscripten flow which generated a 24MB javascript file. 

When the size of a Javascript file exceeds around 5MB the Chromecast 
consistently crashes in one of several ways. The screen may flicker, it may 
freeze all black/white/gray, it may reboot or it may result in a brain freeze 
screen. In some cases, it eventually reboots and in others it freezes until a 
power cycle.

I have attached a receiver app that demonstrates the problem consistently. It 
loads the cast scripts, displays the current seconds on the screen (just to 
give a visual so it is clear when things go awry), and loads a large 5MB+ 
Javascript file. The default linked index.html results in a brain freeze. There 
are alternate javascript files of slightly different sizes which result in 
different misbehavior. The behavior may differ between a cold start vs just 
disconnecting the app and running it again.

When attaching with the debugger a size that does not crash sometimes crashes 
when attempting to take a heap snapshot.

Firmware version is: 1.16.44433 on my 2015 Chromecast.

Original issue reported on code.google.com by mnei...@gmail.com on 2 Nov 2015 at 1:26

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by jonathan...@google.com on 2 Nov 2015 at 7:50