qpdfview frequently freezes upon toggling "views" (ctrl 6, ctrl 8, etc)

Bug #1345551 reported by thinkpad
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qpdfview
Fix Released
Critical
Adam Reichold

Bug Description

Follow-up from #6 and #7 from https://answers.launchpad.net/qpdfview/+question/248990

Playing around with Ctrl 6 .. 9 (the equivalent of for example View > Two Pages)
_often_ (not always...)
freezes qpdfview and consumes significant system resources on my venerable Thinkpad X41. Sometimes it recovers, other times my patience runs out sooner.

Adam had asked me to run/launch qpdfview via the terminal which I did: the following pops up when trying to change the "view" by said shortcuts:

(...)
QPainter::restore: Unbalanced save/restore
(...)
QPainter::setRenderHint: Painter must be active to set rendering hints
(...)
QPainter::setPen: Painter not active
QPainter::opacity: Painter not active
QPainter::brush: Painter not active
QPainter::pen: Painter not active
QPainter::setPen: Painter not active
QPainter::setOpacity: Painter not active
QPainter::drawPath: Painter not active
(...)
QPainter::end: Painter not active, aborted
(...)

This happens to all sorts of different pdf's and does not seem to be related to size. It happens also in pdf's which contain nothing but text (no images).

Revision history for this message
Adam Reichold (adamreichold) wrote :

Hello thinkpad,

Can you give us some background on the operating system you are running and which package and version of qpdfview you use? The issues seem to be related to (our usage of) Qt's painting system, e.g. I will review the code for unbalanced save/restore pairs. We also had another user who had problems using Qt5 and multiple monitors. Maybe you could check whether using a Qt4-based package alleviates the problem? If it doesn't could you maybe pack your configuration files from "~/.config/qpdfview" into an archive and attach it to this bug? Thanks.

Best regards, Adam.

Revision history for this message
Adam Reichold (adamreichold) wrote :

Ok, I quick review of the code showed no unbalanced save/restore pairs or any that are separated by non-trivial control flow. So I think the problem is really that the QPainter handed to use by the QGraphicsView is inactive in the first place. We need to find out why and what changing the view mode has to do with it. (It of course modifies the graphics scene that is displayed but I am not sure what the problem is...) (Trying a Qt4-based package like the dailydebs really seems most promising at the moment.)

Revision history for this message
thinkpad (fellowsgarden) wrote :

I'm on Ubuntu 12.04 LTS. Attached plz find the contents of ~/.config/qpdfview (manually edited qpdfview.conf before uploading).

How to check which Qt I'm using?

Anything else to check?

Revision history for this message
Adam Reichold (adamreichold) wrote :

If you are running Ubuntu 12.04, then you are definitely using Qt4 if you haven't compiled from source or anything. But the version of qpdfview from the about dialog will probably be useful in any case. (Maybe you are using Benjamin Eltzner's PPA?) Next step is that I'll try to reproduce the problem using your configuration which however could take until the weekend, not sure...

Revision history for this message
thinkpad (fellowsgarden) wrote :

qpdfview 0.4.11beta1

(didn't double-check but prob. am using his ppa)

Revision history for this message
Adam Reichold (adamreichold) wrote : Re: [Bug 1345551] Re: qpdfview frequently freezes upon toggling "views" (ctrl 6, ctrl 8, etc)

Hello again,

using the latest code from trunk built against Qt 4 (which is almost
completely identical to what you are running) and using the
configuration files you provided, I could not reproduce the issue you
are seeing immediately. :-( I will try again later...

Best regards, Adam.

Am 21.07.2014 20:15, schrieb thinkpad:
> qpdfview 0.4.11beta1
>
> (didn't double-check but prob. am using his ppa)
>

Revision history for this message
Adam Reichold (adamreichold) wrote :

Hello again,

from another bug report (actually a question) we see similar issues on a different setup that seem to be related to SVG icons. Do you feel comfortable with building from source to disable SVG support? If not, you could try installing an icon theme that provides rasterized icons for "image-loading" and "image-missing" so that the fallback SVG icons do not need to be used.

Best regards, Adam.

Revision history for this message
thinkpad (fellowsgarden) wrote :

Would rather not go down those routes... unless it would really help development :-)

Revision history for this message
Adam Reichold (adamreichold) wrote :

Hello again,

could you try to install an icon theme containing a rasterized "image-loading" icon?

Concerning building from source, if we can't reproduce the problem and you can not localize it on your machine, we'll probably be unable to fix it. (Maybe we can provide you with a modified binary running on Ubuntu 12.04. @Benjamin: Do you have that Ubuntu box running 12.04 still available?)

Best regards, Adam.

Revision history for this message
Adam Reichold (adamreichold) wrote :

Hello,

We may have found the issue concerning the other question I talked about. Could you try to enable tiling the graphics settings or better yet could you try installing the dailydebs from [1] when they have finished building packages for at least trunk revision 1631? (Probably in an hour or so.) Thanks!

if they also resolve your problems, we'll probably need to issue a 0.4.11.1 release since the problem might be substantially affecting the non-tiling code path.

Best regards, Adam.

Revision history for this message
Adam Reichold (adamreichold) wrote :

Hell again,

I of course forget the link to the dailydeb PPA which is

https://code.launchpad.net/~adamreichold/+archive/ubuntu/qpdfview-dailydeb

Since the packages have finished to build, were you able to give them a try?

Best regards, Adam.

Revision history for this message
Adam Reichold (adamreichold) wrote :

Marking this as incomplete since we still depend on feedback w.r.t. running the dailydebs to identify the underlying problem.

Changed in qpdfview:
status: New → Incomplete
Revision history for this message
Adam Reichold (adamreichold) wrote :

Marking as fix released since we did release version 0.4.11.1 fixing the missing bounding rectangle rendering bug which is almost surely the reason for this.

Changed in qpdfview:
status: Incomplete → Fix Released
importance: Undecided → Critical
assignee: nobody → Adam Reichold (adamreichold)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.