Bug 154754 - Crash in: XMLFontAutoStylePool::getUsedFontList()
Summary: Crash in: XMLFontAutoStylePool::getUsedFontList()
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
7.5.0.0 alpha1+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.6.0 target:7.5.3
Keywords: bibisected, bisected, regression
: 154845 154908 (view as bug list)
Depends on:
Blocks: Fonts-Embedded
  Show dependency treegraph
 
Reported: 2023-04-11 11:19 UTC by Joysn71
Modified: 2023-04-19 13:37 UTC (History)
5 users (show)

See Also:
Crash report or crash signature: ["XMLFontAutoStylePool::getUsedFontList()"]


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joysn71 2023-04-11 11:19:16 UTC
This bug was filed from the crash reporting server and is br-4c19b75e-074f-42d0-a6d0-00c317d386c0.
=========================================

I open a ODP file which I created with Linux LibreOffice Impress (7.4.something) and can use on a portableapp Impress version on Windows 11 without a problem.
But when I open it on a fresh Impress installation 7.5.2.2 on Windows 10, it opens, I can use presentation mode, but when I save the file, os safe as the file, even with no changes done, Impress crashes and I can not recover from that without save mode.
Is it because I embedded Open Sans font into the document? As the title of the crash report is about XMLFontAutoStylePool::getUsedFontList().

I cannot give my presentation as example because it is my masters thesis, but today evening I can maybe recreate the issue with a MWE.
Comment 1 Stéphane Guillou (stragu) 2023-04-11 11:44:33 UTC
Yes, a smaller, sanitised example file would be great for us to test.
Much appreciated.
Comment 2 Joysn71 2023-04-11 17:24:09 UTC
Here are two files, each the same slide, one works, the other has exactly the symptoms I described. One is above 30000KB, therefore I placed them here:
https://drive.google.com/file/d/1KMBNWWgLhMhckOPikJgQrnVJ1TIWFfu7/view?usp=share_link
Comment 3 Joysn71 2023-04-11 17:26:39 UTC
Files are created on Linux Mint Debain edition (Bullseye) using Impress 7.0.4.2 (on splash screen), Debian package version 1:7.0.4.4+deb11u4
Comment 4 Julien Nabet 2023-04-11 18:00:22 UTC
Since the bt are quite similar, it should be fixed on master thanks to c0400558ba9325bc19fd454bcb4b16498082842c
author	Caolán McNamara <caolanm@redhat.com>	2023-04-10 10:38:32 +0100
committer	Caolán McNamara <caolanm@redhat.com>	2023-04-10 13:16:06 +0200
commit c0400558ba9325bc19fd454bcb4b16498082842c (patch)
tree 137072c55f37e4b9f34cd879b5119d33f9ab85b9
parent a5d955e2fc6e5eabeccf9875a50c85590f3f4768 (diff)
crashreporting: getUsedFontList() crash
e.g.
https://crashreport.libreoffice.org/stats/crash_details/3a3c07aa-0f96-4efa-b55b-c3fe4e4b6ed8

...
Crash Reason  EXCEPTION_ACCESS_VIOLATION_READ
Crash Address 0x0
...

  XMLFontAutoStylePool::getUsedFontList() xmloff\source\style\XMLFontAutoStylePool.cxx:334
  XMLFontAutoStylePool::exportXML()       xmloff\source\style\XMLFontAutoStylePool.cxx:408

and already cherry-picked on 7.5 with https://gerrit.libreoffice.org/c/core/+/150152 so should be on 7.5.4, perhaps on 7.5.3 if it's not too late. (see https://wiki.documentfoundation.org/ReleasePlan/7.5)
Comment 5 Stéphane Guillou (stragu) 2023-04-11 20:45:49 UTC
Reproduced with example file on Linux with:

Version: 7.5.2.2 (X86_64) / LibreOffice Community
Build ID: 53bb9681a964705cf672590721dbc85eb4d0c3a2
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Crash report: https://crashreport.libreoffice.org/stats/crash_details/7dd845be-36e6-4125-b1c4-b4bfb1d684d3

Bibisected with linux-64-7.5 repo to first bad commit 26df1f7741d17252d455fe4401ca5775c46826f9 which points to core commit:

commit 5d683e8f6c9e677d7b6bc829a4ce9ee384f4fbd8
author	Maxim Monastirsky <momonasmon@gmail.com>	Sun Nov 13 11:05:28 2022 +0200
committer	Maxim Monastirsky <momonasmon@gmail.com>	Mon Nov 21 14:38:59 2022 +0100
Export modified table styles
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143011

But as Julien suspected, fixed in:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: fc6806c4be8585ce0d35a6b581bf8b3dbf858500
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Thank you Joysn, Julien and Caolán !
Comment 6 Telesto 2023-04-17 06:04:47 UTC
*** Bug 154845 has been marked as a duplicate of this bug. ***
Comment 7 Commit Notification 2023-04-18 09:10:06 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/128c64fd110254577d31c5bd053aa98d8c0676ed

tdf#154754: sd_export_tests: Add unittest

It will be available in 7.6.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 8 Xisco Faulí 2023-04-19 13:37:02 UTC
*** Bug 154908 has been marked as a duplicate of this bug. ***