[Webkit-unassigned] [Bug 90008] New: [Qt] Assertion reached when accessing mainFrame()->setHTML(""); from QWebPage

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 26 13:21:07 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=90008

           Summary: [Qt] Assertion reached when accessing
                    mainFrame()->setHTML(""); from QWebPage
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Windows 7
            Status: UNCONFIRMED
          Severity: Major
          Priority: P2
         Component: WebKit Qt
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: viv.rajkumar at maidsafe.net


Heya,

Qt Version: 4.8.2
My Machine: Windows 7 (x86)
Build Type: Release
Compiler: Visual Studio 2012 RC


Problem currently is QtWebKit4.dll crashes *ONLY* in x86 Release mode (Have tested Debug and x64 both types) on calling mainFrame()->setHtml("anything") from inside a subclassed QWebPage constructor.


Have noticed this problem presents itself also on QT-WebKit examples like "previewer", "domtraversal" again only in release mode.


I built the debugging symbols for Release QtWebKit4.dll to identify the origin of this error and found it at:

File: TextEncodingRegistry.cpp (Line 333) 

PassOwnPtr<TextCodec> newTextCodec(const TextEncoding& encoding)
{
  ...
  return factory.function(encoding, factory.additionalData);
}

In factory.functor assertion is triggered even though just above it there is an assert making sure it's not invalid (I'm not able to step any further into the code to debug it)


Call-Stack I got from Visual Studio:

00000000()    
>	QtWebKit4.dll!WebCore::newTextCodec(const WebCore::TextEncoding & encoding)  Line 333 + 0x24 bytes	C++
     QtWebKit4.dll!WebCore::TextResourceDecoder::flush()  Line 685 + 0xd bytes    C++
     QtWebKit4.dll!WebCore::DecodedDataDocumentParser::appendBytes(WebCore::DocumentWriter * writer, const char * data, int length, bool shouldFlush)  Line 48 + 0xb bytes    C++
     QtWebKit4.dll!WebCore::DocumentWriter::endIfNotLoadingMainResource()  Line 229    C++
     QtWebKit4.dll!WebCore::FrameLoader::init()  Line 239    C++
     QtWebKit4.dll!QWebFrame::QWebFrame(QWebPage * parent, QWebFrameData * frameData)  Line 540    C++
     QtWebKit4.dll!QWebPagePrivate::createMainFrame()  Line 426 + 0x23 bytes    C++
     QtWebKit4.dll!QWebPage::mainFrame()  Line 2003    C++




To Reproduce Problem:
1.a. Either just call setHtml() on QWebView or QWebPage()->mainFrame() from release in the current build environment.
1.b. QT-Examples "previewer", "domtraversal" also have this problem in release.



Possible WorkAround:
1. Have been trying to find a workaround currently until an offical fix is available by trying to set the QWebPage's defaultTextCodec() from code before setHtml() is called. That does not work though, the if condition still fails and goes to the newTextCodec function


Thank you,

Viv

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list