[Okular-devel] [okular] [Bug 358634] New: Hang waiting for print server to get page shape

Dr. David Alan Gilbert via KDE Bugzilla (rh) bugzilla_noreply at kde.org
Wed Jan 27 11:15:27 UTC 2016


https://bugs.kde.org/show_bug.cgi?id=358634

            Bug ID: 358634
           Summary: Hang waiting for print server to get page shape
           Product: okular
           Version: unspecified
          Platform: Fedora RPMs
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: printing
          Assignee: okular-devel at kde.org
          Reporter: dgilbert at redhat.com

When opening a document okular tries to get page sizes from cups; but if the
printer configured is on an unreachable/unresolvable server, okular will hang
for 10s of seconds every time you move between pages.

(Fedora RPM okular-15.04.2-2.fc23.x86_64)
Backtrace below.  I'd have some sympathy if this needs punting to one of the
libraries or cups; but I'm not really sure who needs to deal with this better. 
 I've seen some applications on other platforms deal with this type of look up
in the background.

Reproducible: Always

Steps to Reproduce:
1. Configure a printer on a remote host where the remote host is specified
using '.local'; in my case print.local
2. Disconnect the printserver from the network as seen by your host
3. Check it isn't resolved;   ping print.local   - see that it takes ~5s to
return an error
4. reboot host (just to be sure nothing is cached - not sure this stage is
necessary)
5. Open a pdf in okular

Actual Results:  
1. Okular opens but you just see a grey background for ages (10s of seconds)
2. Every time you force a redraw it does the same thing again.

Expected Results:  
1. No hangs - maybe a small pause during startup, but again maybe try to do
this in the background?
2. Certainly no big pauses as you move between pages, one pause waiting for the
device on normal viewing should be enough.

(gdb) where
#0  0x00007f8014cb8bcd in read () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007f8014c40ad8 in _IO_new_file_underflow (fp=0x55750a1858b0) at
fileops.c:592
#2  0x00007f8014c41b0e in __GI__IO_default_uflow (fp=0x55750a1858b0) at
genops.c:435
#3  0x00007f8014c3532a in __GI__IO_getline_info (fp=fp at entry=0x55750a1858b0,
buf=buf at entry=0x7ffef05b16e0 "\025\217u\356\177\177", n=255,
delim=delim at entry=10, extract_delim=extract_delim at entry=1, eof=eof at entry=0x0)
    at iogetline.c:69
#4  0x00007f8014c35438 in __GI__IO_getline (fp=fp at entry=0x55750a1858b0,
buf=buf at entry=0x7ffef05b16e0 "\025\217u\356\177\177", n=<optimized out>,
delim=delim at entry=10, extract_delim=extract_delim at entry=1) at iogetline.c:38
#5  0x00007f8014c342bd in _IO_fgets (buf=0x7ffef05b16e0
"\025\217u\356\177\177", n=<optimized out>, fp=0x55750a1858b0) at iofgets.c:56
#6  0x00007f7fed428fb4 in avahi_resolve_name () at
/lib64/libnss_mdns4_minimal.so.2
#7  0x00007f7fed4295aa in _nss_mdns4_minimal_gethostbyname2_r () at
/lib64/libnss_mdns4_minimal.so.2
#8  0x00007f8014cae2a6 in gaih_inet (name=name at entry=0x7ffef05b2a80
"print.local", service=<optimized out>, req=req at entry=0x7ffef05b2260,
pai=pai at entry=0x7ffef05b2108, naddrs=naddrs at entry=0x7ffef05b2104)
    at ../sysdeps/posix/getaddrinfo.c:971
