Bug 52274 - [GTK] Some SVG images fail to load with a "Document is empty" error
Summary: [GTK] Some SVG images fail to load with a "Document is empty" error
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Normal
Assignee: Nobody
URL: http://a.deveria.com/svg/css_svg_test...
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-11 22:02 PST by Bakhtiar Hasmanan
Modified: 2011-05-30 19:11 PDT (History)
2 users (show)

See Also:


Attachments
GTKLauncher SVG test page (53.12 KB, image/png)
2011-01-11 22:02 PST, Bakhtiar Hasmanan
no flags Details
Configure log (65.70 KB, application/octet-stream)
2011-01-11 22:04 PST, Bakhtiar Hasmanan
no flags Details
w3c svg filter test (50.96 KB, image/png)
2011-01-12 16:56 PST, Bakhtiar Hasmanan
no flags Details
Webinspector error and warning screenshot (130.05 KB, image/png)
2011-01-17 18:44 PST, Bakhtiar Hasmanan
no flags Details
w3c svg filter test (new) (90.60 KB, image/jpeg)
2011-04-06 06:54 PDT, Bakhtiar Hasmanan
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bakhtiar Hasmanan 2011-01-11 22:02:42 PST
Created attachment 78653 [details]
GTKLauncher SVG test page

I use the patch and source available at http://ftp5.gwdg.de/pub/opensuse/repositories/windows:/mingw:/win32/SLE_11/src/

My setup:
TDM MinGW 4.4.1+MSYS (not crosscompile)
gperf 3.0.1 msys (old) from http://www.foyeh.org/msys/
bison 2.4.2 msys
flex 2.5.35 msys
ActivePerl 5.12
GTK-2.17.2
Glib-2.22.5
libsoup-2.32.2
gstreamer-0.10.31
cairo 1.8.10
pango-1.28.0
enchant-1.6.0
libxslt-1.1.26
libxml2-2.7.7
sqlite-3.7.3

