Bug 151262 - Assertion failure on justified Arabic/Persian text in Impress exported to PDF
Summary: Assertion failure on justified Arabic/Persian text in Impress exported to PDF
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
7.5.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.5.0
Keywords: haveBacktrace
Depends on:
Blocks: Crash-Assert Kashida-Justification
  Show dependency treegraph
 
Reported: 2022-10-01 23:02 UTC by Hossein
Modified: 2022-10-04 01:52 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
justified Arabic/Persian text in an Impress slide (341.77 KB, application/vnd.oasis.opendocument.presentation)
2022-10-01 23:02 UTC, Hossein
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hossein 2022-10-01 23:02:07 UTC
Created attachment 182777 [details]
justified Arabic/Persian text in an Impress slide

Description:
When exporting an Impress file containing justified Arabic/Persian text to PDF, LibreOffice Impress crashes.

Steps to Reproduce:
1. Open the attached "justified-test.odp" file
2. Export it to PDF

Alternatively, you can run this from command line:

    instdir/program/soffice --headless --convert-to pdf justified-test.odp

Actual Results:
LibreOffice Impress crashes

Expected Results:
LibreOffice should not crash, and a PDF output should be generated


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:

Fun fact:
This was a slide with the justified Arabic/Persian text inside my presentation on Justified Arabic/Persian text for LibOCon 2022. :-)


Console output:

