Crash again in Form::ensureFontsForAllCharacters()
Reproducer file: proKlima-Antrag-Formularsammlung-1655003920629nn.pdf
Steps:
- Open the pdf file
- Fill some of the text input fields (like Strabe, Telefon, etc)
- Crash happens.
Backtrace:
(gdb) bt
#0 0x00007fffe4e8db32 in Form::ensureFontsForAllCharacters (this=this@entry=0x7fffd140fe30, unicodeText=unicodeText@entry=0xce1bf0, pdfFontNameToEmulate="Arial-Black", fieldResources=fieldResources@entry=0x0)
at /home/nelson/jhbuild/checkout/poppler/poppler/poppler/Form.cc:2954
#1 0x00007fffe4e8e0a4 in FormFieldText::setContentCopy (this=0x7fffd13f0c70, new_content=new_content@entry=0xce1bf0) at /home/nelson/jhbuild/checkout/poppler/poppler/poppler/Form.cc:1683
#2 0x00007fffe4e8e0c5 in FormWidgetText::setContent (this=<optimized out>, new_content=new_content@entry=0xce1bf0) at /home/nelson/jhbuild/checkout/poppler/poppler/poppler/Form.cc:425
#3 0x00007fffe5163cda in poppler_form_field_text_set_text (field=0x7fffd8010940, text=text@entry=0x4e1450 "dola") at /home/nelson/jhbuild/checkout/poppler/poppler/glib/poppler-form-field.cc:757
The bug is very similar to that of !1202 (closed) . Crash also happens in Okular (tested the flathub version).
Downstream issue: https://gitlab.gnome.org/GNOME/evince/-/issues/1809