#9  0x00007f8014cb0f76 in __GI_getaddrinfo (name=<optimized out>,
service=0x7ffef05b2330 "631", hints=0x7ffef05b2260, pai=0x7ffef05b2258) at
../sysdeps/posix/getaddrinfo.c:2417
#10 0x00007f7fee721e31 in httpAddrGetList () at /lib64/libcups.so.2
#11 0x00007f7fee71d0f8 in http_create () at /lib64/libcups.so.2
#12 0x00007f7fee7202a8 in httpConnect2 () at /lib64/libcups.so.2
#13 0x00007f7fee74cd55 in cupsGetPPD3 () at /lib64/libcups.so.2
#14 0x00007f7fee74d12a in cupsGetPPD () at /lib64/libcups.so.2
#15 0x00007f8016d474b9 in QCUPSSupport::setCurrentPrinter(int)
(this=this at entry=0x7ffef05b3750, index=1)
    at painting/qcups.cpp:191
#16 0x00007f8016d4843b in QCUPSSupport::QCUPSSupport() (this=0x7ffef05b3750) at
painting/qcups.cpp:142
#17 0x00007f8016cba2e0 in QPrinter::init(QPrinter::PrinterMode)
(this=this at entry=0x7ffef05b38e0, mode=mode at entry=QPrinter::ScreenResolution) at
painting/qprinter.cpp:688
#18 0x00007f8016cbb7c5 in QPrinter::QPrinter(QPrinter::PrinterMode)
(this=0x7ffef05b38e0, mode=QPrinter::ScreenResolution) at
painting/qprinter.cpp:603
#19 0x00007f7ff3d9e1bd in Okular::DocumentPrivate::namePaperSize(double,
double) const (this=this at entry=0x557507a11d70,
inchesWidth=inchesWidth at entry=8.2683333333333326,
inchesHeight=inchesHeight at entry=11.693333333333333)
    at ../core/document.cpp:175
#20 0x00007f7ff3d9e79f in Okular::DocumentPrivate::localizedSize(QSizeF const&)
const (this=0x557507a11d70, size=...) at ../core/document.cpp:289
#21 0x00007f7ff3d9ebf9 in Okular::Document::pageSizeString(int) const
(this=0x5575079ee490, page=page at entry=10)
    at ../core/document.cpp:3057
#22 0x00007f7ff40d04ff in PageSizeLabel::notifyCurrentPageChanged(int, int)
(this=
    0x557507b2a750, previousPage=<optimized out>, currentPage=10) at
../ui/pagesizelabel.cpp:32
#23 0x00007f7ff3da3768 in
Okular::Document::setViewport(Okular::DocumentViewport const&,
Okular::DocumentObserver*, bool) (this=0x5575079ee490, viewport=...,
excludeObserver=excludeObserver at entry=0x0, smoothMove=smoothMove at entry=false)
at ../core/document.cpp:3456
#24 0x00007f7ff40e281d in PageView::slotScrollDown(bool) (this=0x557507b168c0,
singleStep=<optimized out>)
    at ../ui/pageview.cpp:4857
#25 0x00007f7ff40e9856 in PageView::keyPressEvent(QKeyEvent*)
(this=0x557507b168c0, e=0x7ffef05b4050)
    at ../ui/pageview.cpp:1704
#26 0x00007f8016b79be3 in QWidget::event(QEvent*)
(this=this at entry=0x557507b168c0, event=event at entry=0x7ffef05b4050) at
kernel/qwidget.cpp:8435
#27 0x00007f8016f3e70e in QFrame::event(QEvent*)
(this=this at entry=0x557507b168c0, e=e at entry=0x7ffef05b4050)
    at widgets/qframe.cpp:557
#28 0x00007f8016fc3f5b in QAbstractScrollArea::event(QEvent*)
(this=0x557507b168c0, e=0x7ffef05b4050)
    at widgets/qabstractscrollarea.cpp:996
