[Qt-interest] Weird ASSERT when using QWizard

Andre Somers andre at familiesomers.nl
Tue Dec 14 23:00:35 CET 2010


Op 14-12-2010 22:24, Andre Somers schreef:
> Hi,
>
> I am running into a very weird problem when using QWizard. I get this
> ASSERT:
> "ASSERT: "w->testAttribute(Qt::WA_WState_Created)" in file
> inputmethod\qwininputcontext_win.cpp, line 377"
>
> I forced my app to crash when that happens, so I can get a proper
> backtrace. The trace is attached at the bottom. Note that it only
> contains Qt code, no code of my own. Line 8 looks suspicious. If I
> ignore the ASSERT, I get the same message again twice (once for line 501
> and once for line 377 again), after which the wizard works just fine.
>
> A very weird thing is, that if I change the order of the pages, the
> wizard runs without any issues. I really don't see why this may be the
> case though. The code is quite simple and does nothing out of the
> ordinairy. The ASSERT is 100% reproducible for me.
>
> I am running on windows 7 with a touch screen enabled. The compiler is
> MSVC.
>
> Any tips on what might be going wrong here would be very welcome!
One more observation: this only happens in debug mode. In release mode, 
everything is fine.

André

> André
>
> stacktrace:
> 0    qt_message_output    qglobal.cpp    2270    0x67057eed
> 1    qt_message    qglobal.cpp    2328    0x67058069
> 2    qFatal    qglobal.cpp    2511    0x67058459
> 3    qt_assert    qglobal.cpp    2027    0x67057a29
> 4    QWinInputContext::update    qwininputcontext_win.cpp    377
> 0x65833eb1
> 5    QWinInputContext::setFocusWidget    qwininputcontext_win.cpp
> 765    0x65835191
> 6    QWidget::setAttribute    qwidget.cpp    10694    0x650f73f5
> 7    QWidget::winId    qwidget.cpp    2464    0x650e6c08
> 8    QAccessible::updateAccessibility    qaccessible_win.cpp    286
> 0x65748553
> 9    QListView::currentChanged    qlistview.cpp    3097    0x6577d8de
> 10    QAbstractItemView::qt_metacall    moc_qabstractitemview.cpp
> 238    0x65759bb1
> 11    QListView::qt_metacall    moc_qlistview.cpp    111    0x659577cd
> 12    QMetaObject::metacall    qmetaobject.cpp    238    0x671ccb31
> 13    QMetaObject::activate    qobject.cpp    3278    0x671e4426
> 14    QItemSelectionModel::currentChanged
> moc_qitemselectionmodel.cpp    159    0x657be231
> 15    QItemSelectionModel::setCurrentIndex    qitemselectionmodel.cpp
> 1171    0x657bbf57
> 16    QAbstractItemView::focusInEvent    qabstractitemview.cpp
> 2102    0x65751f99
> 17    QWidget::event    qwidget.cpp    8370    0x650f2bc6
> 18    QFrame::event    qframe.cpp    557    0x655daf82
> 19    QAbstractScrollArea::event    qabstractscrollarea.cpp    996
> 0x656917c3
> 20    QAbstractItemView::event    qabstractitemview.cpp    1556
> 0x6574f83a
> 21    QListView::event    qlistview.cpp    1633    0x657774c3
> 22    QApplicationPrivate::notify_helper    qapplication.cpp    4454
> 0x6507161e
> 23    QApplication::notify    qapplication.cpp    4419    0x650712d5
> 24    QCoreApplication::notifyInternal    qcoreapplication.cpp    732
> 0x671c3051
> 25    QCoreApplication::sendEvent    qcoreapplication.h    215
> 0x671c81f9
> 26    QApplicationPrivate::setFocusWidget    qapplication.cpp    2240
> 0x6506c735
> 27    QWidget::setFocus    qwidget.cpp    6356    0x650eef60
> 28    QWidget::setFocus    qwidget.h    422    0x650ccb81
> 29    QWizardPrivate::switchToPage    qwizard.cpp    886    0x657290c0
> 30    QWizard::next    qwizard.cpp    3116    0x6572edf9
> 31    QWizard::qt_metacall    moc_qwizard.cpp    170    0x6572fff0
> 32    MainWindow::qt_metacall    moc_mainwindow.cpp    64    0x40504c
> 33    QMetaObject::metacall    qmetaobject.cpp    238    0x671ccb31
> 34    QMetaObject::activate    qobject.cpp    3278    0x671e4426
> 35    QAbstractButton::clicked    moc_qabstractbutton.cpp    206
> 0x6594fc5b
> 36    QAbstractButtonPrivate::emitClicked    qabstractbutton.cpp
> 548    0x655710cd
> 37    QAbstractButtonPrivate::click    qabstractbutton.cpp    540
> 0x65571048
> 38    QAbstractButton::mouseReleaseEvent    qabstractbutton.cpp
> 1122    0x65572204
> 39    QWidget::event    qwidget.cpp    8261    0x650f26e4
> 40    QAbstractButton::event    qabstractbutton.cpp    1081    0x6557203f
> 41    QPushButton::event    qpushbutton.cpp    684    0x65647d9b
> 42    QApplicationPrivate::notify_helper    qapplication.cpp    4454
> 0x6507161e
> 43    QApplication::notify    qapplication.cpp    4015    0x6506f958
> 44    QCoreApplication::notifyInternal    qcoreapplication.cpp    732
> 0x671c3051
> 45    QCoreApplication::sendSpontaneousEvent    qcoreapplication.h
> 218    0x6726d978
> 46    QApplicationPrivate::sendMouseEvent    qapplication.cpp    3112
> 0x6506e52a
> 47    QETWidget::translateMouseEvent    qapplication_win.cpp    3321
> 0x651319da
> 48    QtWndProc    qapplication_win.cpp    1659    0x6512cfad
> 49    InternalCallWinProc    USER32    0    0x751886ef
> 50    UserCallWinProcCheckWow    USER32    0    0x75188876
> 51    DispatchMessageWorker    USER32    0    0x751889b5
> 52    DispatchMessageW    USER32    0    0x75188e9c
> 53    QEventDispatcherWin32::processEvents
> qeventdispatcher_win.cpp    793    0x67207c66
> 54    QGuiEventDispatcherWin32::processEvents    qapplication_win.cpp
> 1170    0x6512bafe
> 55    QEventLoop::processEvents    qeventloop.cpp    150    0x671c0b5e
> 56    QEventLoop::exec    qeventloop.cpp    201    0x671c0c90
> 57    QCoreApplication::exec    qcoreapplication.cpp    1009    0x671c35cd
> 58    QApplication::exec    qapplication.cpp    3729    0x6506ef88
> 59    main    main.cpp    36    0x4015f3
> 60    WinMain    qtmain_win.cpp    131    0x40732a
> 61    __tmainCRTStartup    crtexe.c    578    0x406808
> 62    WinMainCRTStartup    crtexe.c    403    0x40656f
> 63    BaseThreadInitThunk    kernel32    0    0x76b11194
> 64    __RtlUserThreadStart    ntdll    0    0x774db495
> 65    _RtlUserThreadStart    ntdll    0    0x774db468
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest




More information about the Qt-interest-old mailing list