March 21, 2011

ZaQQQ ZaQQQ
Lab Rat
5 posts

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:

  1.   msvcr100d.dll!cmpDWORD(const void * lhs, const void * rhs)  + 0x1c bytes C
  2.   msvcr100d.dll!unaligned_memcmp(const unsigned char * bLHS, const unsigned char * bRHS, unsigned int siz)  + 0x1f bytes C
  3.   msvcr100d.dll!memcmp(const void * lhs, const void * rhs, unsigned int siz)  + 0x19c bytes C
  4.  QtWebKitd4.dll!WebCore::setUpIterator(WebCore::TextBreakIterator & iterator, QTextBoundaryFinder::BoundaryType type, const wchar_t * string, int length)  Line 59 + 0x3d bytes
  5.   QtWebKitd4.dll!WebCore::lineBreakIterator(const wchar_t * string, int length)  Line 89 + 0x14 bytes
  6.   QtWebKitd4.dll!WebCore::nextBreakablePosition(const wchar_t * str, int pos, int len, bool treatNoBreakSpaceAsBreak)  Line 120 + 0xd bytes
  7.   QtWebKitd4.dll!WebCore::isBreakable(const wchar_t * str, int pos, int len, int & nextBreakable, bool breakNBSP)  Line 33 + 0x16 bytes
  8.   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
  9.   QtWebKitd4.dll!WebCore::RenderText::calcPrefWidths(int leadWidth)  Line 581
  10.   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
  11.   QtWebKitd4.dll!WebCore::RenderBlock::calcInlinePrefWidths()  Line 4287
  12.   QtWebKitd4.dll!WebCore::RenderBlock::calcPrefWidths()  Line 3966
  13.   QtWebKitd4.dll!WebCore::RenderTableCell::calcPrefWidths()  Line 133
  14.   QtWebKitd4.dll!WebCore::AutoTableLayout::recalcColumn(int effCol)  Line 85
  15.   QtWebKitd4.dll!WebCore::AutoTableLayout::fullRecalc()  Line 208 + 0xc bytes
  16.   QtWebKitd4.dll!WebCore::AutoTableLayout::calcPrefWidths(int & minWidth, int & maxWidth)  Line 248
  17.   QtWebKitd4.dll!WebCore::RenderTable::calcPrefWidths()  Line 539
  18.   QtWebKitd4.dll!WebCore::RenderBox::minPrefWidth()  Line 461
  19.   QtWebKitd4.dll!WebCore::RenderTable::calcWidth()  Line 206 + 0x1b bytes
  20.   QtWebKitd4.dll!WebCore::RenderTable::layout()  Line 254
  21.   QtWebKitd4.dll!WebCore::RenderBlock::layoutBlockChild(WebCore::RenderBox * child, WebCore::RenderBlock::MarginInfo & marginInfo, int & previousFloatBottom, int & maxFloatBottom)  Line 1364
  22.   QtWebKitd4.dll!WebCore::RenderBlock::layoutBlockChildren(bool relayoutChildren, int & maxFloatBottom)  Line 1304
  23.   QtWebKitd4.dll!WebCore::RenderBlock::layoutBlock(bool relayoutChildren)  Line 749
  24.   QtWebKitd4.dll!WebCore::RenderBlock::layout()  Line 674
  25.   QtWebKitd4.dll!WebCore::RenderBlock::layoutBlockChild(WebCore::RenderBox * child, WebCore::RenderBlock::MarginInfo & marginInfo, int & previousFloatBottom, int & maxFloatBottom)  Line 1364
  26.   QtWebKitd4.dll!WebCore::RenderBlock::layoutBlockChildren(bool relayoutChildren, int & maxFloatBottom)  Line 1304
  27.   QtWebKitd4.dll!WebCore::RenderBlock::layoutBlock(bool relayoutChildren)  Line 749
  28.   QtWebKitd4.dll!WebCore::RenderBlock::layout()  Line 674
  29.   QtWebKitd4.dll!WebCore::RenderBlock::layoutBlockChild(WebCore::RenderBox * child, WebCore::RenderBlock::MarginInfo & marginInfo, int & previousFloatBottom, int & maxFloatBottom)  Line 1364
  30.   QtWebKitd4.dll!WebCore::RenderBlock::layoutBlockChildren(bool relayoutChildren, int & maxFloatBottom)  Line 1304
  31.   QtWebKitd4.dll!WebCore::RenderBlock::layoutBlock(bool relayoutChildren)  Line 749
  32.   QtWebKitd4.dll!WebCore::RenderBlock::layout()  Line 674
  33.   QtWebKitd4.dll!WebCore::RenderBlock::layoutBlockChild(WebCore::RenderBox * child, WebCore::RenderBlock::MarginInfo & marginInfo, int & previousFloatBottom, int & maxFloatBottom)  Line 1364
  34.   QtWebKitd4.dll!WebCore::RenderBlock::layoutBlockChildren(bool relayoutChildren, int & maxFloatBottom)  Line 1304
  35.   QtWebKitd4.dll!WebCore::RenderBlock::layoutBlock(bool relayoutChildren)  Line 749
  36.   QtWebKitd4.dll!WebCore::RenderBlock::layout()  Line 674
  37.   QtWebKitd4.dll!WebCore::RenderBlock::layoutBlockChild(WebCore::RenderBox * child, WebCore::RenderBlock::MarginInfo & marginInfo, int & previousFloatBottom, int & maxFloatBottom)  Line 1364
  38.   QtWebKitd4.dll!WebCore::RenderBlock::layoutBlockChildren(bool relayoutChildren, int & maxFloatBottom)  Line 1304
  39.   QtWebKitd4.dll!WebCore::RenderBlock::layoutBlock(bool relayoutChildren)  Line 749
  40.   QtWebKitd4.dll!WebCore::RenderBlock::layout()  Line 674
  41.   QtWebKitd4.dll!WebCore::RenderBlock::layoutBlockChild(WebCore::RenderBox * child, WebCore::RenderBlock::MarginInfo & marginInfo, int & previousFloatBottom, int & maxFloatBottom)  Line 1364
  42.   QtWebKitd4.dll!WebCore::RenderBlock::layoutBlockChildren(bool relayoutChildren, int & maxFloatBottom)  Line 1304
  43.   QtWebKitd4.dll!WebCore::RenderBlock::layoutBlock(bool relayoutChildren)  Line 749
  44.   QtWebKitd4.dll!WebCore::RenderBlock::layout()  Line 674
  45.   QtWebKitd4.dll!WebCore::RenderView::layout()  Line 125
  46.   QtWebKitd4.dll!WebCore::FrameView::layout(bool allowSubtree)  Line 720
  47.   QtWebKitd4.dll!WebCore::FrameView::layoutTimerFired(WebCore::Timer<WebCore::FrameView> * __formal)  Line 1263
  48.   QtWebKitd4.dll!WebCore::Timer<WebCore::FrameView>::fired()  Line 98 + 0x1f bytes
  49.   QtWebKitd4.dll!WebCore::ThreadTimers::sharedTimerFiredInternal()  Line 115
  50.   QtWebKitd4.dll!WebCore::ThreadTimers::sharedTimerFired()  Line 91
  51.   QtWebKitd4.dll!WebCore::SharedTimerQt::timerEvent(QTimerEvent * ev)  Line 118
  52.   QtCored4.dll!QObject::event(QEvent * e)  Line 1176

6 replies

March 21, 2011

Zlatomir Zlatomir
Hobby Entomologist
361 posts

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

March 21, 2011

ZaQQQ ZaQQQ
Lab Rat
5 posts

Qt was built from sources on VS2010.

March 21, 2011

ZapB ZapB
Ant Farmer
1426 posts

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?

 Signature 

Nokia Certified Qt Specialist
Interested in hearing about Qt related work

March 21, 2011

ZaQQQ ZaQQQ
Lab Rat
5 posts

It’s 32 bit build. Some more info from WhenHit breakpoint for setUpIterator:
signature (\src\3rdparty\webkit\WebCore\platform\text\qt\TextBreakIteratorQt.cpp):

  1. TextBreakIterator* setUpIterator(TextBreakIterator& iterator, QTextBoundaryFinder::BoundaryType type, const UChar* string, int length)

  1. 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

March 30, 2011

Andreas Kling Andreas Kling
Lab Rat
4 posts

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

March 30, 2011

ZaQQQ ZaQQQ
Lab Rat
5 posts

great! thanks!

 
  ‹‹ SSL Handshake when resuming an session      How to improve scrolling lag in QWebView ››

You must log in to post a reply. Not a member yet? Register here!