#29 0x00007f8016b2293c in QApplicationPrivate::notify_helper(QObject*, QEvent*)
(this=this at entry=0x557507741af0, receiver=receiver at entry=0x557507b168c0,
e=e at entry=0x7ffef05b4050) at kernel/qapplication.cpp:4565
#30 0x00007f8016b2aae3 in QApplication::notify(QObject*, QEvent*)
(this=this at entry=0x7ffef05b4a40, receiver=receiver at entry=0x557507b168c0,
e=e at entry=0x7ffef05b4050) at kernel/qapplication.cpp:4006
#31 0x00007f80178ae59a in KApplication::notify(QObject*, QEvent*)
(this=0x7ffef05b4a40, receiver=0x557507b168c0, event=0x7ffef05b4050) at
/usr/src/debug/kdelibs-4.14.16/kdeui/kernel/kapplication.cpp:311
#32 0x00007f8015e618dd in QCoreApplication::notifyInternal(QObject*, QEvent*)
(this=0x7ffef05b4a40, receiver=receiver at entry=0x557507b168c0,
event=event at entry=0x7ffef05b4050) at kernel/qcoreapplication.cpp:955
#33 0x00007f8016b212e6 in qt_sendSpontaneousEvent(QObject*, QEvent*)
(event=event at entry=0x7ffef05b4050, receiver=receiver at entry=0x557507b168c0) at
../../src/corelib/kernel/qcoreapplication.h:234
#34 0x00007f8016b212e6 in qt_sendSpontaneousEvent(QObject*, QEvent*)
(receiver=receiver at entry=0x557507b168c0, event=event at entry=0x7ffef05b4050) at
kernel/qapplication.cpp:5563
#35 0x00007f8016bc8463 in QKeyMapper::sendKeyEvent(QWidget*, bool,
QEvent::Type, int, QFlags<Qt::KeyboardModifier>, QString const&, bool, int,
unsigned int, unsigned int, unsigned int, bool*)
(keyWidget=keyWidget at entry=0x557507b168c0, grab=grab at entry=117,
type=QEvent::KeyPress, code=16777239, modifiers=..., text=...,
autorepeat=false, count=1, nativeScanCode=117, nativeVirtualKey=65366,
nativeModifiers=0) at kernel/qkeymapper_x11.cpp:1866
#36 0x00007f8016bc8972 in QKeyMapperPrivate::translateKeyEvent(QWidget*,
_XEvent const*, bool) (this=0x7ffef05b45c0, keyWidget=0x557507b168c0,
event=0x7ffe00000000, grab=<optimized out>) at kernel/qkeymapper_x11.cpp:1836
#37 0x00007f8016ba25a6 in QApplication::x11ProcessEvent(_XEvent*)
(this=0x7ffef05b4a40, event=event at entry=0x7ffef05b45c0) at
kernel/qapplication_x11.cpp:3556
#38 0x00007f8016bcb249 in x11EventSourceDispatch(GSource*, GSourceFunc,
gpointer) (s=0x55750773edb0, callback=0x0, user_data=0x0) at
kernel/qguieventdispatcher_glib.cpp:148
#39 0x00007f80107d3e3a in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#40 0x00007f80107d41d0 in g_main_context_iterate.isra () at
/lib64/libglib-2.0.so.0
#41 0x00007f80107d427c in g_main_context_iteration () at
/lib64/libglib-2.0.so.0
#42 0x00007f8015e91e8e in
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
(this=0x557507700820, flags=...) at kernel/qeventdispatcher_glib.cpp:450
#43 0x00007f8016bcb3e6 in
QGuiEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
(this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:207
#44 0x00007f8015e60151 in
QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
(this=this at entry=0x7ffef05b49a0, flags=...) at kernel/qeventloop.cpp:149
#45 0x00007f8015e604c5 in
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)
(this=this at entry=0x7ffef05b49a0, flags=...) at kernel/qeventloop.cpp:204
#46 0x00007f8015e66069 in QCoreApplication::exec() () at
kernel/qcoreapplication.cpp:1227
#47 0x0000557506b062eb in main(int, char**) (argc=<optimized out>,
argv=<optimized out>) at ../../shell/main.cpp:64

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Okular-devel mailing list