Hi

You have probably done initialization in wrong way. It should like like this
(it's my case if you don't have clients you just use Empty ones):

m_pChromeClient              = new WebChromeClient();
m_pContextMenuClient      = new WebCore::EmptyContextMenuClient();
m_pEditorClient                 = new WebEditorClient();
m_pDragClient                  = new WebCore::EmptyDragClient();
m_pInspectorClient            = new WebCore::EmptyInspectorClient();
// For WebCore::Frame
m_pFrameLoaderClient      = new WebCore::WebFrameLoaderClientCE();

m_pPage = new WebCore::Page(m_pChromeClient,
                                    m_pContextMenuClient,
                                    m_pEditorClient,
                                    m_pDragClient,
                                    m_pInspectorClient);

Now Page has its own chrome client.

2010/1/13 Alex MacCaw <[email protected]>

> 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,
> re...@0xbfffdf78) at
> /Users/Alex/Downloads/WebKit-r52751/WebCore/page/FrameView.cpp:295
> 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
> WebCore::EmptyChromeClient());
> chrome->scrollbarsModeDidChange(); // Works fine
>
>
> Any idea why the virtual functions don't exist with the first example:
>
> --
> http://www.leadthinking.com | http://socialmod.com
>
> _______________________________________________
> webkit-help mailing list
> [email protected]
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-help
>
>
_______________________________________________
webkit-help mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-help

Reply via email to