Download it now!
Bug 130314 - LibreOffice hang convert-to pdf
Summary: LibreOffice hang convert-to pdf
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
(earliest affected) release
Hardware: All All
: medium normal
Assignee: Not Assigned
Keywords: bibisected, bisected, perf, regression
Depends on:
Reported: 2020-01-31 10:49 UTC by jinhongxin
Modified: 2020-06-09 18:18 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:

perf flamegraph (10.50 KB, application/x-bzip)
2020-01-31 19:32 UTC, Julien Nabet
Example file (1.42 MB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-06-07 20:05 UTC, Telesto

Note You need to log in before you can comment on or make changes to this bug.
Description jinhongxin 2020-01-31 10:49:56 UTC
run the shell in cenos 7.2 convert docx to pdf 
and the shell hang ,need help ,thx

version is ok 

Steps to Reproduce:
2./opt/libreoffice6.4/program/soffice --headless --invisible --convert-to pdf /tmp/0002_7908.docx --outdir /tmp

Actual Results:
convert /tmp/0002_7908.docx -> /tmp/0002_7908.pdf using filter : writer_pdf_Export

shell hang  

Expected Results:
can convert pdf 

Reproducible: Always

User Profile Reset: Yes

OpenGL enabled: Yes

Additional Info:
Comment 1 Julien Nabet 2020-01-31 19:32:24 UTC
Created attachment 157569 [details]
perf flamegraph

Here's a Flamegraph retrieved on pc Debian x86-64 with master sources updated today.
Comment 2 Julien Nabet 2020-01-31 20:47:59 UTC
Eike: it seems there's some loop there:
#0  0x00007fffe1239684 in i18npool::BreakIteratorImpl::getLocaleSpecificBreakIterator(com::sun::star::lang::Locale const&) (this=0x55555837f0f0, rLocale=...)
    at /home/julien/lo/libreoffice/i18npool/source/breakiterator/breakiteratorImpl.cxx:575
#1  0x00007fffe123761d in i18npool::BreakIteratorImpl::nextCharacters(rtl::OUString const&, int, com::sun::star::lang::Locale const&, short, int, int&)
    (this=0x55555837f0f0, Text="", nStartPos=4, rLocale=..., nCharacterIteratorMode=1, nCount=1, nDone=@0x7ffffffecdd8: 0)
    at /home/julien/lo/libreoffice/i18npool/source/breakiterator/breakiteratorImpl.cxx:58
#2  0x00007fffd9eacd30 in SwScriptInfo::CountCJKCharacters(rtl::OUString const&, o3tl::strong_int<int, Tag_TextFrameIndex>, o3tl::strong_int<int, Tag_TextFrameIndex>, o3tl::strong_int<unsigned short, LanguageTypeTag>) (rText="", nPos=..., nEnd=..., aLang=...) at /home/julien/lo/libreoffice/sw/source/core/text/porlay.cxx:2604
#3  0x00007fffd9edd1d5 in lcl_AddSpace(SwTextSizeInfo const&, rtl::OUString const*, SwLinePortion const&) (rInf=..., pStr=0x7ffffffed390, rPor=...)
    at /home/julien/lo/libreoffice/sw/source/core/text/portxt.cxx:100
#4  0x00007fffd9edf9f9 in SwTextPortion::CalcSpacing(long, SwTextSizeInfo const&) const (this=0x55555f28f5a0, nSpaceAdd=184, rInf=...) at /home/julien/lo/libreoffice/sw/source/core/text/portxt.cxx:646
#5  0x00007fffd9e62602 in SwTextPaintInfo::CalcRect(SwLinePortion const&, SwRect*, SwRect*, bool) const (this=0x7ffffffed7d0, rPor=..., pRect=0x7ffffffed0b0, pIntersect=0x0, bInsideBox=true)
    at /home/julien/lo/libreoffice/sw/source/core/text/inftxt.cxx:796

More precisely:
Thread 1 "soffice.bin" hit Breakpoint 3, SwScriptInfo::CountCJKCharacters (rText="", nPos=..., nEnd=..., aLang=...) at /home/julien/lo/libreoffice/sw/source/core/text/porlay.cxx:2604
2604	            nPos = TextFrameIndex(g_pBreakIt->GetBreakIter()->nextCharacters(

(gdb) p nCount
$5 = {m_value = -1205828024}
Comment 3 jinhongxin 2020-02-01 12:31:54 UTC
is the root cause from font?
Comment 4 Julien Nabet 2020-02-01 13:24:33 UTC
(In reply to jinhongxin from comment #3)
> is the root cause from font?

If it worked before, I'd rather say ICU component more than the font but I'm not an expert.
Comment 5 Telesto 2020-06-07 20:05:34 UTC
Created attachment 161746 [details]
Example file
Comment 6 Telesto 2020-06-08 19:46:08 UTC
Maybe ICU too? Same as bug 126344 (speculation)
Comment 7 Buovjaga 2020-06-09 17:33:11 UTC
(In reply to Telesto from comment #6)
> @Buovjaga
> Maybe ICU too? Same as bug 126344 (speculation)

It's not the ICU update. Bibisected with win32-6.2 to!/
tdf#118555 fix HFONT fallback handing / lifecycle

Adding Cc: to Jan-Marek Glogowski

I tested using GUI, not command line.

Previous commit takes 12 seconds.
Blamed commit takes 55 seconds.