GNOME Bugzilla – Bug 702634
Handle exceptions in idle_add/timeout_add
Last modified: 2013-06-19 14:22:43 UTC
If an unhandled exception occurs in idle_add/timeout_add the source doesn't get removed, leading to endless calls of the same function which leads to the same exception again... While this is of course a user error, it is really hard to debug errors since stdout/stderr get spamed without end. Possible solutions I can imagine: - Handle in the overrides, print the stacktrace and return False - Somehow make the bool return value in case of an error False in all callbacks.. The following example leads to endless stacktraces, while only one is printed with pygtk. ################################## from gi.repository import GLib, Gtk def faulty_function(): raise Exception GLib.idle_add(faulty_function) Gtk.main()
*** This bug has been marked as a duplicate of bug 702552 ***