Summary: | Okular crash on editing form | ||
---|---|---|---|
Product: | [Applications] okular | Reporter: | Sylvain Bouchet <sylvain.bouchet> |
Component: | general | Assignee: | Okular developers <okular-devel> |
Status: | RESOLVED UPSTREAM | ||
Severity: | crash | CC: | devmotion, johannesfalke, kde, riccardoescher |
Priority: | NOR | Keywords: | drkonqi |
Version First Reported In: | 22.08.3 | ||
Target Milestone: | --- | ||
Platform: | Neon | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
the form is in this pdf
New crash information added by DrKonqi New crash information added by DrKonqi |
Description
Sylvain Bouchet
2022-11-27 13:38:14 UTC
Created attachment 154082 [details]
the form is in this pdf
For your information, I've recently update my system to be neon based on ubuntu 22.04 LTS Created attachment 155400 [details]
New crash information added by DrKonqi
okular (22.12.0) using Qt 5.15.7
1) Open (specific) form in Okular
2.1) Enable "Show forms"
2.2) Click on form cell
2.3) Type first character
3) Crash
-- Backtrace (Reduced):
#4 0x00007f175f76089c in GfxResources::doLookupFont(char const*) const () from /lib/x86_64-linux-gnu/libpoppler.so.123
#5 0x00007f175f7609ad in GfxResources::lookupFont(char const*) () from /lib/x86_64-linux-gnu/libpoppler.so.123
#6 0x00007f175f746998 in Form::ensureFontsForAllCharacters(GooString const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, GfxResources*) () from /lib/x86_64-linux-gnu/libpoppler.so.123
[...]
#8 0x00007f175fb74d37 in Poppler::FormFieldText::setText(QString const&) () from /lib/x86_64-linux-gnu/libpoppler-qt5.so.1
[...]
#10 0x00007f17979022b5 in QUndoStack::push(QUndoCommand*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
Created attachment 159092 [details]
New crash information added by DrKonqi
okular (23.04.0) using Qt 5.15.9
Same for me. A PDF Form already edited. Reopen it to add values into an empty form field: it crashes at the first character
-- Backtrace (Reduced):
#4 GfxResources::doLookupFont(char const*) const (this=<optimized out>, name=0x7ffff78e4750 "Helvetica") at /usr/src/debug/poppler-23.04.0/poppler/Gfx.cc:301
#5 0x00007f94093489ad in GfxResources::lookupFont(char const*) (this=<optimized out>, name=<optimized out>) at /usr/src/debug/poppler-23.04.0/poppler/Gfx.cc:313
#6 0x00007f9409342235 in Form::ensureFontsForAllCharacters(GooString const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, GfxResources*) (this=0x556bf2528460, unicodeText=0x556bf268e950, pdfFontNameToEmulate=<optimized out>, fieldResources=<optimized out>) at /usr/src/debug/poppler-23.04.0/poppler/Form.cc:2972
#7 0x00007f940933a056 in FormFieldText::setContentCopy(GooString const*) (this=0x556bf2508fa0, new_content=new_content@entry=0x556bf26598f0) at /usr/src/debug/poppler-23.04.0/poppler/Form.cc:1690
#8 0x00007f940933a2d5 in FormWidgetText::setContent(GooString const*) (this=this@entry=0x556bf2508ef0, new_content=new_content@entry=0x556bf26598f0) at /usr/src/debug/poppler-23.04.0/poppler/Form.cc:427
So, it looks like the form in question wants to use TimesNewRoman as font but that font is not embedded. At least for the pdf file attacheb by Sylvain. TimesNewRoman is not one of the 14 base fonts, though had it been, we would still have been crashing. Poppler seems to expect that that should be the case. I guess the following question is mostly for Albert: Do we want to do the addFontToDefaultResources dance, or just ignore the concept of fonts in this case ? I'm leaning towards adding the fonts to defaults and at the same time also, if it is one of the 14 base fonts, not actually embed the fonts, but only reference it. Fixed in poppler in the next version, likely called 23.06. |