Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-3033

QPrinter: constructor hangs when CUPS server or printer is unreachable

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.6.1
    • 4.4.3
    • GUI: Printing
    • None
    • 0295f8da10d6c920511d09f9e506b8bed8c444c3

    Description

      The QPrinter constructor hangs if the CUPS server, or a printer attempted accessed by the CUPS server, is unreachable. This may freeze the GUI, and should be avoided.

      Following is the stack trace from starting Designer when a printer is unreachable from the CUPS server:

      Program received signal SIGINT, Interrupt.
      [Switching to Thread 0xb638a6d0 (LWP 4230)]
      0xffffe430 in __kernel_vsyscall ()
      (gdb) bt
      #0 0xffffe430 in __kernel_vsyscall ()
      #1 0xb6672e41 in connect () from /lib/libpthread.so.0
      #2 0xb3febbdf in httpAddrConnect () from /usr/lib/libcups.so.2
      #3 0xb3feaac6 in httpReconnect () from /usr/lib/libcups.so.2
      #4 0xb3feb32c in httpConnectEncrypt () from /usr/lib/libcups.so.2
      #5 0xb4001414 in cupsGetPPD2 () from /usr/lib/libcups.so.2
      #6 0xb400162c in cupsGetPPD () from /usr/lib/libcups.so.2
      #7 0xb70cbe56 in QCUPSSupport::setCurrentPrinter (this=0xbf97b9ec, index=4) at /home/sthomassen/dev/qt-44/src/gui/painting/qcups.cpp:158
      #8 0xb70c5bdc in QPrinterInfo::availablePrinters () at /home/sthomassen/dev/qt-44/src/gui/painting/qprinterinfo_unix.cpp:797
      #9 0xb70c5e91 in QPrinterInfo::defaultPrinter () at /home/sthomassen/dev/qt-44/src/gui/painting/qprinterinfo_unix.cpp:828
      #10 0xb7039d41 in QPrinter (this=0x84e45ec, mode=QPrinter::HighResolution) at /home/sthomassen/dev/qt-44/src/gui/painting/qprinter.cpp:567
      #11 0x0809e9e7 in QDesignerActions (this=0x84e4558, workbench=0x811ff80) at /home/sthomassen/dev/qt-44/tools/designer/src/designer/qdesigner_actions.cpp:182
      #12 0x0808136c in QDesignerWorkbench::initialize (this=0x811ff80) at /home/sthomassen/dev/qt-44/tools/designer/src/designer/qdesigner_workbench.cpp:282
      #13 0x080878ff in QDesignerWorkbench (this=0x811ff80) at /home/sthomassen/dev/qt-44/tools/designer/src/designer/qdesigner_workbench.cpp:163
      #14 0x08077d66 in QDesigner::initialize (this=0xbf97c398) at /home/sthomassen/dev/qt-44/tools/designer/src/designer/qdesigner.cpp:182
      #15 0x08078ba2 in QDesigner (this=0xbf97c398, argc=@0xbf97c400, argv=0xbf97c484) at /home/sthomassen/dev/qt-44/tools/designer/src/designer/qdesigner.cpp:66
      #16 0x08076b14 in main (argc=1, argv=0xbf97c484) at /home/sthomassen/dev/qt-44/tools/designer/src/designer/main.cpp:38

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kjernase Trond Kjernåsen (Inactive)
            sthomass Stian Sandvik Thomassen (closed Nokia identity) (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes