Results 1 to 6 of 6

Thread: ASSERT: "w->testAttribute(Qt::WA_WState_Created)"

  1. #1
    Join Date
    Dec 2010
    Posts
    3
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: ASSERT: "w->testAttribute(Qt::WA_WState_Created)"

    I've recently started to get this error 2 out of 3 times I start my Qt 4.6 application. Does anybody know why this could happen?

    The callstack:
    Qt Code:
    1. > QtCored4.dll!qt_message_output(QtMsgType msgType=QtFatalMsg, const char * buf=0x1679ef70) Line 2254 C++
    2. QtCored4.dll!qt_message(QtMsgType msgType=QtFatalMsg, const char * msg=0x672893cc, char * ap=0x0388a7dc) Line 2312 + 0x12 bytes C++
    3. QtCored4.dll!qFatal(const char * msg=0x672893cc, ...) Line 2495 + 0xf bytes C++
    4. QtCored4.dll!qt_assert(const char * assertion=0x65a46cc4, const char * file=0x65a46c9c, int line=377) Line 2011 + 0x16 bytes C++
    5. QtGuid4.dll!QWinInputContext::update() Line 377 + 0x26 bytes C++
    6. QtGuid4.dll!QWinInputContext::setFocusWidget(QWidget * w=0x16613390) Line 765 C++
    7. QtGuid4.dll!QWidget::setAttribute(Qt::WidgetAttribute attribute=WA_NativeWindow, bool on=true) Line 10443 C++
    8. QtGuid4.dll!QWidget::winId() Line 2306 C++
    9. QtWebKitd4.dll!windowHandleForPageClient(QWebPageClient * client=0x1660ebe0) Line 90 + 0x9 bytes C++
    10. QtWebKitd4.dll!WebCore::PluginView::platformStart() Line 988 + 0x31 bytes C++
    11. QtWebKitd4.dll!WebCore::PluginView::start() Line 241 + 0xb bytes C++
    12. QtWebKitd4.dll!WebCore::PluginView::startOrAddToUnstartedList() Line 199 C++
    13. QtWebKitd4.dll!WebCore::PluginView::init() Line 179 + 0x8 bytes C++
    14. QtWebKitd4.dll!WebCore::PluginView::setParent(WebCore::ScrollView * parent=0x1bcccd70) Line 730 C++
    15. QtWebKitd4.dll!WebCore::ScrollView::addChild(WTF::PassRefPtr<WebCore::Widget> prpChild={...}) Line 66 C++
    16. QtWebKitd4.dll!WebCore::RenderWidget::setWidget(WTF::PassRefPtr<WebCore::Widget> widget={...}) Line 158 C++
    17. QtWebKitd4.dll!WebCore::RenderPart::setWidget(WTF::PassRefPtr<WebCore::Widget> widget={...}) Line 53 C++
    18. QtWebKitd4.dll!WebCore::FrameLoader::loadPlugin(WebCore::RenderPart * renderer=0x1b689608, const WebCore::KURL & url={...}, const WebCore::String & mimeType={...}, const WTF::Vector<WebCore::String,0> & paramNames={...}, const WTF::Vector<WebCore::String,0> & paramValues={...}, bool useFallback=false) Line 1354 C++
    19. QtWebKitd4.dll!WebCore::FrameLoader::requestObject(WebCore::RenderPart * renderer=0x1b689608, const WebCore::String & url={...}, const WebCore::AtomicString & frameName={...}, const WebCore::String & mimeType={...}, const WTF::Vector<WebCore::String,0> & paramNames={...}, const WTF::Vector<WebCore::String,0> & paramValues={...}) Line 1258 + 0x20 bytes C++
    20. QtWebKitd4.dll!WebCore::RenderPartObject::updateWidget(bool onlyCreateNonNetscapePlugins=false) Line 253 + 0x47 bytes C++
    21. QtWebKitd4.dll!WebCore::FrameView::updateWidgets() Line 1380 C++
    22. QtWebKitd4.dll!WebCore::FrameView::performPostLayoutTasks() Line 1406 + 0x8 bytes C++
    23. QtWebKitd4.dll!WebCore::FrameView::layout(bool allowSubtree=true) Line 686 C++
    24. QtWebKitd4.dll!WebCore::Document::updateLayout() Line 1358 C++
    25. QtWebKitd4.dll!WebCore::Document::updateLayoutIgnorePendingStylesheets() Line 1390 C++
    26. QtWebKitd4.dll!WebCore::Element::scrollWidth() Line 419 C++
    27. QtWebKitd4.dll!WebCore::jsElementScrollWidth(JSC::ExecState * exec=0x1a6705d8, const JSC::Identifier & __formal={...}, const JSC::PropertySlot & slot={...}) Line 355 + 0x10 bytes C++
    28. QtWebKitd4.dll!JSC::PropertySlot::getValue(JSC::ExecState * exec=0x1a6705d8, const JSC::Identifier & propertyName={...}) Line 62 + 0x17 bytes C++
    29. QtWebKitd4.dll!JSC::JSValue::get(JSC::ExecState * exec=0x1a6705d8, const JSC::Identifier & propertyName={...}, JSC::PropertySlot & slot={...}) Line 612 + 0x14 bytes C++
    30. QtWebKitd4.dll!JSC::Interpreter::privateExecute(JSC::Interpreter::ExecutionFlag flag=Normal, JSC::RegisterFile * registerFile=0x1315bbd4, JSC::ExecState * callFrame=0x1a6705d8, JSC::JSValue * exception=0x1323fb88) Line 2081 C++
    31. QtWebKitd4.dll!JSC::Interpreter::execute(JSC::FunctionExecutable * functionExecutable=0x1bb920d0, JSC::ExecState * callFrame=0x1b6b59d0, JSC::JSFunction * function=0x0b8b5c40, JSC::JSObject * thisObj=0x19548140, const JSC::ArgList & args={...}, JSC::ScopeChainNode * scopeChain=0x261cf120, JSC::JSValue * exception=0x1323fb88) Line 681 + 0x26 bytes C++
    32. QtWebKitd4.dll!JSC::JSFunction::call(JSC::ExecState * exec=0x1b6b59d0, JSC::JSValue thisValue={...}, const JSC::ArgList & args={...}) Line 120 + 0x4e bytes C++
    33. QtWebKitd4.dll!JSC::call(JSC::ExecState * exec=0x1b6b59d0, JSC::JSValue functionObject={...}, JSC::CallType callType=CallTypeJS, const JSC::CallData & callData={...}, JSC::JSValue thisValue={...}, const JSC::ArgList & args={...}) Line 39 + 0x2b bytes C++
    34. QtWebKitd4.dll!WebCore::callInWorld(JSC::ExecState * exec=0x1b6b59d0, JSC::JSValue function={...}, JSC::CallType callType=CallTypeJS, const JSC::CallData & callData={...}, JSC::JSValue thisValue={...}, const JSC::ArgList & args={...}, WebCore::DOMWrapperWorld * isolatedWorld=0x16702ec0) Line 822 + 0x29 bytes C++
    35. QtWebKitd4.dll!WebCore::ScheduledAction::executeFunctionInContext(JSC::JSGlobalObject * globalObject=0x19557a40, JSC::JSValue thisValue={...}) Line 106 + 0x5b bytes C++
    36. QtWebKitd4.dll!WebCore::ScheduledAction::execute(WebCore::Document * document=0x1b62ba28) Line 127 C++
    37. QtWebKitd4.dll!WebCore::ScheduledAction::execute(WebCore::ScriptExecutionContext * context=0x1b62ba58) Line 79 C++
    38. QtWebKitd4.dll!WebCore::DOMTimer::fired() Line 152 C++
    39. QtWebKitd4.dll!WebCore::ThreadTimers::sharedTimerFiredInternal() Line 115 C++
    40. QtWebKitd4.dll!WebCore::ThreadTimers::sharedTimerFired() Line 91 C++
    41. QtWebKitd4.dll!WebCore::SharedTimerQt::timerEvent(QTimerEvent * ev=0x0388cff4) Line 106 C++
    42. QtCored4.dll!QObject::event(QEvent * e=0x0388cff4) Line 1205 C++
    43. QtGuid4.dll!QApplicationPrivate::notify_helper(QObject * receiver=0x12bfcc88, QEvent * e=0x0388cff4) Line 4302 + 0x11 bytes C++
    44. QtGuid4.dll!QApplication::notify(QObject * receiver=0x12bfcc88, QEvent * e=0x0388cff4) Line 3706 + 0x10 bytes C++
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: ASSERT: "w->testAttribute(Qt::WA_WState_Created)"

    Are you using threads?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Dec 2010
    Posts
    3
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: ASSERT: "w->testAttribute(Qt::WA_WState_Created)"

    Yes.
    .

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: ASSERT: "w->testAttribute(Qt::WA_WState_Created)"

    You're probably accessing some QObject derived object from a worker thread. Don't do that.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Dec 2010
    Posts
    3
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: ASSERT: "w->testAttribute(Qt::WA_WState_Created)"

    The assertion appears in the main thread and the QWidget from the top of the callstack is also in the main thread.

    The full callstack:

    Qt Code:
    1. > QtCored4.dll!qt_message_output(QtMsgType msgType=QtFatalMsg, const char * buf=0x1679ef70) Line 2254 C++
    2. QtCored4.dll!qt_message(QtMsgType msgType=QtFatalMsg, const char * msg=0x672893cc, char * ap=0x0388a7dc) Line 2312 + 0x12 bytes C++
    3. QtCored4.dll!qFatal(const char * msg=0x672893cc, ...) Line 2495 + 0xf bytes C++
    4. QtCored4.dll!qt_assert(const char * assertion=0x65a46cc4, const char * file=0x65a46c9c, int line=377) Line 2011 + 0x16 bytes C++
    5. QtGuid4.dll!QWinInputContext::update() Line 377 + 0x26 bytes C++
    6. QtGuid4.dll!QWinInputContext::setFocusWidget(QWidget * w=0x16613390) Line 765 C++
    7. QtGuid4.dll!QWidget::setAttribute(Qt::WidgetAttribute attribute=WA_NativeWindow, bool on=true) Line 10443 C++
    8. QtGuid4.dll!QWidget::winId() Line 2306 C++
    9. QtWebKitd4.dll!windowHandleForPageClient(QWebPageClient * client=0x1660ebe0) Line 90 + 0x9 bytes C++
    10. QtWebKitd4.dll!WebCore::PluginView::platformStart() Line 988 + 0x31 bytes C++
    11. QtWebKitd4.dll!WebCore::PluginView::start() Line 241 + 0xb bytes C++
    12. QtWebKitd4.dll!WebCore::PluginView::startOrAddToUnstartedList() Line 199 C++
    13. QtWebKitd4.dll!WebCore::PluginView::init() Line 179 + 0x8 bytes C++
    14. QtWebKitd4.dll!WebCore::PluginView::setParent(WebCore::ScrollView * parent=0x1bcccd70) Line 730 C++
    15. QtWebKitd4.dll!WebCore::ScrollView::addChild(WTF::PassRefPtr<WebCore::Widget> prpChild={...}) Line 66 C++
    16. QtWebKitd4.dll!WebCore::RenderWidget::setWidget(WTF::PassRefPtr<WebCore::Widget> widget={...}) Line 158 C++
    17. QtWebKitd4.dll!WebCore::RenderPart::setWidget(WTF::PassRefPtr<WebCore::Widget> widget={...}) Line 53 C++
    18. QtWebKitd4.dll!WebCore::FrameLoader::loadPlugin(WebCore::RenderPart * renderer=0x1b689608, const WebCore::KURL & url={...}, const WebCore::String & mimeType={...}, const WTF::Vector<WebCore::String,0> & paramNames={...}, const WTF::Vector<WebCore::String,0> & paramValues={...}, bool useFallback=false) Line 1354 C++
    19. QtWebKitd4.dll!WebCore::FrameLoader::requestObject(WebCore::RenderPart * renderer=0x1b689608, const WebCore::String & url={...}, const WebCore::AtomicString & frameName={...}, const WebCore::String & mimeType={...}, const WTF::Vector<WebCore::String,0> & paramNames={...}, const WTF::Vector<WebCore::String,0> & paramValues={...}) Line 1258 + 0x20 bytes C++
    20. QtWebKitd4.dll!WebCore::RenderPartObject::updateWidget(bool onlyCreateNonNetscapePlugins=false) Line 253 + 0x47 bytes C++
    21. QtWebKitd4.dll!WebCore::FrameView::updateWidgets() Line 1380 C++
    22. QtWebKitd4.dll!WebCore::FrameView::performPostLayoutTasks() Line 1406 + 0x8 bytes C++
    23. QtWebKitd4.dll!WebCore::FrameView::layout(bool allowSubtree=true) Line 686 C++
    24. QtWebKitd4.dll!WebCore::Document::updateLayout() Line 1358 C++
    25. QtWebKitd4.dll!WebCore::Document::updateLayoutIgnorePendingStylesheets() Line 1390 C++
    26. QtWebKitd4.dll!WebCore::Element::scrollWidth() Line 419 C++
    27. QtWebKitd4.dll!WebCore::jsElementScrollWidth(JSC::ExecState * exec=0x1a6705d8, const JSC::Identifier & __formal={...}, const JSC::PropertySlot & slot={...}) Line 355 + 0x10 bytes C++
    28. QtWebKitd4.dll!JSC::PropertySlot::getValue(JSC::ExecState * exec=0x1a6705d8, const JSC::Identifier & propertyName={...}) Line 62 + 0x17 bytes C++
    29. QtWebKitd4.dll!JSC::JSValue::get(JSC::ExecState * exec=0x1a6705d8, const JSC::Identifier & propertyName={...}, JSC::PropertySlot & slot={...}) Line 612 + 0x14 bytes C++
    30. QtWebKitd4.dll!JSC::Interpreter::privateExecute(JSC::Interpreter::ExecutionFlag flag=Normal, JSC::RegisterFile * registerFile=0x1315bbd4, JSC::ExecState * callFrame=0x1a6705d8, JSC::JSValue * exception=0x1323fb88) Line 2081 C++
    31. QtWebKitd4.dll!JSC::Interpreter::execute(JSC::FunctionExecutable * functionExecutable=0x1bb920d0, JSC::ExecState * callFrame=0x1b6b59d0, JSC::JSFunction * function=0x0b8b5c40, JSC::JSObject * thisObj=0x19548140, const JSC::ArgList & args={...}, JSC::ScopeChainNode * scopeChain=0x261cf120, JSC::JSValue * exception=0x1323fb88) Line 681 + 0x26 bytes C++
    32. QtWebKitd4.dll!JSC::JSFunction::call(JSC::ExecState * exec=0x1b6b59d0, JSC::JSValue thisValue={...}, const JSC::ArgList & args={...}) Line 120 + 0x4e bytes C++
    33. QtWebKitd4.dll!JSC::call(JSC::ExecState * exec=0x1b6b59d0, JSC::JSValue functionObject={...}, JSC::CallType callType=CallTypeJS, const JSC::CallData & callData={...}, JSC::JSValue thisValue={...}, const JSC::ArgList & args={...}) Line 39 + 0x2b bytes C++
    34. QtWebKitd4.dll!WebCore::callInWorld(JSC::ExecState * exec=0x1b6b59d0, JSC::JSValue function={...}, JSC::CallType callType=CallTypeJS, const JSC::CallData & callData={...}, JSC::JSValue thisValue={...}, const JSC::ArgList & args={...}, WebCore::DOMWrapperWorld * isolatedWorld=0x16702ec0) Line 822 + 0x29 bytes C++
    35. QtWebKitd4.dll!WebCore::ScheduledAction::executeFunctionInContext(JSC::JSGlobalObject * globalObject=0x19557a40, JSC::JSValue thisValue={...}) Line 106 + 0x5b bytes C++
    36. QtWebKitd4.dll!WebCore::ScheduledAction::execute(WebCore::Document * document=0x1b62ba28) Line 127 C++
    37. QtWebKitd4.dll!WebCore::ScheduledAction::execute(WebCore::ScriptExecutionContext * context=0x1b62ba58) Line 79 C++
    38. QtWebKitd4.dll!WebCore::DOMTimer::fired() Line 152 C++
    39. QtWebKitd4.dll!WebCore::ThreadTimers::sharedTimerFiredInternal() Line 115 C++
    40. QtWebKitd4.dll!WebCore::ThreadTimers::sharedTimerFired() Line 91 C++
    41. QtWebKitd4.dll!WebCore::SharedTimerQt::timerEvent(QTimerEvent * ev=0x0388cff4) Line 106 C++
    42. QtCored4.dll!QObject::event(QEvent * e=0x0388cff4) Line 1205 C++
    43. QtGuid4.dll!QApplicationPrivate::notify_helper(QObject * receiver=0x12bfcc88, QEvent * e=0x0388cff4) Line 4302 + 0x11 bytes C++
    44. QtGuid4.dll!QApplication::notify(QObject * receiver=0x12bfcc88, QEvent * e=0x0388cff4) Line 3706 + 0x10 bytes C++
    45. majcia.exe!MajciaApplication::notify(QObject * receiver=0x12bfcc88, QEvent * event=0x0388cff4) Line 205 + 0x13 bytes C++
    46. QtCored4.dll!QCoreApplication::notifyInternal(QObject * receiver=0x12bfcc88, QEvent * event=0x0388cff4) Line 726 + 0x15 bytes C++
    47. QtCored4.dll!QCoreApplication::sendEvent(QObject * receiver=0x12bfcc88, QEvent * event=0x0388cff4) Line 215 + 0x39 bytes C++
    48. QtCored4.dll!QEventDispatcherWin32::event(QEvent * e=0x261b7cd8) Line 1107 + 0x10 bytes C++
    49. QtGuid4.dll!QApplicationPrivate::notify_helper(QObject * receiver=0x07ace288, QEvent * e=0x261b7cd8) Line 4302 + 0x11 bytes C++
    50. QtGuid4.dll!QApplication::notify(QObject * receiver=0x07ace288, QEvent * e=0x261b7cd8) Line 3706 + 0x10 bytes C++
    51. majcia.exe!MajciaApplication::notify(QObject * receiver=0x07ace288, QEvent * event=0x261b7cd8) Line 205 + 0x13 bytes C++
    52. QtCored4.dll!QCoreApplication::notifyInternal(QObject * receiver=0x07ace288, QEvent * event=0x261b7cd8) Line 726 + 0x15 bytes C++
    53. QtCored4.dll!QCoreApplication::sendEvent(QObject * receiver=0x07ace288, QEvent * event=0x261b7cd8) Line 215 + 0x39 bytes C++
    54. QtCored4.dll!QCoreApplicationPrivate::sendPostedEvents(QObject * receiver=0x00000000, int event_type=0, QThreadData * data=0x06b95880) Line 1367 + 0xd bytes C++
    55. QtCored4.dll!qt_internal_proc(HWND__ * hwnd=0x000711e8, unsigned int message=1025, unsigned int wp=0, long lp=0) Line 490 + 0x10 bytes C++
    56. user32.dll!_InternalCallWinProc@20() + 0x23 bytes
    57. user32.dll!_UserCallWinProcCheckWow@32() + 0xd3 bytes
    58. user32.dll!_DispatchMessageWorker@8() + 0xee bytes
    59. user32.dll!_DispatchMessageW@4() + 0xf bytes
    60. QtCored4.dll!QEventDispatcherWin32::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags={...}) Line 781 C++
    61. QtGuid4.dll!QGuiEventDispatcherWin32::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags={...}) Line 1145 + 0x15 bytes C++
    62. QtCored4.dll!QEventLoop::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags={...}) Line 150 C++
    63. QtCored4.dll!QEventLoop::exec(QFlags<enum QEventLoop::ProcessEventsFlag> flags={...}) Line 201 + 0x2d bytes C++
    64. QtCored4.dll!QCoreApplication::exec() Line 1003 + 0x15 bytes C++
    65. QtGuid4.dll!QApplication::exec() Line 3582 C++
    66. majcia.exe!ApplicationBuilder::Start() Line 231 + 0x8 bytes C++
    67. majcia.exe!runMajcia(int argc=1, char * * args=0x079af4d0) Line 123 + 0x8 bytes C++
    68. majcia.exe!main(int argc=1, char * * args=0x079af4d0) Line 348 + 0xd bytes C++
    69. majcia.exe!_WinMain@16() + 0x7a bytes
    70. majcia.exe!__tmainCRTStartup() Line 589 + 0x35 bytes C
    71. majcia.exe!WinMainCRTStartup() Line 414 C
    72. kernel32.dll!@BaseThreadInitThunk@12() + 0xe bytes
    73. ntdll.dll!___RtlUserThreadStart@8() + 0x23 bytes
    74. ntdll.dll!__RtlUserThreadStart@8() + 0x1b bytes
    To copy to clipboard, switch view to plain text mode 

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: ASSERT: "w->testAttribute(Qt::WA_WState_Created)"

    Quote Originally Posted by majcia View Post
    The assertion appears in the main thread and the QWidget from the top of the callstack is also in the main thread.
    That's where the fault manifests itself in a form of malfunction. The error itself can (and does) happen earlier so the stack trace is meaningless.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. The following user says thank you to wysota for this useful post:

    majcia (17th December 2010)

Similar Threads

  1. Replies: 1
    Last Post: 7th April 2010, 21:46
  2. Replies: 3
    Last Post: 15th February 2010, 17:27
  3. ASSERT "!activationRecursionGuard"
    By doggrant in forum Qt Programming
    Replies: 1
    Last Post: 27th October 2009, 16:36
  4. Replies: 3
    Last Post: 8th July 2008, 19:37
  5. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 19:05

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.