soffice.bin: /home/hossein/Projects/libreoffice/core/vcl/source/outdev/map.cxx:290: tools::Long ImplSubPixelToLogic(bool, double, tools::Long, tools::Long, tools::Long): Assertion `!bCheck || rtl_math_approxValue(n) == rtl_math_approxValue(static_cast<double>(nRet) * nMapNum * nDPI / nMapDenom)' failed.
Unspecified Application Error


Fatal exception: Signal 6
Stack:
/home/hossein/Projects/libreoffice/core/instdir/program/libuno_sal.so.3(+0xae2e3)[0x7f54f38ca2e3]
/home/hossein/Projects/libreoffice/core/instdir/program/libuno_sal.so.3(+0xae51b)[0x7f54f38ca51b]
/home/hossein/Projects/libreoffice/core/instdir/program/libuno_sal.so.3(+0xae860)[0x7f54f38ca860]
/lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f54f332d520]
/lib/x86_64-linux-gnu/libc.so.6(pthread_kill+0x12c)[0x7f54f3381a7c]
/lib/x86_64-linux-gnu/libc.so.6(raise+0x16)[0x7f54f332d476]
/lib/x86_64-linux-gnu/libc.so.6(abort+0xd3)[0x7f54f33137f3]
/home/hossein/Projects/libreoffice/core/instdir/program/libvcllo.so(+0xdd67b2)[0x7f54eaceb7b2]
/home/hossein/Projects/libreoffice/core/instdir/program/libvcllo.so(_ZN11Application5AbortERKN3rtl8OUStringE+0x26)[0x7f54eadac8aa]
/home/hossein/Projects/libreoffice/core/instdir/program/libsofficeapp.so(+0x3a225)[0x7f54f3596225]
/home/hossein/Projects/libreoffice/core/instdir/program/libvcllo.so(+0xeb834e)[0x7f54eadcd34e]
/home/hossein/Projects/libreoffice/core/instdir/program/libuno_sal.so.3(+0x2039d)[0x7f54f383c39d]
/home/hossein/Projects/libreoffice/core/instdir/program/libuno_sal.so.3(+0xae825)[0x7f54f38ca825]
/lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f54f332d520]
/lib/x86_64-linux-gnu/libc.so.6(pthread_kill+0x12c)[0x7f54f3381a7c]
/lib/x86_64-linux-gnu/libc.so.6(raise+0x16)[0x7f54f332d476]
/lib/x86_64-linux-gnu/libc.so.6(abort+0xd3)[0x7f54f33137f3]
/lib/x86_64-linux-gnu/libc.so.6(+0x2871b)[0x7f54f331371b]
/lib/x86_64-linux-gnu/libc.so.6(+0x39e96)[0x7f54f3324e96]
/home/hossein/Projects/libreoffice/core/instdir/program/libvcllo.so(+0x991406)[0x7f54ea8a6406]
/home/hossein/Projects/libreoffice/core/instdir/program/libvcllo.so(+0x9968e9)[0x7f54ea8ab8e9]
/home/hossein/Projects/libreoffice/core/instdir/program/libvcllo.so(+0xb8cc19)[0x7f54eaaa1c19]
/home/hossein/Projects/libreoffice/core/instdir/program/libvcllo.so(+0xb8ec25)[0x7f54eaaa3c25]
/home/hossein/Projects/libreoffice/core/instdir/program/libvcllo.so(+0xb8ffa4)[0x7f54eaaa4fa4]
/home/hossein/Projects/libreoffice/core/instdir/program/libvcllo.so(_ZN3vcl9PDFWriter13DrawTextArrayERK5PointRKN3rtl8OUStringEN4o3tl4spanIKiEENS9_IKhEEii+0x66)[0x7f54eaa651fe]
/home/hossein/Projects/libreoffice/core/instdir/program/libvcllo.so(+0xb56959)[0x7f54eaa6b959]
/home/hossein/Projects/libreoffice/core/instdir/program/libvcllo.so(_ZN3vcl9PDFWriter12PlayMetafileERK11GDIMetaFileRKNS0_19PlayMetafileContextEPNS_16PDFExtOutDevDataE+0x45)[0x7f54eaa663bf]
/home/hossein/Projects/libreoffice/core/instdir/program/../program/libpdffilterlo.so(+0x48db5)[0x7f54d47a1db5]
/home/hossein/Projects/libreoffice/core/instdir/program/../program/libpdffilterlo.so(+0x43714)[0x7f54d479c714]
/home/hossein/Projects/libreoffice/core/instdir/program/../program/libpdffilterlo.so(+0x47bd3)[0x7f54d47a0bd3]
/home/hossein/Projects/libreoffice/core/instdir/program/../program/libpdffilterlo.so(+0x592ae)[0x7f54d47b22ae]
/home/hossein/Projects/libreoffice/core/instdir/program/../program/libpdffilterlo.so(+0x59e8b)[0x7f54d47b2e8b]
/home/hossein/Projects/libreoffice/core/instdir/program/libsfxlo.so(_ZN14SfxObjectShell8ExportToER9SfxMedium+0xc75)[0x7f54f05327db]
/home/hossein/Projects/libreoffice/core/instdir/program/libsfxlo.so(+0x6281f4)[0x7f54f052c1f4]
/home/hossein/Projects/libreoffice/core/instdir/program/libsfxlo.so(+0x631670)[0x7f54f0535670]
/home/hossein/Projects/libreoffice/core/instdir/program/libsfxlo.so(+0x6300d8)[0x7f54f05340d8]
/home/hossein/Projects/libreoffice/core/instdir/program/libsfxlo.so(+0x60d1b3)[0x7f54f05111b3]
/home/hossein/Projects/libreoffice/core/instdir/program/libsfxlo.so(+0x68b95c)[0x7f54f058f95c]
/home/hossein/Projects/libreoffice/core/instdir/program/libsfxlo.so(_ZN12SfxBaseModel10storeToURLERKN3rtl8OUStringERKN3com3sun4star3uno8SequenceINS6_5beans13PropertyValueEEE+0x1f4)[0x7f54f0586c30]
/home/hossein/Projects/libreoffice/core/instdir/program/libsofficeapp.so(+0x81592)[0x7f54f35dd592]
/home/hossein/Projects/libreoffice/core/instdir/program/libsofficeapp.so(+0x9d699)[0x7f54f35f9699]
/home/hossein/Projects/libreoffice/core/instdir/program/libsofficeapp.so(+0x3e6a3)[0x7f54f359a6a3]
/home/hossein/Projects/libreoffice/core/instdir/program/libsofficeapp.so(+0x3d7ae)[0x7f54f35997ae]
/home/hossein/Projects/libreoffice/core/instdir/program/libsofficeapp.so(+0x3d785)[0x7f54f3599785]
/home/hossein/Projects/libreoffice/core/instdir/program/libvcllo.so(+0x757923)[0x7f54ea66c923]
/home/hossein/Projects/libreoffice/core/instdir/program/libvcllo.so(+0x754704)[0x7f54ea669704]
/home/hossein/Projects/libreoffice/core/instdir/program/libvcllo.so(+0x7565b2)[0x7f54ea66b5b2]
/home/hossein/Projects/libreoffice/core/instdir/program/libvcllo.so(+0x1204b56)[0x7f54eb119b56]
/home/hossein/Projects/libreoffice/core/instdir/program/libvcllo.so(_ZN14SvpSalInstance12ProcessEventEN16SalUserEventList12SalUserEventE+0x9b)[0x7f54eb13e613]
/home/hossein/Projects/libreoffice/core/instdir/program/libvcllo.so(+0xdd770a)[0x7f54eacec70a]
/home/hossein/Projects/libreoffice/core/instdir/program/libvcllo.so(_ZN16SalUserEventList18DispatchUserEventsEb+0x2d1)[0x7f54eacec9e3]
/home/hossein/Projects/libreoffice/core/instdir/program/libvcllo.so(_ZN14SvpSalInstance9ImplYieldEbb+0x104)[0x7f54eb13ef86]
/home/hossein/Projects/libreoffice/core/instdir/program/libvcllo.so(_ZN14SvpSalInstance7DoYieldEbb+0xee)[0x7f54eb13f368]
/home/hossein/Projects/libreoffice/core/instdir/program/libvcllo.so(+0xe98bfc)[0x7f54eadadbfc]
/home/hossein/Projects/libreoffice/core/instdir/program/libvcllo.so(_ZN11Application5YieldEv+0x196)[0x7f54eadae8de]
/home/hossein/Projects/libreoffice/core/instdir/program/libvcllo.so(_ZN11Application7ExecuteEv+0x308)[0x7f54eadad89c]
/home/hossein/Projects/libreoffice/core/instdir/program/libsofficeapp.so(+0x3be44)[0x7f54f3597e44]
/home/hossein/Projects/libreoffice/core/instdir/program/libvcllo.so(_Z10ImplSVMainv+0x235)[0x7f54eadcd5df]
/home/hossein/Projects/libreoffice/core/instdir/program/libvcllo.so(_Z6SVMainv+0xd)[0x7f54eadcd708]
/home/hossein/Projects/libreoffice/core/instdir/program/libsofficeapp.so(soffice_main+0x141)[0x7f54f3602323]
/home/hossein/Projects/libreoffice/core/instdir/program/soffice.bin(+0xa60)[0x563b4e96aa60]
/home/hossein/Projects/libreoffice/core/instdir/program/soffice.bin(+0xa42)[0x563b4e96aa42]
/lib/x86_64-linux-gnu/libc.so.6(+0x29d90)[0x7f54f3314d90]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80)[0x7f54f3314e40]
/home/hossein/Projects/libreoffice/core/instdir/program/soffice.bin(+0x915)[0x563b4e96a915]
Comment 1 Hossein 2022-10-01 23:11:45 UTC
Tested with the latest LO Dev 7.5 master (debug build):

Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: 2a7fcaf582df3ada57ca519b50e29011973a1b6f
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Backtrace created using Qt Creator:

1  __pthread_kill_implementation  pthread_kill.c  44  0x7ffff79e1a7c 
2  __pthread_kill_internal  pthread_kill.c  78  0x7ffff79e1a7c 
3  __GI___pthread_kill  pthread_kill.c  89  0x7ffff79e1a7c 
4  __GI_raise  raise.c  26  0x7ffff798d476 
5  __GI_abort  abort.c  79  0x7ffff79737f3 
6  __assert_fail_base  assert.c  92  0x7ffff797371b 
7  __GI___assert_fail  assert.c  101  0x7ffff7984e96 
8  ImplSubPixelToLogic  map.cxx  290  0x7fffeef06406 
9  OutputDevice::SubPixelToLogic  map.cxx  1189 0x7fffeef0b8e9 
10 vcl::PDFWriterImpl::drawHorizontalGlyphs  pdfwriter_impl.cxx  6373 0x7fffef101c19 
11 vcl::PDFWriterImpl::drawLayout  pdfwriter_impl.cxx  6745 0x7fffef103c25 
12 vcl::PDFWriterImpl::drawTextArray  pdfwriter_impl.cxx  6957 0x7fffef104fa4 
13 vcl::PDFWriter::DrawTextArray  pdfwriter.cxx  89  0x7fffef0c51fe 
14 vcl::PDFWriterImpl::playMetafile  pdfwriter_impl2.cxx  816  0x7fffef0cb959 
15 vcl::PDFWriter::PlayMetafile  pdfwriter.cxx  466  0x7fffef0c63bf 
16 PDFExport::ImplExportPage  pdfexport.cxx  1139 0x7fffc56abdb5 
17 PDFExport::ExportSelection  pdfexport.cxx  248  0x7fffc56a6714 
18 PDFExport::Export  pdfexport.cxx  994  0x7fffc56aabd3 
19 PDFFilter::implExport  pdffilter.cxx  185  0x7fffc56bc2ae 
20 PDFFilter::filter  pdffilter.cxx  248  0x7fffc56bce8b 
21 SfxObjectShell::ExportTo  objstor.cxx  2494 0x7ffff4b927db 
22 SfxObjectShell::SaveTo_Impl  objstor.cxx  1562 0x7ffff4b8c1f4 
23 SfxObjectShell::PreDoSaveAs_Impl  objstor.cxx  2981 0x7ffff4b95670 
24 SfxObjectShell::CommonSaveAs_Impl  objstor.cxx  2771 0x7ffff4b940d8 
25 SfxObjectShell::APISaveAs_Impl  objserv.cxx  318  0x7ffff4b711b3 
26 SfxBaseModel::impl_store  sfxbasemodel.cxx  3146 0x7ffff4bef95c 
27 SfxBaseModel::storeToURL  sfxbasemodel.cxx  1782 0x7ffff4be6c30 
28 SfxStoringHelper::GUIStoreModel  guisaveas.cxx  1678 0x7ffff4b4bbee 
29 SfxObjectShell::ExecFile_Impl  objserv.cxx  970  0x7ffff4b758e0 
30 SfxStubSfxObjectShellExecFile_Impl  sfxslots.hxx  207  0x7ffff4b70452 
31 SfxDispatcher::Call_Impl  dispatch.cxx  254  0x7ffff482ee0c 
32 SfxDispatcher::Execute_  dispatch.cxx  753  0x7ffff4832340 
33 SfxBindings::Execute_Impl  bindings.cxx  1060 0x7ffff481d8af 
34 SfxDispatchController_Impl::dispatch  unoctitm.cxx  701  0x7ffff48ec1ae 
35 SfxOfficeDispatch::dispatch  unoctitm.cxx  263  0x7ffff48e9fb9 
36 framework::GenericToolbarController::ExecuteHdl_Impl  generictoolbarcontroller.cxx 332  0x7ffff5dc40bb 
37 framework::GenericToolbarController::LinkStubExecuteHdl_Impl generictoolbarcontroller.cxx 323  0x7ffff5dc4055 
38 Link<void *, void>::Call  link.hxx  111  0x7fffeeccc923 
39 ImplHandleUserEvent  winproc.cxx  2287 0x7fffeecc9704 
40 ImplWindowFrameProc  winproc.cxx  2857 0x7fffeeccb5b2 
41 SalFrame::CallCallback  salframe.hxx  306  0x7fffef779b56 
42 SalGenericDisplay::ProcessEvent  gendisp.cxx  66  0x7fffef7a19e5 
43 operator()  salusereventlist.cxx  119  0x7fffef34c70a 
44 SalUserEventList::DispatchUserEvents  salusereventlist.cxx  120  0x7fffef34c9e3 
45 SalGenericDisplay::DispatchInternalEvent  gendisp.cxx  51  0x7fffef7a1951 
46 SalX11Display::Yield  saldisp.cxx  1896 0x7fffe4ef0b09 
47 DisplayYield  saldisp.cxx  381  0x7fffe4ee84f3 
48 (anonymous namespace)::YieldEntry::HandleNextEvent  saldata.cxx  562  0x7fffe4ee30ef 
49 SalXLib::Yield  saldata.cxx  658  0x7fffe4ee3983 
50 X11SalInstance::DoYield  salinst.cxx  192  0x7fffe4f06ec5 
51 ImplYield  svapp.cxx  475  0x7fffef40dbfc 
52 Application::Yield  svapp.cxx  559  0x7fffef40e8de 
53 Application::Execute  svapp.cxx  453  0x7fffef40d89c 
54 desktop::Desktop::Main  app.cxx  1604 0x7ffff7bf7e44 
55 ImplSVMain  svmain.cxx  203  0x7fffef42d5df 
56 SVMain  svmain.cxx  235  0x7fffef42d708 
57 soffice_main  sofficemain.cxx  94  0x7ffff7c62323 
58 sal_main  main.c  51  0x555555554a60 
59 main  main.c  49  0x555555554a42
Comment 2 Rainer Bielefeld Retired 2022-10-02 13:30:29 UTC
NOT reproducible with Server Installation of Version: 7.5.0.0.alpha0+  Build ID: 2a7fcaf582df3ada57ca519b50e29011973a1b6f
CPU-Threads: 12; BS: Windows 10.0 Build 19044; UI render: default; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: Calc: threaded |  Elementary Theme  |  Special devUserProfile  (based on my normal one)
Comment 3 ⁨خالد حسني⁩ 2022-10-02 13:35:10 UTC
Reproduced with master build.
Comment 4 Commit Notification 2022-10-03 19:32:34 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/e5d59895ef3897141e5df304a8f98776aa70f021

tdf#151262 drop subpixel->logic pos asserts

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Hossein 2022-10-04 01:52:37 UTC
Verified fix with

Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: 545523f5624c959b2208001cd9d191a8464d2a32
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded