Document Viewer app freezes/crashes on clicking back from pdf files

Bug #1577277 reported by Kristijan Žic 
110
This bug affects 29 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
Critical
Alan Pope 🍺🐧🐱 🦄
Ubuntu Document Viewer App
Fix Released
Undecided
Unassigned
ubuntu-ui-toolkit (Ubuntu)
Incomplete
Low
Unassigned

Bug Description

Device: mako
Channel: rc-proposed

App freezes every time on clicking back arrow when trying to close pdf files and go back to the documents list.
The only solution seems to be closing the app every time I want to open other pdf.
On some occasions, the app will crash by itself when getting out of an pdf.

[EDIT]:
Former DocViewer contributor Stefano Verzegnassi took a look at this bug so I'll just paste his response here:

I've found a few minutes for having a look at this issue, and I guess this has nothing to do with Document Viewer. The component which causes the issue hasn't received any update since an year.

The issue in the DocViewer seems to be the same described in bug #1568016, which sounds to me as a regression in the UI Toolkit.

During the last months a lot of regressions have been introduced with any UITK update, because critical changes are directly committed to a stable target.
As long as core apps should always target the latest version of the toolkit, it should also be granted that a new toolkit update does not break any core app functionality.

Anyway, since the UITK team is actually rewriting many components, I suspect the faulty component of the PDF viewer should be entirely rewritten too, since there's a small chance the issue gets fixed upstream (and that's what they did with the issue at the link below).

I'm no more an active contributor of the Ubuntu Document Viewer, and whoever will join the team should also take care of fixing this.

https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1568016

Related branches

description: updated
summary: - App freezes on clicking back from pdf files
+ Document Viewer app freezes on clicking back from pdf files
Revision history for this message
Kristijan Žic  (kristijan-zic) wrote : Re: Document Viewer app freezes on clicking back from pdf files

Adding a video that shows the bug.

description: updated
Revision history for this message
Anupam (anupam207) wrote :

In case of my E5 phone, the app actually closes after pressing back.

summary: - Document Viewer app freezes on clicking back from pdf files
+ Document Viewer app freezes/crashes on clicking back from pdf files
Changed in ubuntu-docviewer-app:
status: New → Confirmed
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

The referenced UITK fix was landed and the crash is still happening. I assume the hang is while apport is writing the crash file, as subsequent tests crash immediately.

Changed in canonical-devices-system-image:
assignee: nobody → Alan Pope  (popey)
importance: Undecided → Critical
milestone: none → 13
status: New → Confirmed
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

@timp any idea whats happening here?

Changed in ubuntu-docviewer-app:
assignee: nobody → Tim Peeters (tpeeters)
Revision history for this message
adam plaice (adam.plaice) wrote :

I'm not sure if it's relevant, but the crash also occurs when importing a pdf from elsewhere (e.g. the web browser).

To reproduce:
Open a pdf in the Document viewer
Switch to the web browser (without closing the Document viewer)
Navigate to a pdf on the web
Select "Choose an application" -> "Document viewer"
Upon "Download complete" -> "Open"

Document viewer briefly appears (with the previous document visible) and crashes

The crash does not occur when the Document viewer is closed before switching or the screen in the Document viewer, that one switches away from, is the document list, suggesting that this is the same bug as above.

(FWIW I'm also affected by the bug when simply pressing the back button within the Document viewer.)

(Device: BQ E5 (vegetahd))

Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit (Ubuntu):
importance: Undecided → Critical
assignee: nobody → Tim Peeters (tpeeters)
Revision history for this message
Tim Peeters (tpeeters) wrote :

Confirmed in image r562 on Krillin.

Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → Confirmed
Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Tim Peeters (tpeeters) wrote :

Something strange is happening with VerticalView of poppler-qml-plugin. When destroying the page displaying the PDF, the VerticalView in QML reports that it is being destroyed (I added Component.onDestruction: print("destroying VerticalView"), but it is not yet being fully destroyed, and in C++ when calling .isNull() on the VerticalView, it appears to return false.

In ucheader.cpp we detect a change in the header visibility (it is made invisible because it is also being destroyed) which triggers an update in the flickable margins. We always first check there that the flickable is still valide using m_flickable.isNull(), which reports that the flickable is still valid. However, when calling functions on m_flickable, we get a segfault.

This is weird and requires further investigation. But I will attach a branch with a workaround for the document viewer.

Revision history for this message
Tim Peeters (tpeeters) wrote :

The workaround is here https://code.launchpad.net/~tpeeters/ubuntu-docviewer-app/bug1577277-workaround/+merge/304561

I did not mark it yet as fixing the bug because the cause needs further investigation. But the workaround will do it now if we need a quick fix.

Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :

Fix committed into lp:ubuntu-docviewer-app at revision 350, scheduled for release in ubuntu-docviewer-app, milestone ww02-2016

Changed in ubuntu-docviewer-app:
status: Confirmed → Fix Committed
Changed in canonical-devices-system-image:
status: Confirmed → Fix Released
Changed in ubuntu-docviewer-app:
status: Fix Committed → Fix Released
Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit (Ubuntu):
importance: Critical → Low
status: In Progress → Incomplete
Tim Peeters (tpeeters)
Changed in ubuntu-docviewer-app:
assignee: Tim Peeters (tpeeters) → nobody
Changed in ubuntu-ui-toolkit (Ubuntu):
assignee: Tim Peeters (tpeeters) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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