After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 434318 - printer detail acquisition needs events
printer detail acquisition needs events
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Printing
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2007-04-29 10:33 UTC by Christian Persch
Modified: 2009-09-03 02:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add a test programme for gtk_enumerate_printers and gtk_printer_request_details (6.62 KB, patch)
2007-04-29 10:44 UTC, Christian Persch
none Details | Review

Description Christian Persch 2007-04-29 10:33:26 UTC
Printer details acquisition seems to need UI events to finish.

Steps to reproduce:
0) gtk_enumerate_printers
1) in the callback, call gtk_printer_acquire_details
2) run a GMainLoop until the details are acquired

Results:
Details are never acquired (except for the 'print to file' printer).
Comment 1 Christian Persch 2007-04-29 10:44:37 UTC
Created attachment 87229 [details] [review]
add a test programme for gtk_enumerate_printers and gtk_printer_request_details

Observe the behavious of the test programme with different options:

$ ./testprinterenum
Results: lists all printers, but takes a long time

$ ./testprinterenum --tick
Results: lists all printers, and takes much less time

$ ./testprinterenum --paper-sizes
Results: lists all printers, but details acquisition never comes (or at least not before you run out of patience and kill the programme ;)

$ ./testprinterenum --paper-sizes --tick
Results: lists all printers, and details are acquired after a long delay

$ ./testprinterenum --paper-sizes --ui
Results: lists all printers, and details acquisition succeeds after some time

$ ./testprinterenum --paper-sizes --ui --tick
Results: lists all printers, details acquisition succeeds after a shorter time, but the mainloop is blocked for some length of time (the UI doesn't update continually). It blocks here:

  • #0 __kernel_vsyscall
  • #1 recv
    from /lib/tls/i686/cmov/libc.so.6
  • #2 httpRead2
    from /usr/lib/libcups.so.2
  • #3 _get_read_data
    at gtkcupsutils.c line 1119
  • #4 gtk_cups_request_read_write
    at gtkcupsutils.c line 222
  • #5 cups_dispatch_watch_prepare
    at gtkprintbackendcups.c line 562
  • #6 g_main_context_prepare
    at gmain.c line 2381
  • #7 g_main_context_iterate
    at gmain.c line 2674
  • #8 g_main_loop_run
    at gmain.c line 2898
  • #9 main
    at testprinterenum.c line 188