Bug 153794 - Crash on file open because theme without name was written to file
Summary: Crash on file open because theme without name was written to file
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
7.6.0.0 alpha0+
Hardware: All All
: medium critical
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Document-Themes
  Show dependency treegraph
 
Reported: 2023-02-23 21:04 UTC by Regina Henschel
Modified: 2023-06-24 10:42 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Produced file that gives crash on opening (14.32 KB, application/vnd.oasis.opendocument.presentation)
2023-02-23 21:04 UTC, Regina Henschel
Details
bt with debug symbols (11.33 KB, text/plain)
2023-02-24 11:56 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2023-02-23 21:04:11 UTC
Created attachment 185558 [details]
Produced file that gives crash on opening

I have worked with a file in Impress, that has theme color. So my 'Recent colors' contains theme colors (e.g. accent3) and the Area tab of Area dialog has the selection "Theme colors".
Then I started a new file in Impress. I have inserted a rectangle and filled it with a gradient. I have used the Area dialog to set start and end color of the gradient. The Area dialog opens with Area tab and selection "Theme colors". Of case there were no theme colors, because the document template on which the new file was based has no theme colors. But I have used colors from the 'Recent colors'. Those have still tooltips saying 'accent3' for example. Then I saved the file.
When I reopen the file LibreOffice crashes. The produced file is attached.
Comment 1 Stéphane Guillou (stragu) 2023-02-24 11:00:00 UTC
Crash confirmed with:

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

In the console, I get:

warn:xmloff:38166:38166:xmloff/source/draw/ximpstyl.cxx:908: unknown element urn:oasis:names:tc:opendocument:xmlns:drawing:1.0 draw:gradient
warn:xmloff:38166:38166:xmloff/source/draw/ximpstyl.cxx:908: unknown element urn:oasis:names:tc:opendocument:xmlns:drawing:1.0 draw:gradient
warn:xmloff:38166:38166:xmloff/source/draw/ximpstyl.cxx:908: unknown element urn:oasis:names:tc:opendocument:xmlns:drawing:1.0 draw:gradient
warn:xmloff:38166:38166:xmloff/source/draw/ximpstyl.cxx:908: unknown element urn:oasis:names:tc:opendocument:xmlns:drawing:1.0 draw:gradient
warn:xmloff:38166:38166:xmloff/source/draw/ximpstyl.cxx:908: unknown element urn:oasis:names:tc:opendocument:xmlns:drawing:1.0 draw:gradient
warn:xmloff:38166:38166:xmloff/source/draw/ximpstyl.cxx:908: unknown element urn:oasis:names:tc:opendocument:xmlns:drawing:1.0 draw:gradient
warn:xmloff:38166:38166:xmloff/source/draw/ximpstyl.cxx:908: unknown element urn:oasis:names:tc:opendocument:xmlns:drawing:1.0 draw:gradient
warn:xmloff:38166:38166:xmloff/source/draw/ximpstyl.cxx:908: unknown element urn:oasis:names:tc:opendocument:xmlns:drawing:1.0 draw:gradient
warn:xmloff:38166:38166:xmloff/source/draw/ximpstyl.cxx:908: unknown element urn:oasis:names:tc:opendocument:xmlns:drawing:1.0 draw:gradient
warn:xmloff:38166:38166:xmloff/source/draw/ximpstyl.cxx:908: unknown element urn:oasis:names:tc:opendocument:xmlns:drawing:1.0 draw:marker
warn:xmloff:38166:38166:xmloff/source/draw/ximpstyl.cxx:908: unknown element urn:oasis:names:tc:opendocument:xmlns:style:1.0 style:default-style
Comment 2 Julien Nabet 2023-02-24 11:56:00 UTC
Created attachment 185562 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today, I could reproduce this.
Comment 3 Regina Henschel 2023-03-02 21:33:46 UTC
I can no longer create such document with Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 1309e6332d7ff2bd1f9b6bf87385b8b570e59158
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
The theme color set is not written, if not available for that document.

But if the attribute loext:name is missing, LO still crashes. So this crash needs to be fixed or the "name" attributes need to be mandatory in the schema. Currently they are 'optional'.
Comment 4 Stéphane Guillou (stragu) 2023-03-08 10:21:37 UTC
Regression in 7.6 as I can't reproduce in 7.5:

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

Bisected with linux-64-7.6 repo to first bad commit ac0beebc61696340f24c01ab3aaca86c5266db48 which points to core commit:

commit 75c0d7827625c683d52a9e2f3a7c514df890107b
author	Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>	Fri Jan 27 15:03:09 2023 +0900
committer	Tomaž Vajngerl <quikee@gmail.com>	Tue Jan 31 08:59:09 2023 +0000
tree 8ac5856ae7ae10a1aa558dfe2eca3fbe918d842d
parent ed9d987e2ad8f6af554a5fc1f858ca48c6970446
sd: use XTheme to transport the theme to xmloff import/export
Refactor the existing places and tests in Impress code (sd) to
use it instead.
Also keep the old property of construction and view of the theme
with a sequence of property values, but  under the new property
named "ThemeUnoRepresentation". This is needed by the UI tests
currently.
Change-Id: I484567f4a603f1a5e2e03955fdd2b63132dcc66e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146225

Tomaž, can you please have a look?
Comment 5 Regina Henschel 2023-04-17 13:36:12 UTC
I can no longer reproduce the crash with Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 4829a85d0753c93419bd46b1d50bcfa6f0f3f1da
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (en_US); UI: en-US
Calc: CL threaded

Does it work with a daily build for you too? If yes, please close the bug.
Comment 6 Julien Nabet 2023-04-17 14:51:35 UTC
Just for the record, with master sources updated today, I don't reproduce the crash anymore when opening the first attachment of the bugtracker.
Comment 7 Timur 2023-06-24 10:23:27 UTC
No crash, do not know why this stayed open, I close.
Comment 8 Timur 2023-06-24 10:42:43 UTC
Fixed with:
commit 4f347ebabad6355014889f0a81b107dc774590fe	[log]
author	Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>	Sat Feb 25 19:12:23 2023 
committer	Tomaž Vajngerl <quikee@gmail.com>	Sat Apr 08 07:56:19 2023 
tree 377e010ec06cf3aed7caf5d04cddf28518fbc676
parent ad5756f0529a80fbb537979bcfd9de7a83a69805 [diff]

use shared_ptr for model::Theme instead of unique_ptr