Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on system without fonts #358

Open
maleadt opened this issue Nov 17, 2022 · 0 comments
Open

Crash on system without fonts #358

maleadt opened this issue Nov 17, 2022 · 0 comments

Comments

@maleadt
Copy link

maleadt commented Nov 17, 2022

Cairo.jl currently fails PkgEval because Pango doesn't like a system without fonts (such as the bare rootfs used by PkgEval):

Test Summary:     |Time
IOBuffer Rooting  | None  0.5s
Test Summary:   | Pass  Total  Time
Image Surface   |    7      7  0.5s
Test Summary:   | Pass  Total  Time
Conversions     |    7      7  1.7s
Test Summary:   | Pass  Total  Time
TexLexer        |    1      1  0.3s

(process:17): Pango-CRITICAL **: 07:02:45.820: pango_font_get_hb_font: assertion 'PANGO_IS_FONT (font)' failed

[17] signal (11.1): Segmentation fault
in expression starting at /home/pkgeval/.julia/packages/Cairo/smWIA/samples/sample_pango_text.jl:20
hb_ot_metrics_get_position at /home/pkgeval/.julia/artifacts/ee20a84d0166c074dfa736b642902dd87b4da48d/lib/libharfbuzz.so (unknown line)
collect_font_scale at /workspace/srcdir/pango-1.50.9/build/../pango/itemize.c:1080 [inlined]
apply_font_scale at /workspace/srcdir/pango-1.50.9/build/../pango/itemize.c:1200
post_process_items at /workspace/srcdir/pango-1.50.9/build/../pango/itemize.c:1529 [inlined]
pango_itemize_post_process_items at /workspace/srcdir/pango-1.50.9/build/../pango/itemize.c:1580
pango_layout_check_lines at /workspace/srcdir/pango-1.50.9/build/../pango/pango-layout.c:4914
pango_layout_get_extents_internal at /workspace/srcdir/pango-1.50.9/build/../pango/pango-layout.c:2925
pango_layout_get_pixel_size at /workspace/srcdir/pango-1.50.9/build/../pango/pango-layout.c:3194
get_layout_size at /home/pkgeval/.julia/packages/Cairo/smWIA/src/Cairo.jl:1184 [inlined]

This isn't really a Cairo.jl issue, but it does prevent the package (and downstream packages like Gadfly.jl) to get monitored by PkgEval, which is bad. For now, I've implemented a workaround in PkgEval.jl, JuliaCI/PkgEval.jl#154, providing a simple font in the rootfs we use. However, it would be better to fix this without a workaround. Note that I'm not asking for a hack in the Cairo.jl test suite (ENV["PkgEval"] && download(...)), but rather a fix to Cairo.jl (or the underlying libraries) so that this doesn't segfault, even on a badly-configured system.

I also came across https://gitlab.alpinelinux.org/alpine/aports/-/issues/13686 which noted that this is a Pango bug fixed in Pango 1.50.7, but the JLL is already using a newer version (and GNOME's gitlab seems down so I can't inspect the actual fix)...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant