When I run okular to show a PDF file (doesn't matter which, http://www.debian.org/doc/manuals/debian-faq/debian-faq.en.pdf for example) and select VIew -> Presentation (or press Ctrl+Shift+P), the screen that okular is configured to present on is covered by a gray window. This only happens for PDF files, eps/ps/jpg/txt files do not exhibit the behavior. I cannot interact with this window (Pressing B, Esc, or clicking does nothing), and the main window stops repainting or reacting to mouse or keyboard commands as well. strace-ing shows open("/etc/cups/client.conf", O_RDONLY) = -1 ENOENT (No such file or directory) socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 14 setsockopt(14, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 setsockopt(14, SOL_SOCKET, 0xf /* SO_??? */, [1], 4) = -1 ENOPROTOOPT (Protocol not available) setsockopt(14, SOL_TCP, TCP_NODELAY, [1], 4) = 0 fcntl(14, F_SETFD, FD_CLOEXEC) = 0 fcntl(14, F_GETFL) = 0x2 (flags O_RDWR) fcntl(14, F_SETFL, O_RDWR|O_NONBLOCK) = 0 connect(14, {sa_family=AF_INET, sin_port=htons(631), sin_addr=inet_addr("10.125.2.134")}, 16) = -1 EINPROGRESS (Operation now in progress) fcntl(14, F_SETFL, O_RDWR) = 0 poll([{fd=14, events=POLLIN|POLLOUT}], 1, 250) = 0 (Timeout) poll([{fd=14, events=POLLIN|POLLOUT}], 1, 250) = 0 (Timeout) poll([{fd=14, events=POLLIN|POLLOUT}], 1, 250) = 0 (Timeout) poll([{fd=14, events=POLLIN|POLLOUT}], 1, 250) = 0 (Timeout) poll([{fd=14, events=POLLIN|POLLOUT}], 1, 250) = 0 (Timeout) .... 10.125.2.13 is a printer that my cups seems to have picked up automatically, but is not reachable at the moment. After 30 seconds (or immediately if I'm not connected to a network), okular renders the presentation and resumes working. Printing or Print preview show the same symptoms (minus the grey window). Full Screen works fine. While waiting for anything from the network before rendering UI is a bad idea, I could understand that if I would actually want to print. There should be no need to contact the printer upon entering presentation mode. Reproducible: Always Steps to Reproduce: 1. Open a PDF document 2. Press Ctrl+Shift+P Actual Results: Okular is unresponsible for 30 seconds Expected Results: When entering presentation mode, not contact the printer in the first place. When entering the printing dialog: Contacting the printer asynchronously or in another thread. debian sid
That's really weird. Can you please do this? Install gdb and okular debug symbols package gdb okular write "run" in the gdb command line now load your pdf and enter the preview mode when everything is unresponsive, switch back to the gdb terminal, press Ctrl+C and type "thread apply all bt" and attach the output here.
Created attachment 84551 [details] gdb backtrace during hang
Thanks for the answer, I've attached the backtrace.
Ok, the backtrace helps finding out what's the problem, will need some reworking to make it work, it's really an unfortunate side effect.
*** Bug 341118 has been marked as a duplicate of this bug. ***
I had also reported this bug here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=740707 Any news? The problem still exists, 15 months later… :(
On Mageia, the following stopgap measure was applied in Jan 2015 until this is properly fixed: http://svnweb.mageia.org/packages/cauldron/okular/current/SOURCES/okular-4.14.3-revert-show-paper-size-names-to-avoid-freeze.patch?revision=811673&view=markup
Met this bug after upgrading to Kubuntu 15.04, which provides Okular Version 0.21.3 from KDE 4.14.6 (also installed Plasma 5.3 Beta from ppa:kubuntu-ppa/beta, but don't think this affects Okular). This bug is unbearable if a pdf document has varying page sizes: Okular locks up at all transitions to a differently sized page. No errors (kdebugdialog used) and no CPU usage while Okular is unresponsive. strace has been the friend who hinted at this workaround: - install package printer-driver-cups-pdf, which provides a virtual (always local) PDF printer - set this PDF printer as the default printer in KDE Control Panel - also had to remove the setting of a network printer I had in ~/.cups/lpoptions May I hope this bug gets fixed while porting Okular to KF5? Thanks.
(In reply to Marco Gamberoni from comment #8) > Met this bug after upgrading to Kubuntu 15.04, which provides Okular Version > 0.21.3 from KDE 4.14.6 (also installed Plasma 5.3 Beta from > ppa:kubuntu-ppa/beta, but don't think this affects Okular). > This bug is unbearable if a pdf document has varying page sizes: Okular > locks up at all transitions to a differently sized page. > No errors (kdebugdialog used) and no CPU usage while Okular is unresponsive. > strace has been the friend who hinted at this workaround: > - install package printer-driver-cups-pdf, which provides a virtual > (always local) PDF printer > - set this PDF printer as the default printer in KDE Control Panel > - also had to remove the setting of a network printer I had in > ~/.cups/lpoptions > > May I hope this bug gets fixed while porting Okular to KF5? > Thanks. Forgot to say: here Okular hangs in normal mode, polling the default printer if unreachable. The presentation mode the title of this bug refers to, does not matter; or the bug has worsened meanwhile. "Upgrading to Kubuntu 15.04" from Kubuntu 14.10, which was unaffected. Probably downstream they dropped a patch in the transition.
Same issue on Kubuntu 14.04 64 bits. If I install package cups-pdf and set the default printer to be the PDF printer, presentation mode works again. Installed: 4:4.14.2-0ubuntu1~ubuntu14.04~ppa1 Candidate: 4:4.14.2-0ubuntu1~ubuntu14.04~ppa1 Version table: *** 4:4.14.2-0ubuntu1~ubuntu14.04~ppa1 0 500 http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu/ trusty/main amd64 Packages 100 /var/lib/dpkg/status 4:4.13.3-0ubuntu0.1 0 500 http://no.archive.ubuntu.com/ubuntu/ trusty-updates/universe amd64 Packages 4:4.13.0-0ubuntu1 0 500 http://no.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
This bug report is related to the Mageia-5 bug report: https://bugs.mageia.org/show_bug.cgi?id=16330 Steps to Reproduce: 1. Give Okular (V.4.14.3) a PDF file (see example above) 2. Ask it to print 'from 1 to 1' (on local USB HP5520): Successful. 3. Ask it to print 'from 2 to 2'. Nothing seems to happen, but if then call HP Print Manager, it, too, freezes with an empty window, and Okular is unresponsive. 4. Force Okular and HP Print Manager to terminate. 5. Page 2 is then printed! [No problem if same exercise is repeated using LibreOffice Writer.]
Still valid in Mageia 6 today with okular 16.04.3: https://bugs.mageia.org/show_bug.cgi?id=16330