Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 512650

Summary: PrintAction.calculateEnabled() hangs UI
Product: [Tools] GEF Reporter: Patrick Tasse <patrick.tasse>
Component: GEF-Legacy GEF (MVC)Assignee: gef-inbox <gef-inbox>
Status: RESOLVED NOT_ECLIPSE QA Contact:
Severity: normal    
Priority: P3 CC: guy.perron, malaperle, nyssen, simon.delisle
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Patrick Tasse CLA 2017-02-23 11:07:19 EST
There is a bug in Gnome (https://bugzilla.gnome.org/show_bug.cgi?id=686838) that can cause the SWT call OS.gtk_enumerate_printers() to hang in method Printer.getPrinterList(). Also refer to Bug 215234.

To workaround this bug, GEF should avoid calling this method in PrintAction.calculateEnabled(), as it can lead to complete UI freeze of the Eclipse application.
Comment 1 Marc-André Laperle CLA 2017-03-01 09:57:51 EST
Patrick, next time it happens on your system, perhaps you can prepare a patch? It sounds like it could be a simple fix on the GEF side. Of course it could still happen for other callers of gtk_enumerate_printers but it's still an improvement.
Comment 2 Alexander Nyßen CLA 2017-05-01 13:44:53 EDT
I don't think that's a GEF problem. The implementation within PrintAction seems to be fine, it does not make sense to enable it when no printers are available. Resolving as NOT_ECLIPSE.