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

The QMainWindowLayout::restoreState causes a crash

    XMLWordPrintable

Details

    • Windows
    • 9ea9e2476 (dev), cc5e15491 (6.7), 1d70ba5ca (6.6), 79e28f455 (tqtc/lts-6.5)

    Description

      The  QMainWindowLayout::restoreState starts a problem that causes a crash in the future.

      It starts with resetting a unique_ptr called restoredState:

      restoredState.reset(new QMainWindowLayoutState(layoutState));

      The layoutState copies the restoredState's data in QMainWindowLayout::setGeometry but the restoredState can have invalid data (for example: dangling pointer).

       

      You can get the demo source here:
        https://github.com/GigaXenuM/RestoreState

       

      To reproduse the crash build and run app above. Then close and run it again.

      Attachments

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

        Activity

          People

            vhilshei Volker Hilsheimer
            taras_kachmaryk Taras Kachmaryk
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: