Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. Access Violation when using QWebPage
QtWS25 Last Chance

Access Violation when using QWebPage

Scheduled Pinned Locked Moved Qt WebKit
7 Posts 4 Posters 3.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    ZaQQQ
    wrote on last edited by
    #1

    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
    @

    1 Reply Last reply
    0
    • ZlatomirZ Offline
      ZlatomirZ Offline
      Zlatomir
      wrote on last edited by
      #2

      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

      https://forum.qt.io/category/41/romanian

      1 Reply Last reply
      0
      • Z Offline
        Z Offline
        ZaQQQ
        wrote on last edited by
        #3

        Qt was built from sources on VS2010.

        1 Reply Last reply
        0
        • Z Offline
          Z Offline
          ZapB
          wrote on last edited by
          #4

          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?

          Nokia Certified Qt Specialist
          Interested in hearing about Qt related work

          1 Reply Last reply
          0
          • Z Offline
            Z Offline
            ZaQQQ
            wrote on last edited by
            #5

            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@

            1 Reply Last reply
            0
            • K Offline
              K Offline
              kling
              wrote on last edited by
              #6

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

              1 Reply Last reply
              0
              • Z Offline
                Z Offline
                ZaQQQ
                wrote on last edited by
                #7

                great! thanks!

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved