In UpdatesAvailable.py:toggle_from_items(), when the user toggles an update 
checkbox, the code calls apt_pkg.ProblemResolver.resolve_by_keep() to fix any 
dependency breakage. If the system has held broken packages, this throws 
apt_pkg.Error: Unable to correct problems, you have held broken packages — 
which is unhandled and crashes the entire Software Updater UI.
    
    Full traceback from the reporter's journal:
    
    File "/usr/lib/python3/dist-packages/UpdateManager/UpdatesAvailable.py", 
line 1097, in on_update_toggled
      self.toggle_from_items(data.group.items)
    File "/usr/lib/python3/dist-packages/UpdateManager/UpdatesAvailable.py", 
line 1136, in toggle_from_items
      Fix.resolve_by_keep()
    apt_pkg.Error: E:Unable to correct problems, you have held broken packages.


Wrap the resolve_by_keep() call in try/except apt_pkg.Error. If the resolver 
fails, log a warning and continue — the UI stays responsive and the user can 
still work with the update list. The worst case is that the package selection 
remains in a broken state, which is strictly better than the entire application 
crashing.

** Patch added: "update-manager-resolve-crash.patch"
   
https://bugs.launchpad.net/ubuntu/+source/update-manager/+bug/2150239/+attachment/5971441/+files/update-manager-resolve-crash.patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2150239

Title:
  Software Updates hangs / crashes when toggling checkboxes in the list
  of available updates

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/update-manager/+bug/2150239/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to