Bug 120982 - crash when launching ./instdir/program/soffice --writer with GTK3 vlcplugin, no crash from startcenter
Summary: crash when launching ./instdir/program/soffice --writer with GTK3 vlcplugin, ...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.2.0.0.alpha1+
Hardware: x86-64 (AMD64) Linux (All)
: high major
Assignee: Not Assigned
URL:
Whiteboard: target:6.2.0
Keywords: bibisected, bisected, regression
: 120987 121009 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-10-28 10:27 UTC by Christian Lohmaier
Modified: 2018-11-02 18:21 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Lohmaier 2018-10-28 10:27:28 UTC
build LibreOffice with GTK3-support, try to launch LibreOffice with
./instdir/program/soffice --writer

→ result is that LibreOffice crashes. (has been reproduced during Hackfest on Debian and Ubuntu and Mageia)

no crash when creating new writer document after having it launched with ./instdir/program/soffice 

I created debug-build with symbols for crashreport server → 
http://crashreport.libreoffice.org/stats/crash_details/30dfde45-1cec-4679-9252-19c5aab62374

(based on 0f190f50368816964b2a1b7bb58000ac1792d640 )
Comment 1 Christian Lohmaier 2018-10-28 11:39:51 UTC
reverting e194f597ae5882e1cda2cac2925577fff609f101 "Change GlyphItem::nFallbackLevel to font instance" makes the error go away...
Comment 2 Xisco Faulí 2018-10-28 16:50:03 UTC
I do confirm it was introduced by https://cgit.freedesktop.org/libreoffice/core/commit/?id=e194f597ae5882e1cda2cac2925577fff609f101. Bisected with bibisect-linux64-6.2
Comment 3 Miklos Vajna 2018-10-29 09:03:10 UTC
Jan-Marek: I think it's not valid to assume "GlyphItems are bound to their GenericSalLayout", GlyphItems are actually stored and reused with later new layouts as well, see e.g. the status bar, menu, ruler or Writer.
Comment 4 Xisco Faulí 2018-10-29 09:13:39 UTC
*** Bug 120987 has been marked as a duplicate of this bug. ***
Comment 5 Xisco Faulí 2018-10-29 10:05:50 UTC
*** Bug 121009 has been marked as a duplicate of this bug. ***
Comment 6 BogdanB 2018-10-29 10:38:01 UTC
About my crash I generated a crash report:
crashreport.libreoffice.org/stats/crash_details/13aeba28-cf91-45d1-9356-1a4cb1e3aa2b

Maybe this help you.
Comment 7 Jan-Marek Glogowski 2018-10-29 12:31:05 UTC
(In reply to Miklos Vajna from comment #3)
> Jan-Marek: I think it's not valid to assume "GlyphItems are bound to their
> GenericSalLayout", GlyphItems are actually stored and reused with later new
> layouts as well, see e.g. the status bar, menu, ruler or Writer.

Yup - that code is broken, as the glyphs just keep a fallout level, which might vary per MultiSalLayout. We're just lucky this doesn't crash more often.

The Glyphs are just supposed to work with the same GenericSalLayout or MultiSalLayout. You don't even know, if a new MultiSalLayout has sufficient levels.
Comment 8 Miklos Vajna 2018-10-29 13:21:15 UTC
The intention with keeping GlyphItems around was that a GlyphItem just contains a glyph id and a position/width, which should be independent from the layout.

So if m_nFallbackLevel refers to the layout that created it, such GlyphItems should not be cached. Perhaps you can check for this in OutputDevice::ImplLayout(), in the SalLayoutFlags::GlyphItemsOnly case -- if fallback level is "not 0" (or something) then return nullptr to indicate no pre-computed layout is possible?

If the fix is more complex than this, then perhaps your fix should be first reverted so there is time to came up with a correct fix.
Comment 9 BogdanB 2018-10-30 08:43:05 UTC
This is the most annoying bug I met in 6.2. It's hard to use 6.2 because of this. Every second times you open it crushes...

See the video here:
https://bugs.documentfoundation.org/show_bug.cgi?id=121009#c5
Comment 10 Commit Notification 2018-10-30 11:47:03 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/71507ba3eb4bc6e8b36cd66b865c49a1b66b787e%5E%21

tdf#120982 add font reference to SalLayoutGlyphsImpl

It will be available in 6.2.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 11 Xisco Faulí 2018-10-31 14:05:07 UTC
Hi Jan-Marek, I'm afraid it's still crashing in

Version: 6.2.0.0.alpha1+
Build ID: 2a06d78483db77aab28eaa522791bb4d96a4094e
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: threaded

while it's not in

Version: 6.2.0.0.alpha1+
Build ID: 2a06d78483db77aab28eaa522791bb4d96a4094e
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk2; 
Locale: ca-ES (ca_ES.UTF-8); Calc: threaded

or calling LibreOffice like instdir/program/soffice
Comment 12 Jan-Marek Glogowski 2018-10-31 18:30:11 UTC
(In reply to Xisco Faulí from comment #11)
> Hi Jan-Marek, I'm afraid it's still crashing.

Yup - I know. It's bug 121030. And there is already a patch in Gerrit, but I didn't get any builds on it since some hours.
Comment 13 Xisco Faulí 2018-11-01 13:31:34 UTC
Seems to be fixed now in

Version: 6.2.0.0.alpha1+
Build ID: 4326fb3ef3ddd7c6f9d08ba96add4f4736503ceb
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: threaded
Comment 14 Xavier Van Wijmeersch 2018-11-01 17:57:43 UTC
Still crashing

Version: 6.2.0.0.alpha1+
Build ID: e49c42d17f50c8b0cac9db08dedc375dd5aa8a98
CPU threads: 8; OS: Linux 4.19; UI render: default; VCL: gtk3; 
Locale: nl-BE (en_US.UTF-8); Calc: threaded
Comment 15 Jan-Marek Glogowski 2018-11-01 19:40:49 UTC
(In reply to Xavier Van Wijmeersch from comment #14)
> Still crashing
> 
> Version: 6.2.0.0.alpha1+
> Build ID: e49c42d17f50c8b0cac9db08dedc375dd5aa8a98
> CPU threads: 8; OS: Linux 4.19; UI render: default; VCL: gtk3; 
> Locale: nl-BE (en_US.UTF-8); Calc: threaded

That's a different crash. You need the fix for bug 121030, commit 4a66d7f0dd40c54307b5f750723f68b53703b01a ("tdf#121030 invalidate referenced FontInstances"), too, which was committed a few hours later.