Bug 136600 - Application Error crash at start ( psp::PrintFontManager::convertSfntName )
Summary: Application Error crash at start ( psp::PrintFontManager::convertSfntName )
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.4.5.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Crash
  Show dependency treegraph
 
Reported: 2020-09-09 10:22 UTC by mort.kristian
Modified: 2021-05-29 04:53 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mort.kristian 2020-09-09 10:22:59 UTC
LibreOffice from Ubuntu 20.04 repositories. All modes "no prefix", --calc, --writer, ...


--version
LibreOffice 6.4.5.2 40(Build:2)

From help menu (runs using "sudo")
Version: 6.4.5.2
Build ID: 1:6.4.5-0ubuntu0.20.04.1
CPU threads: 12; OS: Linux 5.4; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: CL

with -backtrace --calc --nologo --norestore --safe-mode
```
Thread 1 "soffice.bin" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff3dfd859 in __GI_abort () at abort.c:79
#2  0x00007ffff402665c in  () at /usr/lib/x86_64-linux-gnu/libuno_sal.so.3
#3  0x00007ffff40405c9 in  () at /usr/lib/x86_64-linux-gnu/libuno_sal.so.3
#4  0x00007ffff5344207 in  () at /usr/lib/libreoffice/program/libmergedlo.so
#5  0x00007ffff6d8b4af in psp::PrintFontManager::convertSfntName(void*) () at /usr/lib/libreoffice/program/libmergedlo.so
#6  0x00007ffff6d8c0eb in psp::PrintFontManager::analyzeSfntFamilyName(void const*, std::vector<rtl::OUString, std::allocator<rtl::OUString> >&) () at /usr/lib/libreoffice/program/libmergedlo.so
#7  0x00007ffff6d8c566 in psp::PrintFontManager::analyzeSfntFile(psp::PrintFontManager::PrintFont*) const () at /usr/lib/libreoffice/program/libmergedlo.so
#8  0x00007ffff6d8ce82 in psp::PrintFontManager::analyzeFontFile(int, rtl::OString const&, char const*) const () at /usr/lib/libreoffice/program/libmergedlo.so
#9  0x00007ffff6d88bf9 in psp::PrintFontManager::countFontconfigFonts(std::unordered_map<rtl::OString, int, std::hash<rtl::OString>, std::equal_to<rtl::OString>, std::allocator<std::pair<rtl::OString const, int> > >&) () at /usr/lib/libreoffice/program/libmergedlo.so
#10 0x00007ffff6d8be58 in psp::PrintFontManager::initialize() () at /usr/lib/libreoffice/program/libmergedlo.so
#11 0x00007ffff6d8b128 in psp::PrintFontManager::get() () at /usr/lib/libreoffice/program/libmergedlo.so
#12 0x00007ffff6d7f720 in CairoTextRender::GetDevFontList(PhysicalFontCollection*) () at /usr/lib/libreoffice/program/libmergedlo.so
#13 0x00007ffff6af616a in  () at /usr/lib/libreoffice/program/libmergedlo.so
#14 0x00007ffff6af6670 in  () at /usr/lib/libreoffice/program/libmergedlo.so
#15 0x00007ffff6af6ea3 in  () at /usr/lib/libreoffice/program/libmergedlo.so
#16 0x00007ffff6afaaf7 in OutputDevice::ImplLayout(rtl::OUString const&, int, int, Point const&, long, long const*, SalLayoutFlags, vcl::TextLayoutCache const*, SalLayoutGlyphs const*) const () at /usr/lib/libreoffice/program/libmergedlo.so
#17 0x00007ffff6aff2a6 in OutputDevice::DrawText(Point const&, rtl::OUString const&, int, int, std::vector<tools::Rectangle, std::allocator<tools::Rectangle> >*, rtl::OUString*, SalLayoutGlyphs const*) () at /usr/lib/libreoffice/program/libmergedlo.so
#18 0x00007ffff5e87a27 in  () at /usr/lib/libreoffice/program/libmergedlo.so
#19 0x00007ffff5e87ac0 in  () at /usr/lib/libreoffice/program/libmergedlo.so
#20 0x00007ffff5e87cc8 in  () at /usr/lib/libreoffice/program/libmergedlo.so
#21 0x00007ffff5e02f14 in  () at /usr/lib/libreoffice/program/libmergedlo.so
#22 0x00007ffff6cd90c1 in ImplSVMain() () at /usr/lib/libreoffice/program/libmergedlo.so
#23 0x00007ffff5e1e4a3 in soffice_main () at /usr/lib/libreoffice/program/libmergedlo.so
#24 0x00005555555550b0 in  ()
#25 0x00007ffff3dff0b3 in __libc_start_main (main=0x5555555550a0, argc=2, argv=0x7fffffffdc18, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdc08) at ../csu/libc-start.c:308
#26 0x00005555555550ee in  ()

```


