[webkit-help] Embedding WebKit - virtual functions not get instantiated properly.

Alex MacCaw info at eribium.org
Tue Jan 12 15:38:02 PST 2010

Very odd error... I've been trying to embed WebKit into my own app.
Getting this error:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000008
0x01e8c8b0 in WebCore::FrameView::invalidateRect (this=0x475ddb0,
rect=@0xbfffdf78) at
295            hostWindow()->repaint(rect, true);

On further investigation, it seems none of the virtual methods (from
HostWindow) exist on Chrome.
So, an example:

WebCore::Page *page = new WebCore::Page(...);
page->chrome() // Instance of (WebCore::Chrome*)
page->chrome()->focus() // Works
page->chrome()->scrollbarsModeDidChange(); // Triggers null pointer error

But if we create our own Chrome instance:

const WebCore::Chrome *chrome = new WebCore::Chrome(page, new
chrome->scrollbarsModeDidChange(); // Works fine

Any idea why the virtual functions don't exist with the first example:

http://www.leadthinking.com | http://socialmod.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20100112/05122ee1/attachment.html>

More information about the webkit-help mailing list