Comment 6 for bug 941337

Revision history for this message
Ronny Lorenz (raumzeit) wrote :

Exactly as you described in #5!

I digged into it too, yesterday. But I dont see the the point where removal of the display does the wrong thing. I tried executing self.__script_stop() of the display/Display object before destroying the rest in the remove_display() method to ensure that all the sandbox stuff is shut down first. But this did not work. Although, stopping the script should actually involve stopping and destroying of all bound controls as well.

I also checked the call chain when a display is removed. The sandbox gets actually stopped, the trusted environment removed and also the control unload functions kick in. However, the gobject.timeout_add() function might be the problem, since it keeps calling the timer function of the desklet although it shouldn't.
What I found was that although the control should be removed, the timeout callback bound to gobject.timeout_add() does not return False. But it should, since _add_timer() of main/Control always checks if the self.__is_stopped property of the control object is set True.
Maybe the garbage collector isn't able to kick in properly since an update function is still bound to the gobject.timeout_add callback? Very weird, I will look into this one this evening again.