Activity log for bug #941337

Date Who What changed Old value New value Message
2012-02-26 10:44:42 Ronny Lorenz bug added bug
2012-02-26 10:48:15 Ronny Lorenz description It seems that once an inline function of a desklet is bound to a self-updating property of any Control it gets called continuously until eternity every time the control notifies about a change. Although this actually is the bahavior one wants and expects the function call continues even if the desklet is removed and thus the function is non-existent anymore. This in turn results in flooding the log with messages like these: Warning: <function do_time at 0x3181230>(((10, 32, 57),)) has raised an exception while running in main thread. The error was: 'TargetCanvas' object has no attribute '_TargetCanvas__widget' Traceback (most recent call last): File "/home/ronny/.local/lib/gdesklets/utils/__init__.py", line 181, in run_in_main_thread return function(*args) File "<inline '/home/ronny/.gdesklets/Displays/clock- desklet/clock.display_-4083978482491522790'>", line 70, in do_time File "/home/ronny/.local/lib/gdesklets/scripting/ElementWrapper.py", line 18, in __setattr__ self.__target(open).set_prop(name, value) File "/home/ronny/.local/lib/gdesklets/utils/Element.py", line 103, in set_prop setter(key, value) File "/home/ronny/.local/lib/gdesklets/display/TargetCanvas.py", line 232, in _setp_graphics self.__render(value) File "/home/ronny/.local/lib/gdesklets/display/TargetCanvas.py", line 193, in __render self.__redraw() File "/home/ronny/.local/lib/gdesklets/display/TargetCanvas.py", line 204, in __redraw w, h = self.__widget.size_request() AttributeError: 'TargetCanvas' object has no attribute '_TargetCanvas__widget' ==========================================================[02/26/12-11:32:58]=== Warning: <function do_time at 0x3181230>(((10, 32, 58),)) has raised an exception while running in main thread. The error was: 'TargetCanvas' object has no attribute '_TargetCanvas__widget' Traceback (most recent call last): File "/home/ronny/.local/lib/gdesklets/utils/__init__.py", line 181, in run_in_main_thread return function(*args) File "<inline '/home/ronny/.gdesklets/Displays/clock- desklet/clock.display_-4083978482491522790'>", line 70, in do_time File "/home/ronny/.local/lib/gdesklets/scripting/ElementWrapper.py", line 18, in __setattr__ self.__target(open).set_prop(name, value) File "/home/ronny/.local/lib/gdesklets/utils/Element.py", line 103, in set_prop setter(key, value) File "/home/ronny/.local/lib/gdesklets/display/TargetCanvas.py", line 232, in _setp_graphics self.__render(value) File "/home/ronny/.local/lib/gdesklets/display/TargetCanvas.py", line 193, in __render self.__redraw() File "/home/ronny/.local/lib/gdesklets/display/TargetCanvas.py", line 204, in __redraw w, h = self.__widget.size_request() AttributeError: 'TargetCanvas' object has no attribute '_TargetCanvas__widget' Shouldn't the binding of a specific inline-script variable to an update callback be broken on desklet removal? The bug can be reproduced with at least version 0.36.3 up to the latest bazar revision (187) by adding e.g. Martin Grimme's clock-desklet and then removing it again. (other deklets that use the time property of ITime control produce the same results for me) It seems that once an inline function of a desklet is bound to a self-updating property of any Control it gets called continuously until eternity every time the control notifies about a change. Although this actually is the bahavior one wants and expects the function call continues even if the desklet is removed and thus the function is non-existent anymore. This in turn results in flooding the log with messages like these: Warning: <function do_time at 0x3181230>(((10, 32, 57),)) has raised an exception while running in main thread. The error was: 'TargetCanvas' object has no attribute '_TargetCanvas__widget' Traceback (most recent call last):   File "/home/ronny/.local/lib/gdesklets/utils/__init__.py", line 181, in run_in_main_thread     return function(*args)   File "<inline '/home/ronny/.gdesklets/Displays/clock- desklet/clock.display_-4083978482491522790'>", line 70, in do_time   File "/home/ronny/.local/lib/gdesklets/scripting/ElementWrapper.py", line 18, in __setattr__     self.__target(open).set_prop(name, value)   File "/home/ronny/.local/lib/gdesklets/utils/Element.py", line 103, in set_prop     setter(key, value)   File "/home/ronny/.local/lib/gdesklets/display/TargetCanvas.py", line 232, in _setp_graphics     self.__render(value)   File "/home/ronny/.local/lib/gdesklets/display/TargetCanvas.py", line 193, in __render     self.__redraw()   File "/home/ronny/.local/lib/gdesklets/display/TargetCanvas.py", line 204, in __redraw     w, h = self.__widget.size_request() AttributeError: 'TargetCanvas' object has no attribute '_TargetCanvas__widget' Shouldn't the binding of a specific inline-script variable to an update callback be broken on desklet removal? The bug can be reproduced with at least version 0.36.3 up to the latest bazar revision (187) by adding e.g. Martin Grimme's clock-desklet and then removing it again. (other deklets that use the time property of ITime control produce the same results for me)
2012-02-26 14:25:18 Joe Sapp gdesklets: milestone release-of-0.36.4
2012-02-26 14:25:29 Joe Sapp gdesklets: importance Undecided Medium
2012-02-27 19:37:41 Joe Sapp attachment added bug_941337.patch https://bugs.launchpad.net/gdesklets/+bug/941337/+attachment/2788736/+files/bug_941337.patch
2012-03-01 10:05:04 Ronny Lorenz attachment added This patch fixes the problem of 'lost' control wrappers https://bugs.launchpad.net/gdesklets/+bug/941337/+attachment/2796828/+files/bug_941337_fix.patch
2012-03-01 12:17:34 Ronny Lorenz attachment removed This patch fixes the problem of 'lost' control wrappers https://bugs.launchpad.net/gdesklets/+bug/941337/+attachment/2796828/+files/bug_941337_fix.patch
2012-03-01 12:17:55 Ronny Lorenz attachment added This patch fixes the problem of 'lost' control wrappers https://bugs.launchpad.net/gdesklets/+bug/941337/+attachment/2797144/+files/bug_941337_fix2.patch
2012-03-01 22:06:12 Joe Sapp gdesklets: assignee Ronny Lorenz (raumzeit)
2012-03-01 22:06:20 Joe Sapp gdesklets: status New Confirmed
2012-03-13 00:35:34 Ronny Lorenz attachment added Final patch for better ControlWrapper handling https://bugs.launchpad.net/gdesklets/+bug/941337/+attachment/2859757/+files/gdesklets_bug941337.patch
2012-03-14 02:05:30 Ronny Lorenz gdesklets: status Confirmed Fix Committed