Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
dev
-
None
-
-
eea2929d8 (dev), c5f9f1b17 (6.6)
Description
The document viewer demo crashes, when the print-button is clicked.
The print action's triggered signal is connected to AbstractViewer::print with
connect(ui->actionPrint, &QAction::triggered, m_viewer, &AbstractViewer::print)
m_viewer holds a pointer to AbstractViewer. The object is alive, its d'tor hasn't been reached.
When the signal is fired, assertObjectType triggers and the application aborts.
The print() codepath isn't reached.
Changing the signal/slot connection to the old-style
connect(ui->actionPrint, SIGNAL(triggered()), m_viewer, SLOT(print())) fixes the problem.
Steps to reproduce:
1. Compile the document viewer demo on macOS (WebEngine / PdfQuick needed)
2. Open any PDF document
3. Hit the print button
Attachments
Issue Links
- depends on
-
QTBUG-118795 FTBFS qtdoc documentviewer example: missing -fPIC -mno-direct-extern-access options
-
- Closed
-
- is duplicated by
-
QTBUG-118671 [DocumentViewer] Clicking print button causes the app to crash
-
- Closed
-
- relates to
-
QTQAINFRA-5914 Qt Test Attack - Q4, 2023
-
- Open
-
- replaces
-
QTBUG-118672 [DocumentViewer] Cannot open PDF files using the app.
-
- Closed
-
For Gerrit Dashboard: QTBUG-118754 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
515831,1 | Document Viewer demo: Work around crashing PMF connection | dev | qt/qtdoc | Status: ABANDONED | 0 | 0 |
516299,5 | Documentviewer: Make AbstractViewer shared/static, depending on build | dev | qt/qtdoc | Status: MERGED | +2 | 0 |
520861,2 | Documentviewer: Make AbstractViewer shared/static, depending on build | 6.6 | qt/qtdoc | Status: MERGED | +2 | 0 |