N900 widgets vanish bug

I have a strange bug with my N900 : sometimes when I add a desktop-cmd-excec widget, all my widgets vanish. A reboot does not help. Then when the calendar alarms occur, it takes between 30s to 1 minute after clicking on them to make them go away. Restoring the widgets from the gconf values + the ~/ filesystem helps, until I try to add them back-  then they disappear again. 

So today I took some time to investigate the issue : apparently, this is due to a bug  : when a 3rd party widgets has a memory leak or stops while waiting for some data (ex: lack of connectivity), it results in high CPU usage (unresponsiveness) then takes hildon-home along with it - which then removes all widgets to prevent a reboot loop. The bug is a WONTFIX since it requires a major feedservice change.

See http://talk.maemo.org/showthread.php?t=56340 and https://bugs.maemo.org/show_bug.cgi?id=8723

Apparently, banning python widgets is the standard solution - since they tend to be leaky (so now I know why I hate python :-)

apt-get remove —purge hildon-desktop-python-loader

But on my device, it looks like a desktop-cmd-exec bug, since it happens when I add a custom script!

The only workaround so far is to run as the standard user:

dsmetool -k /usr/bin/hildon-home
dsmetool -t /usr/bin/hildon-home

Here are some scripts I use to save my widgets status before restarting the widget framework, to avoid adding them manually:

~ $ cat widgets-store.sh 
set now=`/usr/local/bin/date +%Y%m%d_%H%M%S`
gconftool-2 —dump /schemas/apps/osso/hildon-desktop/applets > widgets.xml
tar zcvf .widgets-$now.tgz widgets.xml .config/hildon-desktop/home.plugins
rm widgets.xml
~ $ cat widgets-restore.sh 
gconftool-2 —dump /schemas/apps/osso/hildon-desktop/applets > /tmp/w.cur
gconftool-2 —unload /tmp/w.cur
tar zxvf widgets.tgz widgets.xml .config/hildon-desktop/home.plugins 
gconftool-2 —load widgets.xml
rm widgets.xml /tmp/w.cur

I will also add timeout to my custom scripts which depend on network connectivity, which obviously could trigger this bug.

Blog comments powered by Disqus