From 823c3b20b598c6c718be381139cfc16f93443686 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Mon, 11 Mar 2013 09:21:48 +0100 Subject: [PATCH] Fix a segfault when the connection is dropped The error dialog window was created on the "tick" thread, causing a crash in GTK. Fix it by moving its invocation to the main thread. --- src/virtManager/engine.py | 5 +++-- todo.txt | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/virtManager/engine.py b/src/virtManager/engine.py index 0d2e9ce7..d0bbbaaa 100644 --- a/src/virtManager/engine.py +++ b/src/virtManager/engine.py @@ -291,8 +291,9 @@ class vmmEngine(vmmGObject): logging.debug("Closing connection since libvirtd " "appears to have stopped") else: - self.err.show_err(_("Error polling connection '%s': %s") % - (conn.get_uri(), e)) + error_msg = _("Error polling connection '%s': %s") \ + % (conn.get_uri(), e) + self.idle_add(lambda: self.err.show_err(error_msg)) self.idle_add(conn.close) diff --git a/todo.txt b/todo.txt index 9f0e37dd..e377bc9b 100644 --- a/todo.txt +++ b/todo.txt @@ -26,7 +26,6 @@ website: wiki-ify the whole thing, drop static content, move site styling into v Misc issues =========== -If libvirt connection is dropped, app segfaults segfault if open test:///default, then try and open testdriver that libvirt can't parse XML