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

QtCreator crashes in logicalDotsPerInchY

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P1: Critical
    • None
    • 6.7.0, 6.7.2
    • GUI: Other
    • None
    • macOS Sonoma 14.4.1
    • macOS

    Description

      In the last weeks, QtCreator has been randomly crashing in logicalDotsPerInchY() in different situations. I'm not sure exactly how to reproduce it, but it seems to be when I switch windows or open a file.

      It might be related to switching or having switched displays. This is on a macbook and I sometimes use QtCreator on the go with the internal screen, or at my desk with an Apple Studio Display. I guess the "dots per inch" could be different for the two screens.

      This is a version of 13.0.2 with a small unrelated patch that I compiled myself.

      The crash report always looks something like this:

      Process:               Qt Creator [99712]
      Path:                  /Users/USER/Downloads/*/Qt Creator.app/Contents/MacOS/Qt Creator
      Identifier:            org.qt-project.qtcreator
      Version:               13.0.2 (13.0.2)
      Code Type:             ARM-64 (Native)
      Parent Process:        launchd.developm [1]
      User ID:               501
      
      Date/Time:             2024-05-28 18:29:12.9939 +0200
      OS Version:            macOS 14.4.1
      Report Version:        12
      Anonymous UUID:        5D420663-FFBB-FAF2-D06D-956965424787
      
      Sleep/Wake UUID:       E5061697-CFA1-4735-AA3D-2B1DC0F801B1
      
      Time Awake Since Boot: 700000 seconds
      Time Since Wake:       9291 seconds
      
      System Integrity Protection: enabled
      
      Crashed Thread:        0  Dispatch queue: com.apple.main-thread
      
      Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
      Exception Codes:       KERN_INVALID_ADDRESS at 0x00000000000003f3
      Exception Codes:       0x0000000000000001, 0x00000000000003f3
      
      Termination Reason:    Namespace SIGNAL, Code 11 Segmentation fault: 11
      Terminating Process:   exc handler [99712]
      
      VM Region Info: 0x3f3 is not in any region.  Bytes before following region: 4343348237
            REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
            UNUSED SPACE AT START
      --->  
            __TEXT                      102e24000-102e44000    [  128K] r-x/r-x SM=COW  /Users/USER/Downloads/*/Qt Creator.app/Contents/MacOS/Qt Creator
      

      Here are three exemplar stack traces of the crashing main thread:

      1.:

      0   QtGui                         	       0x105316a50 QScreen::logicalDotsPerInchY() const + 40
      1   QtWidgets                     	       0x104585bfc QWidget::metric(QPaintDevice::PaintDeviceMetric) const + 396
      2   QtGui                         	       0x105437178 QFont::QFont(QFont const&, QPaintDevice const*) + 56
      3   QtWidgets                     	       0x104579e88 QWidgetPrivate::updateFont(QFont const&) + 132
      4   QtWidgets                     	       0x104579de4 QWidgetPrivate::resolveFont() + 124
      5   QtWidgets                     	       0x104581d3c QWidget::event(QEvent*) + 2152
      6   QtWidgets                     	       0x1045ee344 QFrame::event(QEvent*) + 56
      7   QtWidgets                     	       0x104768110 QAbstractItemView::event(QEvent*) + 464
      8   QtWidgets                     	       0x1045407f4 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 272
      9   QtWidgets                     	       0x104542414 QApplication::notify(QObject*, QEvent*) + 4024
      10  QtCore                        	       0x104c360ec QCoreApplication::notifyInternal2(QObject*, QEvent*) + 204
      11  QtWidgets                     	       0x104577204 QWidget::ensurePolished() const + 80
      12  QtWidgets                     	       0x104577234 QWidget::ensurePolished() const + 128
      13  QtWidgets                     	       0x104577234 QWidget::ensurePolished() const + 128
      14  QtWidgets                     	       0x104577234 QWidget::ensurePolished() const + 128
      15  QtWidgets                     	       0x104580f4c QWidgetPrivate::setVisible(bool) + 792
      16  QtWidgets                     	       0x104580a68 QWidget::setVisible(bool) + 664
      17  QtWidgets                     	       0x10456b8a8 QStackedLayout::setCurrentIndex(int) + 372
      18  libTextEditor.dylib           	       0x10f33f940 TextEditor::Internal::OutlineWidgetStack::updateEditor(Core::IEditor*) + 632
      19  QtCore                        	       0x104c71ca8 void doActivate<false>(QObject*, int, void**) + 728
      20  libLanguageClient.dylib       	       0x128bf85f8 LanguageClient::Client::activateEditor(Core::IEditor*) + 352
      21  libLanguageClient.dylib       	       0x128bf48a8 LanguageClient::Client::activateDocument(TextEditor::TextDocument*) + 600
      22  libLanguageClient.dylib       	       0x128bf3840 LanguageClient::Client::openDocument(TextEditor::TextDocument*) + 2304
      23  libLanguageClient.dylib       	       0x128c6b6c4 LanguageClient::LanguageClientManager::openDocumentWithClient(TextEditor::TextDocument*, LanguageClient::Client*) + 720
      24  libClangCodeModel.dylib       	       0x129a69654 QtPrivate::QCallableObject<ClangCodeModel::Internal::ClangModelManagerSupport::updateLanguageClient(ProjectExplorer::Project*)::$_5::operator()() const::'lambda0'(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) + 1352
      25  QtCore                        	       0x104c71ca8 void doActivate<false>(QObject*, int, void**) + 728
      26  libLanguageClient.dylib       	       0x128bdd5c0 LanguageClient::Client::initialized(LanguageServerProtocol::ServerCapabilities const&) + 52
      27  libLanguageClient.dylib       	       0x128c07244 LanguageClient::ClientPrivate::initializeCallback(LanguageServerProtocol::Response<LanguageServerProtocol::InitializeResult, LanguageServerProtocol::InitializeError> const&) + 4292
      28  libLanguageClient.dylib       	       0x128c25654 LanguageServerProtocol::Request<LanguageServerProtocol::InitializeResult, LanguageServerProtocol::InitializeError, LanguageServerProtocol::InitializeParams>::responseHandler() const::'lambda'(LanguageServerProtocol::JsonRpcMessage const&)::operator()(LanguageServerProtocol::JsonRpcMessage const&) const + 100
      29  libLanguageClient.dylib       	       0x128c00670 LanguageClient::Client::handleMessage(LanguageServerProtocol::JsonRpcMessage const&) + 264
      30  QtCore                        	       0x104c71ca8 void doActivate<false>(QObject*, int, void**) + 728
      31  libLanguageClient.dylib       	       0x128c0846c LanguageClient::InterfaceController::messageReceived(LanguageServerProtocol::JsonRpcMessage const&) + 52
      32  QtCore                        	       0x104c6c7dc QObject::event(QEvent*) + 284
      33  QtWidgets                     	       0x1045407f4 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 272
      34  QtWidgets                     	       0x10454165c QApplication::notify(QObject*, QEvent*) + 512
      35  QtCore                        	       0x104c360ec QCoreApplication::notifyInternal2(QObject*, QEvent*) + 204
      36  QtCore                        	       0x104c36e7c QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 528
      37  libqcocoa.dylib               	       0x10301a168 QCocoaEventDispatcherPrivate::processPostedEvents() + 192
      38  libqcocoa.dylib               	       0x10301ae18 QCocoaEventDispatcherPrivate::postedEventsSourceCallback(void*) + 412
      39  CoreFoundation                	       0x18f5d9eb0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
      40  CoreFoundation                	       0x18f5d9e44 __CFRunLoopDoSource0 + 176
      41  CoreFoundation                	       0x18f5d9bb4 __CFRunLoopDoSources0 + 244
      42  CoreFoundation                	       0x18f5d87a0 __CFRunLoopRun + 828
      43  CoreFoundation                	       0x18f5d7e0c CFRunLoopRunSpecific + 608
      44  HIToolbox                     	       0x199d73000 RunCurrentEventLoopInMode + 292
      45  HIToolbox                     	       0x199d72e3c ReceiveNextEventCommon + 648
      46  HIToolbox                     	       0x199d72b94 _BlockUntilNextEventMatchingListInModeWithFilter + 76
      47  AppKit                        	       0x192e30970 _DPSNextEvent + 660
      48  AppKit                        	       0x193622dec -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 700
      49  AppKit                        	       0x192e23cb8 -[NSApplication run] + 476
      50  libqcocoa.dylib               	       0x10301927c QCocoaEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 1936
      51  QtCore                        	       0x104c3d8a0 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 448
      52  QtCore                        	       0x104c36620 QCoreApplication::exec() + 112
      53  Qt Creator                    	       0x102e33bcc main + 17888
      54  dyld                          	       0x18f1720e0 start + 2360
      

      2.:

      0   QtGui                         	       0x10306ea50 QScreen::logicalDotsPerInchY() const + 40
      1   QtWidgets                     	       0x1022ddbfc QWidget::metric(QPaintDevice::PaintDeviceMetric) const + 396
      2   QtGui                         	       0x10318f178 QFont::QFont(QFont const&, QPaintDevice const*) + 56
      3   QtWidgets                     	       0x1022c7e10 QWidgetPrivate::init(QWidget*, QFlags<Qt::WindowType>) + 556
      4   QtWidgets                     	       0x1022c7f48 QWidget::QWidget(QWidgetPrivate&, QWidget*, QFlags<Qt::WindowType>) + 80
      5   QtWidgets                     	       0x10236fce4 QAbstractButton::QAbstractButton(QAbstractButtonPrivate&, QWidget*) + 24
      6   QtWidgets                     	       0x10245254c QToolButton::QToolButton(QWidget*) + 104
      7   QtWidgets                     	       0x10244e0d4 QToolBarLayout::createItem(QAction*) + 220
      8   QtWidgets                     	       0x10244dfa0 QToolBarLayout::insertAction(int, QAction*) + 40
      9   QtWidgets                     	       0x1022d9560 QWidget::event(QEvent*) + 140
      10  QtWidgets                     	       0x102446fec QToolBar::event(QEvent*) + 788
      11  QtWidgets                     	       0x1022987f4 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 272
      12  QtWidgets                     	       0x10229a414 QApplication::notify(QObject*, QEvent*) + 4024
      13  QtCore                        	       0x10298e0ec QCoreApplication::notifyInternal2(QObject*, QEvent*) + 204
      14  QtWidgets                     	       0x1022cf774 QWidget::insertAction(QAction*, QAction*) + 276
      15  QtWidgets                     	       0x1022cf9b0 QWidget::addAction(QIcon const&, QString const&) + 72
      16  libLanguageClient.dylib       	       0x10c4314b4 LanguageClient::updateEditorToolBar(Core::IEditor*) + 784
      17  libLanguageClient.dylib       	       0x10c3784bc LanguageClient::Client::activateEditor(Core::IEditor*) + 36
      18  libLanguageClient.dylib       	       0x10c3748a8 LanguageClient::Client::activateDocument(TextEditor::TextDocument*) + 600
      19  libLanguageClient.dylib       	       0x10c373840 LanguageClient::Client::openDocument(TextEditor::TextDocument*) + 2304
      20  libLanguageClient.dylib       	       0x10c3eb6c4 LanguageClient::LanguageClientManager::openDocumentWithClient(TextEditor::TextDocument*, LanguageClient::Client*) + 720
      21  libClangCodeModel.dylib       	       0x10e8f1654 QtPrivate::QCallableObject<ClangCodeModel::Internal::ClangModelManagerSupport::updateLanguageClient(ProjectExplorer::Project*)::$_5::operator()() const::'lambda0'(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) + 1352
      22  QtCore                        	       0x1029c9ca8 void doActivate<false>(QObject*, int, void**) + 728
      23  libLanguageClient.dylib       	       0x10c35d5c0 LanguageClient::Client::initialized(LanguageServerProtocol::ServerCapabilities const&) + 52
      24  libLanguageClient.dylib       	       0x10c387244 LanguageClient::ClientPrivate::initializeCallback(LanguageServerProtocol::Response<LanguageServerProtocol::InitializeResult, LanguageServerProtocol::InitializeError> const&) + 4292
      25  libLanguageClient.dylib       	       0x10c3a5654 LanguageServerProtocol::Request<LanguageServerProtocol::InitializeResult, LanguageServerProtocol::InitializeError, LanguageServerProtocol::InitializeParams>::responseHandler() const::'lambda'(LanguageServerProtocol::JsonRpcMessage const&)::operator()(LanguageServerProtocol::JsonRpcMessage const&) const + 100
      26  libLanguageClient.dylib       	       0x10c380670 LanguageClient::Client::handleMessage(LanguageServerProtocol::JsonRpcMessage const&) + 264
      27  QtCore                        	       0x1029c9ca8 void doActivate<false>(QObject*, int, void**) + 728
      28  libLanguageClient.dylib       	       0x10c38846c LanguageClient::InterfaceController::messageReceived(LanguageServerProtocol::JsonRpcMessage const&) + 52
      29  QtCore                        	       0x1029c47dc QObject::event(QEvent*) + 284
      30  QtWidgets                     	       0x1022987f4 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 272
      31  QtWidgets                     	       0x10229965c QApplication::notify(QObject*, QEvent*) + 512
      32  QtCore                        	       0x10298e0ec QCoreApplication::notifyInternal2(QObject*, QEvent*) + 204
      33  QtCore                        	       0x10298ee7c QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 528
      34  libqcocoa.dylib               	       0x100d72168 QCocoaEventDispatcherPrivate::processPostedEvents() + 192
      35  libqcocoa.dylib               	       0x100d72e18 QCocoaEventDispatcherPrivate::postedEventsSourceCallback(void*) + 412
      36  CoreFoundation                	       0x18d101eb0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
      37  CoreFoundation                	       0x18d101e44 __CFRunLoopDoSource0 + 176
      38  CoreFoundation                	       0x18d101c14 __CFRunLoopDoSources0 + 340
      39  CoreFoundation                	       0x18d1007a0 __CFRunLoopRun + 828
      40  CoreFoundation                	       0x18d0ffe0c CFRunLoopRunSpecific + 608
      41  HIToolbox                     	       0x19789b000 RunCurrentEventLoopInMode + 292
      42  HIToolbox                     	       0x19789ae3c ReceiveNextEventCommon + 648
      43  HIToolbox                     	       0x19789ab94 _BlockUntilNextEventMatchingListInModeWithFilter + 76
      44  AppKit                        	       0x190958970 _DPSNextEvent + 660
      45  AppKit                        	       0x19114adec -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 700
      46  AppKit                        	       0x19094bcb8 -[NSApplication run] + 476
      47  libqcocoa.dylib               	       0x100d7127c QCocoaEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 1936
      48  QtCore                        	       0x1029958a0 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 448
      49  QtCore                        	       0x10298e620 QCoreApplication::exec() + 112
      50  Qt Creator                    	       0x100b8bbcc main + 17888
      51  dyld                          	       0x18cc9a0e0 start + 2360
      

      3.:

      Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
      0   QtGui                         	       0x10478aa50 QScreen::logicalDotsPerInchY() const + 40
      1   QtWidgets                     	       0x1039f9bfc QWidget::metric(QPaintDevice::PaintDeviceMetric) const + 396
      2   QtGui                         	       0x1048ab178 QFont::QFont(QFont const&, QPaintDevice const*) + 56
      3   QtWidgets                     	       0x1039ede88 QWidgetPrivate::updateFont(QFont const&) + 132
      4   QtWidgets                     	       0x1039edde4 QWidgetPrivate::resolveFont() + 124
      5   QtWidgets                     	       0x1039f5d3c QWidget::event(QEvent*) + 2152
      6   QtWidgets                     	       0x103a62344 QFrame::event(QEvent*) + 56
      7   QtWidgets                     	       0x103bdc110 QAbstractItemView::event(QEvent*) + 464
      8   QtWidgets                     	       0x1039b47f4 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 272
      9   QtWidgets                     	       0x1039b6414 QApplication::notify(QObject*, QEvent*) + 4024
      10  QtCore                        	       0x1040aa0ec QCoreApplication::notifyInternal2(QObject*, QEvent*) + 204
      11  QtWidgets                     	       0x1039eb204 QWidget::ensurePolished() const + 80
      12  QtWidgets                     	       0x1039eb234 QWidget::ensurePolished() const + 128
      13  QtWidgets                     	       0x1039eb234 QWidget::ensurePolished() const + 128
      14  QtWidgets                     	       0x1039eb234 QWidget::ensurePolished() const + 128
      15  QtWidgets                     	       0x1039f4f4c QWidgetPrivate::setVisible(bool) + 792
      16  QtWidgets                     	       0x1039f4a68 QWidget::setVisible(bool) + 664
      17  QtWidgets                     	       0x1039df8a8 QStackedLayout::setCurrentIndex(int) + 372
      18  libTextEditor.dylib           	       0x114aff940 TextEditor::Internal::OutlineWidgetStack::updateEditor(Core::IEditor*) + 632
      19  QtCore                        	       0x1040e5ca8 void doActivate<false>(QObject*, int, void**) + 728
      20  libCore.dylib                 	       0x11453d0c8 Core::EditorManager::currentEditorChanged(Core::IEditor*) + 60
      21  libCore.dylib                 	       0x1145ff278 Core::Internal::EditorManagerPrivate::setCurrentEditor(Core::IEditor*, bool) + 548
      22  libCore.dylib                 	       0x1145fbf9c Core::Internal::EditorManagerPrivate::activateEditor(Core::Internal::EditorView*, Core::IEditor*, QFlags<Core::EditorManager::OpenEditorFlag>) + 60
      23  libCore.dylib                 	       0x1145fbaf4 Core::Internal::EditorManagerPrivate::openEditor(Core::Internal::EditorView*, Utils::FilePath const&, Utils::Id, QFlags<Core::EditorManager::OpenEditorFlag>, bool*) + 2920
      24  libCore.dylib                 	       0x1145fc794 Core::Internal::EditorManagerPrivate::openEditorAt(Core::Internal::EditorView*, Utils::Link const&, Utils::Id, QFlags<Core::EditorManager::OpenEditorFlag>, bool*) + 140
      25  QtCore                        	       0x1040e07dc QObject::event(QEvent*) + 284
      26  QtWidgets                     	       0x1039b47f4 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 272
      27  QtWidgets                     	       0x1039b565c QApplication::notify(QObject*, QEvent*) + 512
      28  QtCore                        	       0x1040aa0ec QCoreApplication::notifyInternal2(QObject*, QEvent*) + 204
      29  QtCore                        	       0x1040aae7c QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 528
      30  libqcocoa.dylib               	       0x10248e168 QCocoaEventDispatcherPrivate::processPostedEvents() + 192
      31  libqcocoa.dylib               	       0x10248ee18 QCocoaEventDispatcherPrivate::postedEventsSourceCallback(void*) + 412
      32  CoreFoundation                	       0x18d101eb0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
      33  CoreFoundation                	       0x18d101e44 __CFRunLoopDoSource0 + 176
      34  CoreFoundation                	       0x18d101bb4 __CFRunLoopDoSources0 + 244
      35  CoreFoundation                	       0x18d1007a0 __CFRunLoopRun + 828
      36  CoreFoundation                	       0x18d0ffe0c CFRunLoopRunSpecific + 608
      37  HIToolbox                     	       0x19789b000 RunCurrentEventLoopInMode + 292
      38  HIToolbox                     	       0x19789ac90 ReceiveNextEventCommon + 220
      39  HIToolbox                     	       0x19789ab94 _BlockUntilNextEventMatchingListInModeWithFilter + 76
      40  AppKit                        	       0x190958970 _DPSNextEvent + 660
      41  AppKit                        	       0x19114adec -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 700
      42  AppKit                        	       0x19094bcb8 -[NSApplication run] + 476
      43  libqcocoa.dylib               	       0x10248d27c QCocoaEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 1936
      44  QtCore                        	       0x1040b18a0 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 448
      45  QtCore                        	       0x1040aa620 QCoreApplication::exec() + 112
      46  Qt Creator                    	       0x1022a7bcc main + 17888
      47  dyld                          	       0x18cc9a0e0 start + 2360
      

      Attachments

        Issue Links

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

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              demmeln Nikolaus Demmel
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes