<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>42311</bug_id>
          
          <creation_ts>2022-04-01 12:36:17 +0300</creation_ts>
          <short_desc>[1.50.5] crash on missing fonts</short_desc>
          <delta_ts>2022-04-15 10:13:41 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>libpango</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Stanislav Levin">slev</reporter>
          <assigned_to name="Yuri N. Sedunov">aris</assigned_to>
          <cc>aris</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>209071</commentid>
    <comment_count>0</comment_count>
    <who name="Stanislav Levin">slev</who>
    <bug_when>2022-04-01 12:36:17 +0300</bug_when>
    <thetext>`dot` crashed in environments without installed fonts (typical case for hasher).

How to reproduce:
```
echo &apos;digraph { a -&gt; b }&apos; | dot -vvv -Tsvg &gt; output.svg
```

Actual output:
```
Starting program: /usr/bin/dot test -Tsvg -vvv
warning: Error disabling address space randomization: Operation not permitted
[Thread debugging using libthread_db enabled]
Using host libthread_db library &quot;/lib64/libthread_db.so.1&quot;.
dot - graphviz version 2.43.0 (0)
libdir = &quot;/usr/lib64/graphviz&quot;
Activated plugin library: libgvplugin_core.so.6
Using render: svg:core
Using device: svg:svg:core
Activated plugin library: libgvplugin_dot_layout.so.6
Using layout: dot:dot_layout
The plugin configuration file:
        /usr/lib64/graphviz/config6
                was successfully loaded.
    render      :  cairo dot dot_json fig gd json json0 lasi map mp pic pov ps svg tk visio vml vrml xdot xdot_json
    layout      :  circo dot fdp neato nop nop1 nop2 osage patchwork sfdp twopi
    textlayout  :  textlayout
    device      :  bmp canon cmap cmapx cmapx_np dot dot_json eps fig gd gd2 gif gtk gv ico imap imap_np ismap jpe jpeg jpg json json0 mp pdf pic plain plain-ext png pov ps ps2 svg svgz tif tiff tk vdx vml vmlz vrml wbmp x11 xdot xdot1.2 xdot1.4 xdot_json xlib
    loadimage   :  (lib) bmp eps gd gd2 gif ico jpe jpeg jpg png ps svg xbm
pack info:
  mode   undefined
  size   0
  flags  0
  margin 8
pack info:
  mode   node
  size   0
  flags  0
...


(process:998): Pango-CRITICAL **: 09:31:30.427: pango_font_describe: assertion &apos;font != NULL&apos; failed

(process:998): Pango-CRITICAL **: 09:31:30.428: pango_font_description_get_variant: assertion &apos;desc != NULL&apos; failed

(process:998): Pango-CRITICAL **: 09:31:30.428: pango_font_get_hb_font: assertion &apos;PANGO_IS_FONT (font)&apos; failed

Thread 1 &quot;dot&quot; received signal SIGSEGV, Segmentation fault.
0x00007f642a9138f7 in hb_ot_layout_get_baseline (font=font@entry=0x0, baseline_tag=baseline_tag@entry=HB_OT_LAYOUT_BASELINE_TAG_ROMAN, direction=direction@entry=HB_DIRECTION_LTR, script_tag=script_tag@entry=1818326126, language_tag=language_tag@entry=0, coord=coord@entry=0x7ffe81087290) at ../src/hb-ot-layout.cc:2063
Python Exception &lt;class &apos;UnicodeEncodeError&apos;&gt;: &apos;ascii&apos; codec can&apos;t encode character &apos;\xa9&apos; in position 37: ordinal not in range(128)
2063      return font-&gt;face-&gt;table.BASE-&gt;get_baseline (font, baseline_tag, direction, script_tag, language_tag, coord);

```

This worked (and works) just fine with `libpango-1.48.11-alt1.x86_64.rpm`, but was broken with `libpango-1.50.5-alt1.x86_64.rpm`.

see https://gitlab.gnome.org/GNOME/pango/-/commit/539ca68c7725f9d7bfb6ba8ad3c94f354a6c1142

This commit makes `fonts-` mandatory.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>209583</commentid>
    <comment_count>1</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2022-04-14 23:02:56 +0300</bug_when>
    <thetext>libpango-1.50.7-alt1 -&gt; sisyphus:

 Thu Apr 14 2022 Yuri N. Sedunov &lt;aris@altlinux&gt; 1.50.7-alt1
 - 1.50.7 (fixed crash on missing fonts (ALT #42311))</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>209587</commentid>
    <comment_count>2</comment_count>
    <who name="Stanislav Levin">slev</who>
    <bug_when>2022-04-15 10:13:41 +0300</bug_when>
    <thetext>for reference,
upstream ticket https://gitlab.gnome.org/GNOME/pango/-/issues/680
fixed in 1.50.7.

thank you!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>