[Bug 2150178] Re: update-manager crashes due to Gtk.Window.run() in BuilderDialog
Arnab Patra
2150178 at bugs.launchpad.net
Fri Apr 24 08:11:55 UTC 2026
I tested this code path with a minimal GTK3 example by calling .run() on a Gtk.Window, which resulted in:
AttributeError: 'Window' object has no attribute 'run'.
This confirms that .run() is not valid for Gtk.Window.
However, I have not been able to reproduce a real-world scenario in
update-manager where window_dialog is actually a Gtk.Window at runtime.
It appears that in normal usage it is expected to be a Gtk.Dialog coming
from the UI definition.
So this seems more like a potential type-safety / API misuse issue
rather than a reproducible crash in production.
As an alternative safer approach, I also considered:
if isinstance(self.window_dialog, Gtk.Dialog):
self.window_dialog.run()
else:
self.window_dialog.show()
This preserves the intended behavior for dialogs while avoiding calling
.run() on unsupported widget types.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to update-manager in Ubuntu.
https://bugs.launchpad.net/bugs/2150178
Title:
update-manager crashes due to Gtk.Window.run() in BuilderDialog
Status in update-manager package in Ubuntu:
New
Bug description:
In UpdateManager/Dialogs.py, BuilderDialog.run() calls
self.window_dialog.run(), which causes a crash because
Gtk.Window does not support the run() method (only Gtk.Dialog does).
This leads to a runtime error when the dialog is shown.
Proposed fix:
Replace run() with show_all(), since update-manager already runs
inside the GTK main loop.
Patch attached.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/update-manager/+bug/2150178/+subscriptions
More information about the foundations-bugs
mailing list