Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.2.4, 6.5.1
-
None
-
Qt 6.5.1 (x86_64-little_endian-llp64 shared (dynamic) release build; by MSVC 2022) on "windows"
OS: Windows Server 2019 Version 1809 [winnt version 10.0.17763]
-
-
fc556e357 (dev), 718bb1170 (6.6), bc97aa94d (6.5), 1f655480d (tqtc/lts-6.2)
Description
I understand to fix the crash we need some way to reproduce the problem. But it is not trivial to reproduce the problem and is happening in our product only on Windows Server 2019. We have QComboBox created in a table cell as part of the QStyleItemDelegate::createEditor() call. Table has many rows, and crash doesn't happen right away when editing the cell. We have to edit multiple rows before we get a crash.
Here is the stack trace of the crash:
Qt6Widgets_fme.dll!QComboBox::isEditable() Line 1703 C++ Qt6Widgets_fme.dll!QAccessibleComboBox::focusChild() Line 328 C++ > Qt6Widgets_fme.dll!QAccessibleWidget::focusChild() Line 333 C++ qwindows_fme.dll!QWindowsUiaMainProvider::GetFocus(IRawElementProviderFragment * * pRetVal) Line 733 C++ UIAutomationCore.dll!00007ffe1d738fee() Unknown
QAccessibleInterface *QAccessibleComboBox::focusChild() const { // The editable combobox is the focus proxy of its lineedit, so the // lineedit itself never gets focus. But it is the accessible focus // child of an editable combobox. if (comboBox()->isEditable()) return child(1); return nullptr; }
Issue seems like the comboBox() call returns a null because editing of the cell has finished and the QComboBox has been destroyed. If change that line to
if (comboBox() && comboBox()->isEditable())
then it no longer crashes.
Attachments
Issue Links
- relates to
-
QTBUG-95134 crash in QAccessibleWidget::window() function with NULL pointer
-
- Reported
-
-
QTBUG-119513 QComboBox crashes after calling clear() and re-add items
-
- Closed
-