It compiled fine but when I test svg rendering, gtklauncher give error like in attachment and the console prints:
(GtkLauncher.exe:4080): Gtk-CRITICAL **: gtk_container_add: assertion `GTK_IS_CONTAINER (container)' failed
on each failed svg images but when render svg as image it works (or kind of)

Which component that failed in above testcase?
OpenSuSe crosscompile's binary finished the svg tests well. All sources/devlibs in my build came from OpenSuSe except that I need to avoid GTK >=2.18
Comment 1 Bakhtiar Hasmanan 2011-01-11 22:04:49 PST
Created attachment 78654 [details]
Configure log
Comment 2 Martin Robinson 2011-01-12 12:40:32 PST
Do you think you could run GtkLauncher with --g-fatal-warnings and get a stack trace for the critical warning?
Comment 3 Bakhtiar Hasmanan 2011-01-12 15:42:25 PST
(In reply to comment #2)
> Do you think you could run GtkLauncher with --g-fatal-warnings and get a stack trace for the critical warning?

With that argument, GTKLauncher quit after show a dialog box for the same error above.
Comment 4 Martin Robinson 2011-01-12 16:11:01 PST
At first, I didn't realize what the issue here was. You didn't link to the test page anywhere. The problem here is that some of the SVG images on the page http://a.deveria.com/svg/css_svg_test.html fail to load with an XML parsing error "Document is empty." I believe I've seen errors like these before, but I'm not sure if there is a bug open for it.
Comment 5 Bakhtiar Hasmanan 2011-01-12 16:55:12 PST
(In reply to comment #4)
> At first, I didn't realize what the issue here was. You didn't link to the test page anywhere. The problem here is that some of the SVG images on the page http://a.deveria.com/svg/css_svg_test.html fail to load with an XML parsing error "Document is empty." I believe I've seen errors like these before, but I'm not sure if there is a bug open for it.

I think webkit is doing ok? but my build certainly not so I need a clue which part that failing/messed (during build process). Initially I think it's the whole svg part, later it seems my webkit still able to render "svg as image" or this is different subject?

Anyway I give one more example from: http://www.w3.org/Graphics/SVG/Test/20061213/htmlObjectHarness/basic-filters-blend-01-b.html (actually all? tests failed)

Now the svg file did downloaded (if I do reload the svg part and reload percentage showed) but somehow not displayed. This time no GTK error. I really curious what could be wrong with my build.
Comment 6 Bakhtiar Hasmanan 2011-01-12 16:56:12 PST
Created attachment 78760 [details]
w3c svg filter test
Comment 7 Bakhtiar Hasmanan 2011-01-17 18:44:53 PST
Created attachment 79236 [details]
Webinspector error and warning screenshot

This error from opening http://www.w3.org/Graphics/SVG/Test/20061213/htmlObjectHarness/basic-color-prop-01-b.html

XML self-closing tag syntax used on <object>. The tag will not be closed. -> basic-color-prop-01-b.html:58
Resource interpreted as document but transferred with MIME type image/svg+xml. -> color-prop-01-b.svg
Comment 8 Sergio Villar Senin 2011-01-27 02:57:43 PST
I cannot see any error using r76777
Comment 9 Bakhtiar Hasmanan 2011-01-27 03:07:38 PST
OK maybe this'd be better closed. My build certainly has an issue, is there a test set that confirm svg feature? I've pass all supplied tests but none seems deal with svg rendering.
Comment 10 Martin Robinson 2011-01-27 08:34:00 PST
(In reply to comment #8)
> I cannot see any error using r76777

I'm still seeing this with the r76801. Perhaps the issue is the version of libxml installed. I have 2.7.7.dfsg-4ubuntu0.1.
Comment 11 Sergio Villar Senin 2011-01-27 08:39:54 PST
(In reply to comment #10)
> (In reply to comment #8)
> > I cannot see any error using r76777
> 
> I'm still seeing this with the r76801. Perhaps the issue is the version of libxml installed. I have 2.7.7.dfsg-4ubuntu0.1.

I'm using 2.7.7 too...
Comment 12 Sergio Villar Senin 2011-03-31 09:23:58 PDT
(In reply to comment #11)
> (In reply to comment #10)
> > (In reply to comment #8)
> > > I cannot see any error using r76777
> > 
> > I'm still seeing this with the r76801. Perhaps the issue is the version of libxml installed. I have 2.7.7.dfsg-4ubuntu0.1.
> 
> I'm using 2.7.7 too...

OK, now I see the issue. It's a problem with libsoup that is reporting a problem decoding a data: url used to transfer one of the images. I'll take a look...
Comment 13 Sergio Villar Senin 2011-04-06 02:50:05 PDT
This bug is now tracked in the gnome bugzilla as it's a libsoup bug:
https://bugzilla.gnome.org/show_bug.cgi?id=646896
Comment 14 Sergio Villar Senin 2011-04-06 06:37:43 PDT
(In reply to comment #13)
> This bug is now tracked in the gnome bugzilla as it's a libsoup bug:
> https://bugzilla.gnome.org/show_bug.cgi?id=646896

BTW I was talking about the issue with http://www.w3.org/Graphics/SVG/Test/20061213/htmlObjectHarness/basic-color-prop-01-b.html.

Regarding http://a.deveria.com/svg/css_svg_test.html it fails also in Chrome and Safari, it's a WebKit issue. There are some related issues
* https://bugs.webkit.org/show_bug.cgi?id=54325
* https://bugs.webkit.org/show_bug.cgi?id=32307
* https://bugs.webkit.org/show_bug.cgi?id=15453
Comment 15 Bakhtiar Hasmanan 2011-04-06 06:53:02 PDT
Based on https://bugs.webkit.org/show_bug.cgi?id=54366 Now I can display http://www.w3.org/Graphics/SVG/Test/20061213/htmlObjectHarness/basic-color-prop-01-b.html (see screenshot) with webkitgtk-1.2.7 (libsoup-2.32.2). Is it still an issue?

As for http://a.deveria.com/svg/css_svg_test.html you may close this bug then...
Comment 16 Bakhtiar Hasmanan 2011-04-06 06:54:26 PDT
Created attachment 88410 [details]
w3c svg filter test (new)
Comment 17 Sergio Villar Senin 2011-04-08 06:42:29 PDT
(In reply to comment #15)
> Based on https://bugs.webkit.org/show_bug.cgi?id=54366 Now I can display http://www.w3.org/Graphics/SVG/Test/20061213/htmlObjectHarness/basic-color-prop-01-b.html (see screenshot) with webkitgtk-1.2.7 (libsoup-2.32.2). Is it still an issue?

Looks like it's worning fine, isn't it?