Skip to content

Fix GTK crashes and GUI freezes during driver installation - #463

Draft
SinghCod3r wants to merge 1 commit into
fix-spinner-uifrom
fix-installation-freezes
Draft

Fix GTK crashes and GUI freezes during driver installation#463
SinghCod3r wants to merge 1 commit into
fix-spinner-uifrom
fix-installation-freezes

Conversation

@SinghCod3r

Copy link
Copy Markdown
Collaborator

While testing printer installation, I ran into a few serious bugs where the application would either crash entirely (SIGSEGV) or freeze up and trigger GNOME's "Not responding" dialog. This PR cleans up the threading and event loop handling to make the whole process smooth:

  1. Fixed OpenPrinting threading crashes: Network callbacks were emitting GTK signals directly from a background thread. I wrapped these in GLib.idle_add so they are safely marshaled to the main thread.

  2. Fixed GTK-CRITICAL layout errors: The "Searching for drivers" dialog was being destroyed right when GTK was pumping the event loop for layout updates. Deferring the destruction fixes the crash.

  3. Fixed PackageKit UI freezes:

  • D-Bus activation for PackageKit was running synchronously on the main thread, which blocked the entire app for ~10 seconds if the daemon had to start up. I moved this activation into a background thread.
  • The PackageKit driver installation helper script was blocking Python's stdout.readline(). I switched the polling loop to use non-blocking select() so the GTK UI stays completely responsive.
  1. Swapped modal popups for inline spinners: To match the recent UI cleanup, I completely removed the old modal "Searching" popups and wired both OpenPrinting and local PPD loading to use the new inline spinner.

The whole lookup and installation flow feels much faster and more stable now!

- Fix SIGSEGV by wrapping OpenPrinting signal emissions in GLib.idle_add
- Fix GTK-CRITICAL layout errors by deferring search dialog destruction
- Prevent PackageKit DBus activation from blocking the main GTK loop
- Prevent PackageKit DBus polling from freezing the GUI by using select
- Replace deprecated modal searching dialogs with inline spinners
@SinghCod3r
SinghCod3r changed the base branch from master to fix-spinner-ui September 11, 2026 07:23
@SinghCod3r

Copy link
Copy Markdown
Collaborator Author

This Comment is For Me !

I think i should use the import on the top. Therefore i should fix those in next commit. But i'll wait as this whole pr worked in my case but sure with global work.

@alexpevzner
alexpevzner self-requested a review September 11, 2026 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant