Topic: I think I may have found a memory leak in the C8's Control Panel

Hi Duane,

I recently noticed that my World Weather Online widget progressively loads slower as the hours march on.  Immediately after booting the C8, the widget normally takes about 0.5 seconds to load.  After it has been cycling with a clock widget (Sky Happenings) for about 10 hours, it takes about 2 seconds to load.  I don't think my widget used to do this before the Chumby service went offline.

The other thing I'm noticing is that the CP starts off using about 55% memory (according to "top").  After the 10 hours, this has jacked up to about 120%.  This doesn't seem right, given that only these two widgets have been running the whole time.  In case you're interested, the same thing happens on Zurkware (with CP v5.0.35).  I didn't run the next test on that platform as I couldn't be bothered messing around with its configuration files.

Just to make sure that my widget isn't causing the memory leak, I rebooted the C8 and ran two simple clock widgets (Built-In Clock and Futura Clock) by themselves for another 10 hours.  After that time, I noticed that the CP's memory usage was again up to about 120% (from 55% initially).  When I then switched to a channel containing my WWO widget, I noticed that it was taking about 2 seconds to load (instead of the ideal 0.5).

What's your opinion about all of this?  Am I missing something, or do you agree that there could be a memory leak in the C8's CP?  If so, perhaps this is what's been causing it to crash and wake other people up in the middle of the night (i.e. due to the bright lights).  I'm guessing the CP eventually chews up all of the available memory and then crashes/burns.  Let me know if you'd like me to run any further testing in relation to this problem.

Re: I think I may have found a memory leak in the C8's Control Panel

We think there might be a leak, however, it's not in the CP, but rather the FlashLite executable.  It appeare to leak a small amount of memory each time it quits a widget.  Assuming we were able to fix it, it would require a firmware update.  So far we have not been able to locate the leak.

Re: I think I may have found a memory leak in the C8's Control Panel

I imagine it'll be rather difficult to locate the leak without the Flash Lite source code.  It might be easier to notify Adobe of the problem and send them a C8 for testing purposes.

Re: I think I may have found a memory leak in the C8's Control Panel

I suppose you could just play each widget in a sandbox (if this is possible).  When switching widgets, just kill the sandbox and no memory should leak out.

Re: I think I may have found a memory leak in the C8's Control Panel

Adobe has officially discontinued FlashLite and no longer provides any support for it.

The widgets do work in a security sandbox within the player, however there still seems to be some sort of memory leakage.

Though the FlashLite player was designed to run multiple instance at the same time, as far as I know we were the only company to take advantage of that ability, so my guess is that it wasn't completely tested by Adobe.  It is also possible that we introduced the leak but it does not seem to be there in the older CC/C1/I3 Flash player and our code was not much modified in the transition from FL3 to FL4.

Re: I think I may have found a memory leak in the C8's Control Panel

When I was at Palm in 2007, we were adapting FlashLite to be a browser plugin for running web content, so we had to deal with multiple instances too.  Alas, we didn't get far enough with it to actually put that into production, so I'm unsure if we ran into that leak.

BTW, be very glad that we never released that code... FlashLite was definitely not meant to run random widgets on web pages!  The Flash plugin that eventually came out for the webOS browser was using the real Flash code and worked much better.