After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 663611 - Blank space shown for SVG icons with large comments
Blank space shown for SVG icons with large comments
Status: RESOLVED OBSOLETE
Product: gnome-shell
Classification: Core
Component: general
3.2.x
Other Linux
: Normal minor
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-11-08 11:38 UTC by Sunil Mohan Adapa
Modified: 2021-07-05 14:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GNOME Sudoku SVG icon with large comment block at the top (11.69 KB, image/svg+xml)
2011-11-08 11:38 UTC, Sunil Mohan Adapa
Details

Description Sunil Mohan Adapa 2011-11-08 11:38:08 UTC
Created attachment 200975 [details]
GNOME Sudoku SVG icon with large comment block at the top

When an SVG icon contains a large comment block, such as license header, before the <svg> tag, it fails to show up. A blank area appears in its place.

The icon remains viewable in image viewers and editable in Inkscape. An example image created by adding comment lines to gnome-sudoku.svg is attached.

When the comment is moved below the <svg> tag, it works fine. Inkscape places the comment above the <svg> tag by default.
Comment 1 Milan Bouchet-Valat 2011-11-08 12:57:10 UTC
What distribution are you using? What version of librsvg?
Comment 2 Sunil Mohan Adapa 2011-11-09 11:46:11 UTC
(In reply to comment #1)
> What distribution are you using? What version of librsvg?

Ubuntu 11.10 and the following packages are installed.

librsvg2-2: 2.34.1-2
librsvg2-common: 2.34.1-2
Comment 3 drago01 2011-11-13 18:51:44 UTC
That's kind of expected ... reading the whole file to determine its type would be too expensive. A long license header does not allow to identify the file as SVG.
Comment 4 Milan Bouchet-Valat 2011-11-13 20:41:50 UTC
(In reply to comment #3)
> That's kind of expected ... reading the whole file to determine its type would
> be too expensive. A long license header does not allow to identify the file as
> SVG.
Why do we need to identify its MIME type? It's not like calling 'file' on it: we know from the extension it must be a SVG, and we just need to skip the part that librsvg can detect as a comment. How is it that I can open the attached file in Firefox without trouble?
Comment 5 Jasper St. Pierre (not reading bugmail) 2011-11-13 21:04:11 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > That's kind of expected ... reading the whole file to determine its type would
> > be too expensive. A long license header does not allow to identify the file as
> > SVG.
> Why do we need to identify its MIME type? It's not like calling 'file' on it:
> we know from the extension it must be a SVG, and we just need to skip the part
> that librsvg can detect as a comment. How is it that I can open the attached
> file in Firefox without trouble?

gdk-pixbuf identifies by MIME type using shared-mime-info, so that you can just display a bunch of bytes laying around somewhere.
Comment 6 Jasper St. Pierre (not reading bugmail) 2012-09-28 00:01:34 UTC
If this works in eog, it should work in the shell. Both use gdk-pixbuf to load files.
Comment 7 Bastien Nocera 2014-11-09 23:31:08 UTC
Sunil, is this still a problem?
Comment 8 Sunil Mohan Adapa 2014-11-11 10:55:55 UTC
I just retested, the problem exists (with much less severity).  Here is what I did to reproduce the error:

1) Open /usr/share/icons/hicolor/scalable/apps/gnome-sudoku.svg and copy the comment line that is above the <svg> tag and duplicate it many times (test to fail for 27 lines).

2) Logout and log back in.

3) Search for Gnome Sudoku in application search and see that the icon for it blank.

4) Open Gnome Sudoku.  Press Alt-Tab and see a blank icon in the alt-tab overlay.

5) Icon looks okay on the favourite application launchers area.

The problem is less severe because the gnome-sudoku icon does not come with lots of comments tags at the top like it used to.  Possibly due to a fix in Inkspace.

Also the icon (with lots of comments tags at the top) is properly visible in eog.
Comment 9 André Klapper 2014-11-11 12:26:58 UTC
(In reply to comment #8)
> I just retested, the problem exists (with much less severity).

With which gnome-shell version? Please always provide version information.
Comment 10 GNOME Infrastructure Team 2021-07-05 14:11:41 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of  gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/

Thank you for your understanding and your help.