It most probably has something to do with the user profiles, because it does run as root but crash as my user.

However, deleting ~/.config/libreoffice does not solve the issue. So it must be something outside that folder (default font or something?).
Comment 1 Julien Nabet 2020-09-09 10:36:54 UTC
It seems rather due to a specific font.
Did you install any specific fonts/package of fonts? If yes which ones?
Comment 2 mort.kristian 2020-09-09 10:43:14 UTC
(In reply to Julien Nabet from comment #1)
> It seems rather due to a specific font.
> Did you install any specific fonts/package of fonts? If yes which ones?

I probably have a quite large list of optional packages installed. This is sort of an old installation that has been upgraded.

$ dpkg -l | grep "fonts-" | wc

For example prints 137 rows. I think it might be better to just break at psp::PrintFontManager::convertSfntName and try to print arguments, if that's possible.
Comment 3 Julien Nabet 2020-09-09 11:08:34 UTC
2 paths you could try:
1) try dichotomic method to find the problematic font(s) for LO

2) make convertSfntName display the font for this you must:
  - retrieve source code and build yourself (see https://wiki.documentfoundation.org/Development/BuildingOnLinux)
  - add a trace on this method and build this part
  - reproduce the case

Of course, perhaps there are other ways but I don't have them in mind.
Comment 4 mort.kristian 2020-09-09 11:26:58 UTC
I will check tomorrow about building the whole software from source with debug prints. I was able to breakpoint at the function but none of the symbols are present so I'm unable to print anything sensible about the arguments. And the stack is a bit messy so I didn't find the pNameRecord variable from there either (suspected $rsp+8 and $rdi at some point but the platformId record doesn't seem sensible in any of those cases).

Anyways, I will have to continue debugging on some better time.
Comment 5 QA Administrators 2020-09-10 03:57:51 UTC Comment hidden (obsolete)
Comment 6 mort.kristian 2020-09-14 07:03:31 UTC
I'm having some trouble compiling core.
I'll try to debug it later.

make -j8
...
Compiling: <MY_PATH>/core/registry/test/regcompare/usb.idl
[LNK] Library/libunoidllo.so
[PKG] postprocess_images
[BRM] CustomTarget/tools/string/reversemap.cxx
[PKG] icu
[UPK] liborcus-0.15.3.tar.gz
[PRJ] mythes
[BIN] apache-commons
[BIN] beanshell
Aborted (core dumped)
make[1]: *** [<MY_PATH>/core/tools/CustomTarget_reversemap.mk:18: <MY_PATH>/core/workdir/CustomTarget/tools/string/reversemap.cxx] Error 134
make[1]: *** Deleting file '<MY_PATH>/core/workdir/CustomTarget/tools/string/reversemap.cxx'
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:282: build] Error 2
Comment 7 Julien Nabet 2020-09-14 07:14:19 UTC
Weird. Here's on pc Debian testing x86-64, no pb to build.
Perhaps "make clean && make" may help.

BTW, make sure your autogen.input contains at least:
--enable-symbols
so gdb may retrieve symbols for stacktraces.
Comment 8 mort.kristian 2020-09-23 07:29:18 UTC
(In reply to Julien Nabet from comment #7)
> Weird. Here's on pc Debian testing x86-64, no pb to build.
> Perhaps "make clean && make" may help.
> 
> BTW, make sure your autogen.input contains at least:
> --enable-symbols
> so gdb may retrieve symbols for stacktraces.

It was after a fresh checkout and configure, so make clean should not be needed. But I did do it later anyways and it doesn't solve the problem. Also --enable-symbols was already configured. It crashes in the build step, I've not had time to check why it is crashing but it always outputs this "tools/string/reversemap.cxx" line when crashing the build...
Comment 9 mort.kristian 2020-09-25 03:11:25 UTC
Just adding a note for myself, that today I updated to 6.4.6.2 and it does not fix the issue. I'll keep the report version at 6.4.5.2 since it describes it as "earliest affected". I'm pretty sure it's even older bug but 6.4.5.2 is the earliest version I actually started to debug the problem with.

I hope to have enough time on Sunday to check why the compiling fails.
Comment 10 Timur 2020-10-29 10:28:25 UTC
Bug may stay Unconfirmed, but I don't see how someone could know what's the issue, it may be forgotten. 
Better to set Unconfirmed, so either reporter will fin out or there's will be a reminder in 6 months.
Comment 11 Buovjaga 2020-10-29 12:02:15 UTC
Btw. you can easily test newer versions (including unreleased) with appimages: https://libreoffice.soluzioniopen.com/
Comment 12 QA Administrators 2021-04-28 03:51:24 UTC Comment hidden (obsolete)
Comment 13 QA Administrators 2021-05-29 04:53:33 UTC
Dear mort.kristian,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-FollowUp