Bug 351306 - Okular freezes while pages are passed
Summary: Okular freezes while pages are passed
Status: RESOLVED NOT A BUG
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 0.22.0
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-14 19:14 UTC by Brallan Aguilar
Modified: 2015-09-07 18:09 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brallan Aguilar 2015-08-14 19:14:20 UTC
In absolutely all PDF files (with or without annotations, with a little or much pages), so often when I'm scrolling a page (with the mouse scrolling edge or up and down buttons of the keyboard) and it's changing to the other one, Okular freezes. The duration of that is around 4 seconds.

Reproducible: Always

Steps to Reproduce:
1. Open any PDF with two or more pages (regardless if it has annotations)
2. Begin changing among pages
3. Just in the limit where both pages are changing, Okular freezes



KDE Platform version 4.14.9
Comment 1 Albert Astals Cid 2015-08-15 15:47:21 UTC
does top show the cpu going to 100%?
Comment 2 Brallan Aguilar 2015-08-15 15:53:23 UTC
(In reply to Albert Astals Cid from comment #1)
> does top show the cpu going to 100%?

No, my CPU acts normally.
Comment 3 Jonathan Verner 2015-08-16 06:35:46 UTC
Sometimes similar behaviour happens to me when the disk is busy (I usually use atop to find out)...
Comment 4 Albert Astals Cid 2015-08-16 22:18:35 UTC
Is your disk busy as Jonathan suggests?
Comment 5 Brallan Aguilar 2015-08-17 14:46:47 UTC
No. When it freezes, I don't see any high disk I/O activity. I checked it with iostat while changing pages.
Comment 6 Albert Astals Cid 2015-08-17 18:11:22 UTC
Can you record a video and upload it somewhere so we see what happens? Also try resizing the window while the freeze is happening.
Comment 7 Brallan Aguilar 2015-08-18 06:51:33 UTC
(In reply to Albert Astals Cid from comment #6)
> Can you record a video and upload it somewhere so we see what happens? Also
> try resizing the window while the freeze is happening.

In the next link you have two videos with statistics provided by the console (with atop using disk activity option): the first one using only my keyboard to pass every page, and the second one using the touch-pad. I worked with two random eBooks. For the video with the keyboard, in some cases I maintained pressed the 'down' key all the time. Also I kept pressing that button repetitively (to clarify that when you see so fast intermittent pauses while the page is going down is not because it is freezing at those moments but I was pull down the down key and immediately I released it).  If you see high CPU consumption in the shell, it's because the video recording and not for the process of scrolling pages.

https://spideroak.com/browse/share/hikari/Okular/VideoOkular/
Comment 8 Brallan Aguilar 2015-08-19 06:11:26 UTC
Another observation: in some cases when I use the "Contents" menu and select a chapter or something like, Okular freezes too a piece of seconds.
Comment 9 Albert Astals Cid 2015-08-19 22:16:11 UTC
Just to make sure plase, attach one of the documents you're using
Comment 10 Brallan Aguilar 2015-08-19 22:31:01 UTC
(In reply to Albert Astals Cid from comment #9)
> Just to make sure plase, attach one of the documents you're using

Ok. I added a file in https://spideroak.com/browse/share/hikari/Okular/VideoOkular/. Try to change among pages 502 and 503, (section 18.2) for example. Also, try to go to different sections in "Contents" menu.
Comment 11 Albert Astals Cid 2015-08-19 22:49:33 UTC
can't reproduce any kind of slowlyness, everything is silky smooth, can you removing (save them before in case you want to restore them) the files at .kde/share/config/okular* and see if it makes any difference?
Comment 12 Brallan Aguilar 2015-08-19 23:06:05 UTC
(In reply to Albert Astals Cid from comment #11)
> can't reproduce any kind of slowlyness, everything is silky smooth, can you
> removing (save them before in case you want to restore them) the files at
> .kde/share/config/okular* and see if it makes any difference?

Sorry, but no changes.
Comment 13 Albert Astals Cid 2015-08-19 23:13:02 UTC
This is unfortunately as far as i can go since i can't reproduce it.

If you're technically minded i suggest seeing if strace shows something weird or if by using gdb you can see where the process is stuck.

If you find something interesting there we may have something to work on, otherwise with no way to reproduce it ourselves it's almost impossible to fix.
Comment 14 Brallan Aguilar 2015-08-25 18:43:52 UTC
I found a strange behavior. When I deactivate my internet connection, Okular works smoothly, there is not freezing.
Comment 15 Albert Astals Cid 2015-08-25 20:36:18 UTC
That's *very* strange

strace or ltrace in both situations(with and without internet) may show something different and help debug the issue.
Comment 16 Brallan Aguilar 2015-08-27 01:44:14 UTC
(In reply to Albert Astals Cid from comment #15)
> That's *very* strange
> 
> strace or ltrace in both situations(with and without internet) may show
> something different and help debug the issue.

There are two new files in https://spideroak.com/browse/share/hikari/Okular/VideoOkular/.
One of them is Okular working with Internet and the other without it. While I was scrolling pages, I could identify a similar behavior when the page were changed completely. Maybe these lines help (I paused the console where a page changed to catch them, it not is accurate):

   Without Internet: line 65194
   With Internet: line 50522
Comment 17 Albert Astals Cid 2015-08-27 22:40:25 UTC
Something is making a dns request (186.177.67.145" is your dns server i gather) for "compu".

Seems to me your cups configuration or something else is trying to reach something you have configured as "compu" and is failing.
Comment 18 Brallan Aguilar 2015-08-28 18:39:53 UTC
(In reply to Albert Astals Cid from comment #17)
> Something is making a dns request (186.177.67.145" is your dns server i
> gather) for "compu".
> 
> Seems to me your cups configuration or something else is trying to reach
> something you have configured as "compu" and is failing.

Do you need any additional information?
Comment 19 Albert Astals Cid 2015-08-29 14:33:23 UTC
I can't do more than hint at what may be happening, okular is not the one directly doing that web request, something in your system is, probably cups, but that's just a random guess, i'd suggest you to use gdb to start okular and be fast enough so that while okular is frozen you go to gdb, Ctrl+C and take a backtrace of what's going on.

Do you know how to use gdb?
Comment 20 Brallan Aguilar 2015-09-02 18:02:49 UTC
(In reply to Albert Astals Cid from comment #19)
> I can't do more than hint at what may be happening, okular is not the one
> directly doing that web request, something in your system is, probably cups,
> but that's just a random guess, i'd suggest you to use gdb to start okular
> and be fast enough so that while okular is frozen you go to gdb, Ctrl+C and
> take a backtrace of what's going on.
> 
> Do you know how to use gdb?

I'm sorry but I don't know how to perform debugging  with it. I will looking up but if you have some specific steps to give you better information, would be the best.
Comment 21 Albert Astals Cid 2015-09-02 20:27:31 UTC
do this in a terminal
gdb okular
run
   Open the file in okular and make it get "frozen"
   Quickly change to the terminal where you are running gdb before it unfreezes
   Press Ctrl+C
backtrace

And attach the output
Comment 22 Brallan Aguilar 2015-09-04 23:22:58 UTC
I removed my printer (I had only one) from "Printers" menu in "System Settings" and Okular works perfectly. No more delays.
Comment 23 Albert Astals Cid 2015-09-07 18:09:43 UTC
I told you ages ago to investigate if the printers where involved, thanks for ignoring me for so long