Bug 144624 - LibreOffice with "gen" UI backend crashes on Linux of SVG icon theme is default
Summary: LibreOffice with "gen" UI backend crashes on Linux of SVG icon theme is default
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
7.1.5.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.3.0 target:7.2.3
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-20 13:35 UTC by Aleksei Nikiforov
Modified: 2021-09-23 10:39 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
backtrace.txt (21.56 KB, text/plain)
2021-09-20 13:35 UTC, Aleksei Nikiforov
Details
gdb.txt.gz (181.12 KB, application/gzip)
2021-09-20 14:11 UTC, Aleksei Nikiforov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aleksei Nikiforov 2021-09-20 13:35:32 UTC
Created attachment 175141 [details]
backtrace.txt

LibreOffice crashes if SVG icon theme is selected as default and Generic/X11 VCL backend is used.

Reproduction:
1. Run LibreOffice.
2. Go to menu "Tools" -> "Options", open "LibreOffice" -> "View" tab.
3. Select any SVG icon style, for example, "Breeze (SVG)", apply and close menu.
4. Exit LibreOffice.
5. Start LibreOffice again, force Generic/X11 backend:
$ SAL_USE_VCLPLUGIN="gen" soffice

Result:
LibreOffice crashes.

Expected result:
Successful launch.

Additional information.
It looks like when rendering SVG icons infinite recursion happens, eventually stack ends and application crashes. Part of backtrace is attached.

Issue reproduces on Linux/X11 with "gen" backend. It does not reproduce with "gtk3", "qt5" and "kf5" backends. Reproduced both on 7.1.5.2 and 7.2.0.1.

Version: 7.1.5.2 / LibreOffice Community
Build ID: 10(Build:2)
CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: x11
Locale: en-US (C); UI: en-US
Calc: threaded
Comment 1 Mike Kaganski 2021-09-20 14:09:13 UTC
Repro using Version: 7.2.1.2 / LibreOffice Community
Build ID: 20(Build:2)
CPU threads: 4; OS: Linux 5.11; UI render: default; VCL: x11
Locale: en-US (en_US.UTF-8); UI: en-US
Ubuntu package version: 1:7.2.1~rc2-0ubuntu0.20.04.1~lo3
Calc: threaded
Comment 2 Aleksei Nikiforov 2021-09-20 14:11:28 UTC
Created attachment 175143 [details]
gdb.txt.gz

Full backtrace, compressed. Uncompressed size: 5.8 MB.

Both backtraces are from version 7.2.0.1.
Comment 3 Julien Nabet 2021-09-21 19:09:26 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.

It seems LO is in a kind of loop, I tried to retrieved a bt but I got more than 6000 frames.
If I remember well, with svg theme, we try to load svg icons but also png ones for  fallback mechanism or something?
Comment 4 Commit Notification 2021-09-23 09:37:02 UTC
Aleksei Nikiforov committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9b4478e62c712ef0f75c4a001e260dfdd6b3ca4c

tdf#144624 Prevent infinite recursion when loading SVG icon

It will be available in 7.3.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 Caolán McNamara 2021-09-23 09:44:37 UTC
fixed in trunk, backport to 7-2 in gerrit
Comment 6 Commit Notification 2021-09-23 10:39:54 UTC
Aleksei Nikiforov committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

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

tdf#144624 Prevent infinite recursion when loading SVG icon

It will be available in 7.2.3.

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.