[webkit-gtk] Bizzare quirks when accessing URL strings

Emmanuel Rodriguez emmanuel.rodriguez at gmail.com
Mon Sep 26 08:43:53 PDT 2011


On Mon, Sep 26, 2011 at 16:55, Andrew Wood <a.j.w at me.com> wrote:
> Ive been doing some investigating around the problems I mentioned before
> about the URLs coming bck from WebKit causing segmentation faults but only
> on certain sites.
>
> Im having a similar problem in 2 places.
>
> 1. the policy decision callback for the navigation-policy-decision-requested
> signal
>        most URLs come back OK as a valid string but some cause a seg fault
> when trying to access them.  a test of the length using strlen() reveals it
> to be a large string (e.g 400+ chars) yet I still get a seg fault when I try
> to do anything with it.
>
> Accessing via any of the following calls results in the same behaviour:
> webkit_network_request_get_uri(request)
> webkit_web_navigation_action_get_original_uri(navigation_action)
> webkit_web_frame_get_uri(frame)
> g_object_get (navigation_action,"original-uri", &url,NULL);
>
> 2. When the load-finished signal is emitted, calling webkit_web_view_get_uri
> sometimes does the same thing, but again only on certain URLs. Ive also
> tried getting a pointer to the top level frame here and calling
> webkit_web_frame_get_uri but that does the same.
>
> Ive now managed to upgrade to version 1.4.3 to see if that fixed it but it
> hasnt. Its actually made problem 1 occur more often!
>
> Ive examined the Epiphany source to see if I could get any ideas but dont
> see any different way of doing it there.
>
> Im totally perplexed as to why its doing this. What Im trying to do is two
> things
>
> 1. trap all navigation actions to check if the url is one we should allow or
> not
> 2. get the top level url after a navigation has taken place so I can update
> the string shown in the address bar.
>
> Is anyone able to offer any insight please?
If you can write a small test case maybe you can compile WebKit with
debug symbols and use valgrid to see what's going on.

-- 
Emmanuel Rodriguez


More information about the webkit-gtk mailing list