Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-128148

REG: Crash when printing

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P1: Critical
    • None
    • 6.7
    • GUI: Printing, QPA: Windows
    • None
    • Windows

    Description

      To reproduce, run the old textedit example (now under tests/manual/examples/widgets/richtext/textedit) and select the File->Print function. Select the "Print to PDF" target (I have not tested with an actual printer since I don't have one available, so this may not be necessary) and press print. Enter a file name in the corresponding dialog and go.

      For me it crashes with the following stack trace:

                                                                                                                                                                                                                                                                                                                                        
      1   std::_Atomic_storage<int,4>::load                                                                               atomic                   1001 0x7ffa54426155 
      2   QAtomicOps<int>::loadRelaxed<int>                                                                               qatomic_cxx11.h          203  0x7ffa54422af6 
      3   QBasicAtomicInteger<int>::loadRelaxed                                                                           qbasicatomic.h           36   0x7ffa54426197 
      4   QWeakPointer<QObject>::internalData                                                                             qsharedpointer_impl.h    752  0x7ffa544891f9 
      5   QPointer<QObject>::data                                                                                         qpointer.h               74   0x7ffa544891b7 
      6   QPointer<QObject>::operator QObject *                                                                           qpointer.h               82   0x7ffa54488f74 
      7   QPrintDialog::done                                                                                              qabstractprintdialog.cpp 377  0x7ffa54496dac 
      8   QPrintDialogPrivate::openWindowsPrintDialogModally                                                              qprintdialog_win.cpp     262  0x7ffa5449b803 
      9   QPrintDialog::setVisible                                                                                        qprintdialog_win.cpp     278  0x7ffa5449b2cc 
      10  QWidget::show                                                                                                   qwidget.cpp              8001 0x7ffa06e1a8e3 
      11  QDialog::open                                                                                                   qdialog.cpp              520  0x7ffa0733b11e 
      12  TextEdit::filePrint                                                                                             textedit.cpp             549  0x7ff681e85d36 
      13  QtPrivate::FunctorCall<QtPrivate::IndexesList<>,QtPrivate::List<>,void,void (__cdecl TextEdit:: *)(void)>::call qobjectdefs_impl.h       145  0x7ff681e9e225 
      14  QtPrivate::FunctionPointer<void (__cdecl TextEdit:: *)(void)>::call<QtPrivate::List<>,void>                     qobjectdefs_impl.h       183  0x7ff681e95f7d 
      15  QtPrivate::QCallableObject<void (__cdecl TextEdit:: *)(void),QtPrivate::List<>,void>::impl                      qobjectdefs_impl.h       556  0x7ff681ea00de 
      16  QtPrivate::QSlotObjectBase::call                                                                                qobjectdefs_impl.h       469  0x7ff9b0d52563 
      17  doActivate<0>                                                                                                   qobject.cpp              4086 0x7ff9b0e1a360 
      18  QMetaObject::activate                                                                                           qobject.cpp              4147 0x7ff9b0e00b18 
      19  QAction::triggered                                                                                              moc_qaction.cpp          485  0x7ff9b265fe59 
      20  QAction::activate                                                                                               qaction.cpp              1105 0x7ff9b265f159 
      ... <More>                                                                                                                                                       
      

      When running in the debugger, it also prints a lot of errors to the console which may or may not be related:

      onecoreuap\printscan\print\winrt\printcontract\unifiedprintdialog\unifiedprintdialoghandler.cpp(381)\Windows.Graphics.Printing.dll!00007FFA7ED33422: (caller: 00007FFA7ED31132) LogHr(1) tid(1424) 8000FFFF Alvorlig feil
      shell\inc\SyncRootUtils.h(62)\COMDLG32.dll!00007FFAB3789BC7: (caller: 00007FFAB3756D49) Exception(1) tid(864) 80070186 Operasjonen kan bare utføres på filer under en skysynkroniseringsrot.
      CallContext:[\PickerModalLoop\InitDialog]

      Exception at 0x7ffab190fabc, code: 0xe06d7363: C++ exception, flags=0x81 (first chance) in COMDLG32!PrintDlgExW

      Exception at 0x7ffab190fabc, code: 0xe06d7363: C++ exception, flags=0x81 (first chance) in COMDLG32!PrintDlgExW
      shell\inc\SyncRootUtils.h(67)\COMDLG32.dll!00007FFAB37D2F2B: (caller: 00007FFAB3756D49) LogHr(1) tid(864) 80070186 Operasjonen kan bare utføres på filer under en skysynkroniseringsrot.
      Msg:[shell\inc\SyncRootUtils.h(62)\COMDLG32.dll!00007FFAB3789BC7: (caller: 00007FFAB3756D49) Exception(1) tid(864) 80070186 Operasjonen kan bare utføres på filer under en skysynkroniseringsrot.
      CallContext:[\PickerModalLoop\InitDialog]
      ] CallContext:[\PickerModalLoop\InitDialog]
      onecore\vm\dv\storage\plan9\rdr\dll\util.cpp(99)\p9np.dll!00007FFAA437F14C: (caller: 00007FFAA4379430) LogHr(1) tid(35e4) C0000034 Msg:[?????????????????????????????????????????????????????/??????????????????????????????????????????????)]
      onecoreuap\printscan\print\workflow\printsupport\dll\printsupportutil.cpp(572)\Print.PrintSupport.Source.dll!00007FFA75266048: (caller: 00007FFA75277227) Exception(1) tid(2e40) 80070490 Elementet ble ikke funnet.

      Exception at 0x7ffab190fabc, code: 0xe06d7363: C++ exception, flags=0x81 (first chance) in Print_PrintSupport_Source

      Exception at 0x7ffab190fabc, code: 0xe06d7363: C++ exception, flags=0x81 (first chance) in Print_PrintSupport_Source!DllCanUnloadNow

      Exception at 0x7ffab190fabc, code: 0xe06d7363: C++ exception, flags=0x81 (first chance) in Print_PrintSupport_Source!DllCanUnloadNow

      Exception at 0x7ffab190fabc, code: 0xe06d7363: C++ exception, flags=0x81 (first chance) in Print_PrintSupport_Source
      Print.PrintSupport.Source.dll!00007FFA75294408: ReturnHr(1) tid(864) 80070490 Elementet ble ikke funnet.
      Msg:[onecoreuap\printscan\print\workflow\printsupport\dll\printsupportutil.cpp(572)\Print.PrintSupport.Source.dll!00007FFA75266048: (caller: 00007FFA75277227) Exception(1) tid(864) 80070490 Elementet ble ikke funnet.
      ]
      Print.PrintSupport.Source.dll!00007FFA75267728: LogHr(1) tid(864) 80070490 Elementet ble ikke funnet.

      Exception at 0x7ffab190fabc, code: 0xe06d7363: C++ exception, flags=0x81 (first chance) in Print_PrintSupport_Source!DllCanUnloadNow

      Exception at 0x7ffab190fabc, code: 0xe06d7363: C++ exception, flags=0x81 (first chance) in Print_PrintSupport_Source
      onecoreuap\printscan\print\workflow\printsupport\dll\printsupportutil.cpp(969)\Print.PrintSupport.Source.dll!00007FFA75295F13: (caller: 00007FFAA62FDB4C) ReturnHr(2) tid(864) 80070490 Elementet ble ikke funnet.
      Msg:[winrt::hresult_error: Elementet ble ikke funnet.]
      Invalid parameter passed to C runtime function.

      This seems to have happened between Qt 6.6 and Qt 6.7 (6.6 branch works fine at time of writing and 6.7 branch crashes.)

      One other notable difference between 6.6 and 6.7 is that when the print dialog opens in the former, the main window stays visible, but in 6.7 the main window is hidden/minimized/pushed to back when the print dialog opens.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            owolff Oliver Wolff
            esabraha Eskil Abrahamsen Blomfeldt
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes