Description: LibreOffice crashes while exporting to PDF Steps to Reproduce: 1. Open the attached file (based on bug 104479#c26) 2. Export it to PDF with default settings (300 dpi 90% compression) Actual Results: Crash while exporting Expected Results: No crash Reproducible: Always User Profile Reset: No Additional Info: Probleemhandtekening: Gebeurtenisnaam van probleem: APPCRASH Naam van de toepassing: soffice.bin Versie van toepassing: 5.4.0.0 Tijdstempel van toepassing: 591e05e6 Naam van foutmodule: VCRUNTIME140.dll Versie van foutmodule: 14.0.24215.1 Tijdstempel van foutmodule: 57bfd587 Uitzonderingscode: c0000005 Uitzonderingsmarge: 0000d3f9 User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Created attachment 133491 [details] Example file
I can reproduce the crash with a 'bad allocation' error in Version: 5.5.0.0.alpha0+ Build ID: 7662b11cad6105d56fb9acc9c431c89d3b68dc89 CPU threads: 1; OS: Windows 6.1; UI render: default; TinderBox: Win-x86@39, Branch:master, Time: 2017-05-20_10:09:09 Locale: es-ES (es_ES); Calc: group however it doesn't crash in with Version: 5.4.0.0.alpha1+ Build ID: 74d2e606fd3605fe0a585f596eaa215ae4e20d18 CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk2; Locale: en-US (ca_ES.UTF-8); Calc: group Which OS and build are you using?
Crash occurred with Versie: 5.4.0.0.beta1 Build ID: 8672113ead4e403c55e31b1d9a3d1e0f3b299577 CPU-threads: 4; Besturingssysteem:Windows 6.2; UI-render: standaard; Locale: nl-NL (nl_NL); Calc: CL also with (used closed without any warning) Version: 5.5.0.0.alpha0+ Build ID: d57e6cd9dcc96112994ca2b14ac45896e86b26e5 CPU threads: 4; OS: Windows 6.19; UI render: default; TinderBox: Win-x86@42, Branch:master, Time: 2017-05-18_22:43:07 Locale: nl-NL (nl_NL); Calc: CL and in Version: 5.2.5.0.0+ Build ID: a4d4fbeb623013f6377b30711ceedb38ea4b49f8 CPU Threads: 4; OS Version: Windows 6.2; UI Render: GL; TinderBox: Win-x86@62-merge-TDF, Branch:libreoffice-5-2, Time: 2016-12-24_14:43:55 Locale: nl-NL (nl_NL); Calc: CL also found in Lib5.0.6.3 No crash with Version: 5.0.0.5 Build ID: 1b1a90865e348b492231e1c451437d7a15bb262b Locale: nl-NL (nl_NL) The issue seems to be a memory leak while exporting to PDF combined with the fact that (recent?) WinX86 builds tend to crash when the memory usage increases over 1,2 GB mark (mostly with bad alloc) (this time with a app crash report for me) See also https://bugs.documentfoundation.org/show_bug.cgi?id=104479#c27
The memory usage is almost the same since 3.3.0. Since the fix would be to reduce memory usage to normal levels anyway, I'm removing regression-related keywords.
*** Bug 108463 has been marked as a duplicate of this bug. ***
Created attachment 144426 [details] export in pdf jpeg90 300dpi in 6.1.0.3-x64 win10-64 ok export in pdf jpeg90 300dpi in 6.1.0.3-x64 win10-64 ok solved for me
in 6.0.6.2-x64 and win10-x64 memory about 2500 MB at the end of export in 6.1.0.3-x64 and win10-x64 memory about 2800 MB at the end of export you must have more than 4 GB better 8GB in memory. the programm added side per side memory and needs about 40 or 50 MB per side. this is a basic problem also in pdf import. but crash is solved
Repro 6.2+, both huge memory usage in 64-bit and bad allocation in 32-bit.
Created attachment 152062 [details] Valgrind trace On pc Debian x86-64 with master sources updated today + enable-symbols (not enable-dbgutil), I retrieved a Valgrind trace.
Repro with Version: 6.5.0.0.alpha0+ (x64) Build ID: 42a1a1c6b91907f81e15066ffab219411f18c4db CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: GL; VCL: win; Locale: nl-NL (nl_NL); UI-Language: en-US Calc: CL
Repro Version: 6.5.0.0.alpha0+ (x64) Build ID: 42a1a1c6b91907f81e15066ffab219411f18c4db CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: GL; VCL: win; Locale: nl-NL (nl_NL); UI-Language: en-US Calc: CL
I have 4.852 MB memory at the end of export with fresh build master Version: 6.5.0.0.alpha0+ Build ID: b0a468d75ff96955e9e53027d35b248235cb68d0 CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3; Locale: nl-BE (en_US.UTF-8); UI-Language: en-US Calc: threaded
Same huge memory usage Version: 7.1.0.0.alpha0+ (x64) Build ID: 83c4f86f22dc37269ac6a038fe7de053c42aad6e CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win Locale: en-US (nl_NL); UI: en-US Calc: CL
Dear Telesto, To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
I'm able to repro the large memory usage on export, and it looks like the memory is not deallocated even after the PDF export is finished. Closing the presentation file deallocates a large portion of the memory. Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: ef6ff2df2e1286974da2f344aa3b8e3ae9093a79 CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Vulkan; VCL: win Locale: en-US (en_US); UI: en-US Calc: CL threaded
A significant fix is available at: https://gerrit.libreoffice.org/c/core/+/162785. Tested on x64 system and no crashes were observed. Memory usage reduced from 2.8G to 1.9G and time to export reduced from ~1 minute to 7 seconds. There may still be room for improvement in reducing memory usage.
(In reply to Matt K from comment #16) It turns out that some unit tests fail for any try I've done to implement this fix. I was able to pass the unit tests locally for the first version, so it seems like this bug is fixable, just not quite sure exactly how.
Noel Grandin committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/1ae7a81e542c9b072e519d0ea0d4773ed26ca251 tdf#108037 Reduce time and memory consumed exporting to PDF It will be available in 24.8.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.
Noel Grandin committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/ffb6133176d5bc1824b15893b2cf1a80aea6aa02 tdf#108037 speed up exporting large pdf (2) It will be available in 24.8.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.
So I have reduced the memory usage of this dramatically. The remaining problem, is, essentially, that this ODP file has very small graphics that are tiled across very large numbers of tiles. In code terms, we have one or more FillGraphicPrimitive2D objects, which are being decomposed into a bazillion child objects. A possible path to future improvements would be to teach (*) the VclMetafileProcessor2D code to convert this in a more efficient manner to meta-file actions i.e. instead of converting to a bazillon transform and fillgraphic objects, instead create a new MetaAction sub-class and push a single FillGraphicAction (*) the vcl::PDFWriter::PlayMetafile code to convert the new FillGraphicAction object to a PDF fill/tile operation. But I am not going to do that.