Access Violation when using QWebPage



  • Hi,
    I'm using QWebPage inside QState child class.
    QWebPage is created inside OnEntry() and deleted inside OnExit(). load method is called inside OnEntry().

    The problem is access violation error after calling load method but before loadFinished signal. This issue appears randomly after 4-10 state enters/exits.

    What am I doing wrong?

    Thanks.

    Env:
    MSVC2010
    Qt 4.7.2

    Violation Stack:
    @ msvcr100d.dll!cmpDWORD(const void * lhs, const void * rhs) + 0x1c bytes C
    msvcr100d.dll!unaligned_memcmp(const unsigned char * bLHS, const unsigned char * bRHS, unsigned int siz) + 0x1f bytes C
    msvcr100d.dll!memcmp(const void * lhs, const void * rhs, unsigned int siz) + 0x19c bytes C
    QtWebKitd4.dll!WebCore::setUpIterator(WebCore::TextBreakIterator & iterator, QTextBoundaryFinder::BoundaryType type, const wchar_t * string, int length) Line 59 + 0x3d bytes
    QtWebKitd4.dll!WebCore::lineBreakIterator(const wchar_t * string, int length) Line 89 + 0x14 bytes
    QtWebKitd4.dll!WebCore::nextBreakablePosition(const wchar_t * str, int pos, int len, bool treatNoBreakSpaceAsBreak) Line 120 + 0xd bytes
    QtWebKitd4.dll!WebCore::isBreakable(const wchar_t * str, int pos, int len, int & nextBreakable, bool breakNBSP) Line 33 + 0x16 bytes
    QtWebKitd4.dll!WebCore::RenderText::calcPrefWidths(int leadWidth, WTF::HashSet<WebCore::SimpleFontData const *,WTF::PtrHash<WebCore::SimpleFontData const *>,WTF::HashTraits<WebCore::SimpleFontData const *> > & fallbackFonts, WebCore::GlyphOverflow & glyphOverflow) Line 668 + 0x22 bytes
    QtWebKitd4.dll!WebCore::RenderText::calcPrefWidths(int leadWidth) Line 581
    QtWebKitd4.dll!WebCore::RenderText::trimmedPrefWidths(int leadWidth, int & beginMinW, bool & beginWS, int & endMinW, bool & endWS, bool & hasBreakableChar, bool & hasBreak, int & beginMaxW, int & endMaxW, int & minW, int & maxW, bool & stripFrontSpaces) Line 480
    QtWebKitd4.dll!WebCore::RenderBlock::calcInlinePrefWidths() Line 4287
    QtWebKitd4.dll!WebCore::RenderBlock::calcPrefWidths() Line 3966
    QtWebKitd4.dll!WebCore::RenderTableCell::calcPrefWidths() Line 133
    QtWebKitd4.dll!WebCore::AutoTableLayout::recalcColumn(int effCol) Line 85
    QtWebKitd4.dll!WebCore::AutoTableLayout::fullRecalc() Line 208 + 0xc bytes
    QtWebKitd4.dll!WebCore::AutoTableLayout::calcPrefWidths(int & minWidth, int & maxWidth) Line 248
    QtWebKitd4.dll!WebCore::RenderTable::calcPrefWidths() Line 539
    QtWebKitd4.dll!WebCore::RenderBox::minPrefWidth() Line 461
    QtWebKitd4.dll!WebCore::RenderTable::calcWidth() Line 206 + 0x1b bytes
    QtWebKitd4.dll!WebCore::RenderTable::layout() Line 254
    QtWebKitd4.dll!WebCore::RenderBlock::layoutBlockChild(WebCore::RenderBox * child, WebCore::RenderBlock::MarginInfo & marginInfo, int & previousFloatBottom, int & maxFloatBottom) Line 1364
    QtWebKitd4.dll!WebCore::RenderBlock::layoutBlockChildren(bool relayoutChildren, int & maxFloatBottom) Line 1304
    QtWebKitd4.dll!WebCore::RenderBlock::layoutBlock(bool relayoutChildren) Line 749
    QtWebKitd4.dll!WebCore::RenderBlock::layout() Line 674
    QtWebKitd4.dll!WebCore::RenderBlock::layoutBlockChild(WebCore::RenderBox * child, WebCore::RenderBlock::MarginInfo & marginInfo, int & previousFloatBottom, int & maxFloatBottom) Line 1364
    QtWebKitd4.dll!WebCore::RenderBlock::layoutBlockChildren(bool relayoutChildren, int & maxFloatBottom) Line 1304
    QtWebKitd4.dll!WebCore::RenderBlock::layoutBlock(bool relayoutChildren) Line 749
    QtWebKitd4.dll!WebCore::RenderBlock::layout() Line 674
    QtWebKitd4.dll!WebCore::RenderBlock::layoutBlockChild(WebCore::RenderBox * child, WebCore::RenderBlock::MarginInfo & marginInfo, int & previousFloatBottom, int & maxFloatBottom) Line 1364
    QtWebKitd4.dll!WebCore::RenderBlock::layoutBlockChildren(bool relayoutChildren, int & maxFloatBottom) Line 1304
    QtWebKitd4.dll!WebCore::RenderBlock::layoutBlock(bool relayoutChildren) Line 749
    QtWebKitd4.dll!WebCore::RenderBlock::layout() Line 674
    QtWebKitd4.dll!WebCore::RenderBlock::layoutBlockChild(WebCore::RenderBox * child, WebCore::RenderBlock::MarginInfo & marginInfo, int & previousFloatBottom, int & maxFloatBottom) Line 1364
    QtWebKitd4.dll!WebCore::RenderBlock::layoutBlockChildren(bool relayoutChildren, int & maxFloatBottom) Line 1304
    QtWebKitd4.dll!WebCore::RenderBlock::layoutBlock(bool relayoutChildren) Line 749
    QtWebKitd4.dll!WebCore::RenderBlock::layout() Line 674
    QtWebKitd4.dll!WebCore::RenderBlock::layoutBlockChild(WebCore::RenderBox * child, WebCore::RenderBlock::MarginInfo & marginInfo, int & previousFloatBottom, int & maxFloatBottom) Line 1364
    QtWebKitd4.dll!WebCore::RenderBlock::layoutBlockChildren(bool relayoutChildren, int & maxFloatBottom) Line 1304
    QtWebKitd4.dll!WebCore::RenderBlock::layoutBlock(bool relayoutChildren) Line 749
    QtWebKitd4.dll!WebCore::RenderBlock::layout() Line 674
    QtWebKitd4.dll!WebCore::RenderBlock::layoutBlockChild(WebCore::RenderBox * child, WebCore::RenderBlock::MarginInfo & marginInfo, int & previousFloatBottom, int & maxFloatBottom) Line 1364
    QtWebKitd4.dll!WebCore::RenderBlock::layoutBlockChildren(bool relayoutChildren, int & maxFloatBottom) Line 1304
    QtWebKitd4.dll!WebCore::RenderBlock::layoutBlock(bool relayoutChildren) Line 749
    QtWebKitd4.dll!WebCore::RenderBlock::layout() Line 674
    QtWebKitd4.dll!WebCore::RenderView::layout() Line 125
    QtWebKitd4.dll!WebCore::FrameView::layout(bool allowSubtree) Line 720
    QtWebKitd4.dll!WebCore::FrameView::layoutTimerFired(WebCore::TimerWebCore::FrameView * __formal) Line 1263
    QtWebKitd4.dll!WebCore::TimerWebCore::FrameView::fired() Line 98 + 0x1f bytes
    QtWebKitd4.dll!WebCore::ThreadTimers::sharedTimerFiredInternal() Line 115
    QtWebKitd4.dll!WebCore::ThreadTimers::sharedTimerFired() Line 91
    QtWebKitd4.dll!WebCore::SharedTimerQt::timerEvent(QTimerEvent * ev) Line 118
    QtCored4.dll!QObject::event(QEvent * e) Line 1176
    @



  • Have you built Qt 4.7.2 with VS 2010 or are you using the VS2008 binaries? This types of errors can be caused by binary incompatibility between different versions of Visual Studio



  • Qt was built from sources on VS2010.



  • Is this a 32 or 64 bit build of Qt? If it is 64-bit have you applied the hotfix to stop VC generating broken code?



  • It's 32 bit build. Some more info from WhenHit breakpoint for setUpIterator:
    signature (\src\3rdparty\webkit\WebCore\platform\text\qt\TextBreakIteratorQt.cpp):
    @TextBreakIterator* setUpIterator(TextBreakIterator& iterator, QTextBoundaryFinder::BoundaryType type, const UChar* string, int length)@

    @ITERATOR {length=187 string=0x05750c0c <Bad Ptr> } STRING 0x05b6ee2c "Copyright © 1995-2011 eBay Inc. All Rights Reserved. Designated trademarks and brands are the property of their respective owners. Use of this Web site constitutes acceptance of the eBay ﷽﷽ꮫꮫꮫꮫﻮ" LENGTH 187@



  • This is a bug in WebKit, it was fixed here: https://bugs.webkit.org/show_bug.cgi?id=55139



  • great! thanks!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.