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

crash in QAccessibleWidget::window() function with NULL pointer

    XMLWordPrintable

    Details

    • Platform/s:
      Windows

      Description

      result: 

      QWindow *QAccessibleWidget::window() const
      {
          const QWidget *w = widget();
          Q_ASSERT(w);
          QWindow *result = w->windowHandle();
          if (!result) {
              if (const QWidget *nativeParent = w->nativeParentWidget())
                  result = nativeParent->windowHandle();
          }
          return result;
      }
      

      this code crash, in release mode assert no effect, but 'w' is NULL .

       

      scene descript:

      When i click a "Qml Button" , i need to create and show  a QWidget dialog.

      QWidget dialog has some QLabel on .ui files, construct Dialog will call setupUI,

      lead to call retranslateUi,  QLabel::setText, then call 

      QAccessible::updateAccessibility with  "NameChanged" QAccessibleEvent,

      then QAccessibleWidget crash.

       

      here is call stack

       

       

       

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              smd Jan Arve
              Reporter:
              jaredtao jared tao
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes