From 599d76b70b35f6e6f4c3ad93c280578dec909a2f Mon Sep 17 00:00:00 2001 From: Mike Sheldrake Date: Fri, 25 Jan 2013 12:29:44 -0800 Subject: [PATCH] avoid DBus related crash on Ubuntu #954 An undocumented feature of Net::DBus->session() is that it returns the same connection object it creates the first time it's called for all subsequent calls. Somehow this exposes us to a bug where unref() is called on that object too many times, causing a segfault. Undefining the cached object after we've used it once avoids this. --- lib/Slic3r/GUI.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Slic3r/GUI.pm b/lib/Slic3r/GUI.pm index 737204926..b431d307b 100644 --- a/lib/Slic3r/GUI.pm +++ b/lib/Slic3r/GUI.pm @@ -413,6 +413,7 @@ sub notify { my $notifier = $serv->get_object('/org/freedesktop/Notifications', 'org.freedesktop.Notifications'); $notifier->Notify('Slic3r', 0, $self->{icon}, $title, $message, [], {}, -1); + undef $Net::DBus::bus_session; } }; }