[MacPorts] #52605: adwaita-icon-theme @3.22.0 fails building on 10.5.8 PPC
MacPorts
noreply at macports.org
Sun Oct 16 20:55:23 CEST 2016
#52605: adwaita-icon-theme @3.22.0 fails building on 10.5.8 PPC
---------------------------------+----------------------
Reporter: braumann@… | Owner: devans@…
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.3.4
Resolution: | Keywords:
Port: adwaita-icon-theme |
---------------------------------+----------------------
Comment (by devans@…):
While you were testing, I looked into the `gtk-encode-symbolic-svg` code.
This utility converts svg icon files to specially encoded png files that
have many of the properties (color substitution, for example) as svg but
with much less processing overhead.
`gtk-encode-symbolic-svg` uses the following code to read the svg into an
in-memory GdkPixbuf:
{{{
loaded = load_symbolic_svg (file_data, file_len, width, height,
&g,
plane == 0 ? &r : &g,
plane == 1 ? &r : &g,
plane == 2 ? &r : &g,
error);
if (loaded == NULL)
return NULL;
}}}
and `load_symbolic_svg` uses the following code to do the work
{{{
stream = g_memory_input_stream_new_from_data (data, -1, g_free);
pixbuf = gdk_pixbuf_new_from_stream_at_scale (stream,
width,
height,
TRUE,
NULL,
error);
}}}
Error handling here is what I would call "minimum magnificent"! If
gdk_pixbuf_new_from_stream_at_scale returns an error it is propagated
upstream without checks to the main caller which then prints the message
we're seeing if an error is set without check which error it is. Possible
errors are those in the GDK_PIXBUF_ERROR domain
{{{
GDK_PIXBUF_ERROR_CORRUPT_IMAGE An image file was broken somehow.
GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY Not enough memory.
GDK_PIXBUF_ERROR_BAD_OPTION A bad option was passed to a pixbuf
save module.
GDK_PIXBUF_ERROR_UNKNOWN_TYPE Unknown image type.
GDK_PIXBUF_ERROR_UNSUPPORTED_OPERATION Don't know how to perform the given
operation on the type of image at hand.
GDK_PIXBUF_ERROR_FAILED Generic failure code, something
went wrong.
GDK_PIXBUF_ERROR_INCOMPLETE_ANIMATION Only part of the animation was
loaded.
}}}
and in the G_IO_ERROR domain (too many to list here) but some sort of GIO
stream error is a possibility.
Lots of possibilities.
Can you run `gtk-encode-symbolic-svg` under gdb with a breakpoint at
`load_symbolic_svg` and step from there to see what error is really being
returned?
To do this sensibly, one would need to build at least gtk3 and gdk-pixbuf2
with debugging symbols enabled and without cleaning after the build so
that the source code is still available for reference. You can do this
using the following commands:
{{{
sudo port -nsk upgrade --force gdk-pixbuf2 'configure.optflags='-g -O0'
sudo port -nsk upgrade --force gtk3 'configure.optflags='-g -O0'
}}}
So the question is: what is what error is being returned by
`load_symbolic_svg`?
--
Ticket URL: <https://trac.macports.org/ticket/52605#comment:19>
MacPorts <https://www.macports.org/>
Ports system for the Mac operating system
More information about the macports-tickets
mailing list