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

[OS X] Demobrowser: Accessing history menu item twice, crashes the application

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.9.4
    • 5.6.1
    • WebEngine
    • None
    • OS X 10.11.4, Qt 5.6.x branch from git
      qtbase 5f41d344e9d66434be13a9644b4da08dd01974a9
      qtwebengine 707893a3d59dbce24b8a67acaea3c9bb02ea30be
    • macOS

    Description

      Only reproducible on OS X:
      1) Start demobrowser
      2) Click history item in the menu toolbar at the top.
      3) Close the menu.
      4) Click the history item again.
      5) Notice crash.

      This is the stack trace:

      1  objc_msgSend                                                                                                                                                             0x7fff979704dd 
      2  QCocoaMenu::setAttachedItem(NSMenuItem *)                                                                                                  qcocoamenu.mm            615  0x12195435d    
      3  -[QCocoaMenuDelegate menu:updateItem:atIndex:shouldCancel:]                                                                                qcocoamenu.mm            117  0x1219542ba    
      4  -[NSMenu _populateFromDelegateWithEventRef:]                                                                                                                             0x7fff8da923b9 
      5  -[NSMenu _populateWithEventRef:]                                                                                                                                         0x7fff8da8e829 
      6  -[NSCarbonMenuImpl _carbonPopulateEvent:handlerCallRef:]                                                                                                                 0x7fff8da913f1 
      7  NSSLMMenuEventHandler                                                                                                                                                    0x7fff8da910dd 
      8  DispatchEventToHandlers(EventTargetRec *, OpaqueEventRef *, HandlerCallRec *)                                                                                            0x7fff8bad87be 
      9  SendEventToEventTargetInternal(OpaqueEventRef *, OpaqueEventTargetRef *, HandlerCallRec *)                                                                               0x7fff8bad7c48 
      10 SendEventToEventTargetWithOptions                                                                                                                                        0x7fff8bad7aab 
      11 SendMenuPopulate(MenuData *, OpaqueEventTargetRef *, unsigned int, double, unsigned int, OpaqueEventRef *, unsigned char, unsigned char *)                               0x7fff8bb1efcb 
      12 SendMenuOpening(MenuSelectData *, MenuData *, double, unsigned int, unsigned int, __CFDictionary *, unsigned char, unsigned char *)                                      0x7fff8bb496b7 
      13 DrawTheMenu(MenuSelectData *, __CFArray * *, unsigned char, unsigned char *)                                                                                             0x7fff8bb63d24 
      14 MenuChanged(MenuSelectData *, unsigned char, unsigned char)                                                                                                              0x7fff8bb63a21 
      15 TrackMenuCommon(MenuSelectData&, unsigned char *, SelectionData *, MenuResult *, MenuResult *)                                                                           0x7fff8bc7e207 
      16 MenuSelectCore(MenuData *, Point, double, unsigned int, OpaqueMenuRef * *, unsigned short *)                                                                             0x7fff8bb634fa 
      17 _HandleMenuSelection2                                                                                                                                                    0x7fff8bb63230 
      18 _NSHandleCarbonMenuEvent                                                                                                                                                 0x7fff8da7c1fe 
      19 _DPSNextEvent                                                                                                                                                            0x7fff8d8f1241 
      20 -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:]                                                                                                   0x7fff8d8f032a 
      21 -[NSApplication run]                                                                                                                                                     0x7fff8d8e4e84 
      22 QCocoaEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)                                                                qcocoaeventdispatcher.mm 416  0x12194d081    
      23 QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)                                                                           qeventloop.cpp           128  0x11aa34b54    
      24 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)                                                                                    qeventloop.cpp           204  0x11aa34d6b    
      25 QCoreApplication::exec()                                                                                                                   qcoreapplication.cpp     1285 0x11aa3a172    
      26 QGuiApplication::exec()                                                                                                                    qguiapplication.cpp      1607 0x1189bda86    
      27 QApplication::exec()                                                                                                                       qapplication.cpp         2979 0x117bd2599    
      28 main                                                                                                                                       main.cpp                 53   0x1000512a5    
      29 start                                                                                                                                                                    0x100005514    
      

      Crash probably happens as a result of https://codereview.qt-project.org/#/c/149727/

      Attachments

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

        Activity

          People

            qt_webengine_team Qt WebEngine Team
            alexandru.croitor Alexandru Croitor
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes