Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
5.12.4
-
None
-
-
deac052a40c93633041da058d5c73c9e91aa76c7
Description
Qt crashes if a QListView (or QListWidget) is scrolled when the containing window (QWidget) is opened another time. Opening the containing QWidget the first time scrolling a QListView (or QListWidget) works fine.
Crash in class: QWidgetBackingStore
function: markDirtyOnScreen(const QRegion ®ion, QWidget *widget, const QPoint &topLevelOffset)
line: 727
from QWidgetBackingStore.cpp
QWidget *nativeParent = widget->nativeParentWidget(); // Alien widgets with the top-level as the native parent (common case). if (nativeParent == tlw) { if (!widget->testAttribute(Qt::WA_WState_InPaintEvent)) dirtyOnScreen += region.translated(topLevelOffset); return; } // Alien widgets with native parent != tlw. QWidgetPrivate *nativeParentPrivate = nativeParent->d_func();
nativeParent seems to be null.
from QWidget (nativeParentWidget might return 0):
QWidget *QWidget::nativeParentWidget() const { QWidget *parent = parentWidget(); while (parent && !parent->internalWinId()) parent = parent->parentWidget(); return parent; }
/*! \fn QWidget *QWidget::parentWidget() const Returns the parent of this widget, or 0 if it does not have any parent widget. */
steps to reproduce with attached example (scrollview-example.zip)
(tested on macos, windows):
1) run the project with Qt 5.12.4
2) click on "Open Window"
3) in the new window press button "add" multiple times until the listview scrolls
4) verify scrolling works fine
5) close the window
6) press button "Open Window"
7) try to scroll -> crash
Attachments
Issue Links
- duplicates
-
QTBUG-76661 Segmentation Fault When Scrolling Window Contents
- Closed
- relates to
-
QTCREATORBUG-22735 Crashes when moving mouse wheel after few tries
- Closed
-
QTBUG-76661 Segmentation Fault When Scrolling Window Contents
- Closed
-
QTCREATORBUG-22688 Crash when opening help and scroll before loading is finished
- Closed
- replaces
-
QTCREATORBUG-22767 Sudden crash in QWidget::mapTo
- Closed
-
QTCREATORBUG-22816 Crash in locator bar
- Closed