Bug 121815 - Crash in: FreetypeFont::GetFtFace
Summary: Crash in: FreetypeFont::GetFtFace
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
6.2.0.0.beta1+
Hardware: x86-64 (AMD64) Linux (All)
: high major
Assignee: Not Assigned
URL:
Whiteboard: target:6.3.0 target:6.2.0.1
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks:
 
Reported: 2018-11-30 10:42 UTC by Marcel Waldvogel
Modified: 2018-12-12 12:44 UTC (History)
3 users (show)

See Also:
Crash report or crash signature: ["FreetypeFont::GetFtFace"]


Attachments
Crashes Writer when opened together with an untitled Writer document (5.49 MB, application/vnd.oasis.opendocument.text)
2018-12-01 14:50 UTC, Marcel Waldvogel
Details
gdb backtrace (60.53 KB, text/plain)
2018-12-02 14:26 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel Waldvogel 2018-11-30 10:42:56 UTC
This bug was filed from the crash reporting server and is br-80766457-0002-4b44-baed-a0082c8e7567.
=========================================
I do have regular crashes with 6.2.0 beta (and had with alpha as well), often connected to the opening of files. The same files on the same machine with 6.1.2 (Ubuntu 18.10) work like a charm.

Here, I started typing for a bullet point in a slide, when it crashed. I had opened a Writer document a few seconds before.

I do not know whether this is related, but with 6.2.0 alpha, activating Impress presentation mode sometimes resulted in no fonts being displayed. Fonts were shown correctly in the editor, but not in presentation mode. Restarting LibreOffice fixed this problem.
Comment 1 Roman Kuznetsov 2018-12-01 08:09:41 UTC
please write more clear steps for repro of your problem
Comment 2 Xisco Faulí 2018-12-01 10:56:12 UTC
Thank you for reporting the bug. To be certain the reported issue is not
related to corruption in the user profile, could you please reset your
Libreoffice profile ( https://wiki.documentfoundation.org/UserProfile ) and
re-test?

I have set the bug's status to 'NEEDINFO'. Please change it back to
'UNCONFIRMED' if the issue is still present
Comment 3 Marcel Waldvogel 2018-12-01 14:50:14 UTC
Created attachment 147196 [details]
Crashes Writer when opened together with an untitled Writer document
Comment 4 Marcel Waldvogel 2018-12-01 14:54:25 UTC
Reproducibility: The crashes I described did not follow a specific pattern, except that after crash/(safe mode)/recovery, it crashed again.

Here is (after some experimenting) how I can crash 6.2.0 beta1 reliably:

0. (Optionally) Erase the profile
1. Start LibreOfficeDev Writer
2. This opens a new "Untitled1" Writer document.
3. Without closing that "Untitled1", open the attached file "QuickBrown.odt"
4. Before the progress bar reaches 100%, LibreOfficeDev crashes
5. When trying to recover the files on next launch, it crashes again

I hope this helps. Maybe it is related to one of the fonts installed, but then again, it shouldn't crash LibreOffice (and doesn't crash 6.1.2)
Comment 5 Roman Kuznetsov 2018-12-01 16:09:03 UTC
(In reply to Marcel Waldvogel from comment #4)
> Reproducibility: The crashes I described did not follow a specific pattern,
> except that after crash/(safe mode)/recovery, it crashed again.
> 
> Here is (after some experimenting) how I can crash 6.2.0 beta1 reliably:
> 
> 0. (Optionally) Erase the profile
> 1. Start LibreOfficeDev Writer
> 2. This opens a new "Untitled1" Writer document.
> 3. Without closing that "Untitled1", open the attached file "QuickBrown.odt"
> 4. Before the progress bar reaches 100%, LibreOfficeDev crashes
> 5. When trying to recover the files on next launch, it crashes again
> 
> I hope this helps. Maybe it is related to one of the fonts installed, but
> then again, it shouldn't crash LibreOffice (and doesn't crash 6.1.2)

I got some freeze when I opened attached file, but no crash in

Version: 6.2.0.0.beta1 (x64)
Build ID: d1b41307be3f8c19fe6f1938cf056e7ff1eb1d18
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
Locale: ru-RU (ru_RU); UI-Language: en-US
Calc: CL

Linux only?
Comment 6 Marcel Waldvogel 2018-12-02 11:47:08 UTC
"Freeze" as in "you have to kill the process"?

I have only tried on Linux so far.

Using GDB, I found out that CairoTextRender::DrawTextLayout() calls FreetypeFont::GetFtFace() with a NULL self.

(Without source references, digging deeper is hard. Is there a way to get full debugging information activated without me having to build from source code?)
Comment 7 Roman Kuznetsov 2018-12-02 12:21:30 UTC
(In reply to Marcel Waldvogel from comment #6)
> "Freeze" as in "you have to kill the process"?
> 
No, just a some pause when I try open file from attach
Comment 8 Xisco Faulí 2018-12-02 14:00:49 UTC
Indeed, it crashes if a blank document is open, but not if it's not.

Version: 6.3.0.0.alpha0+
Build ID: 4da61d4cc8f70ff62d7bac23a1b97d9d7011a678
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded
Comment 9 Xisco Faulí 2018-12-02 14:22:57 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=02a2b75550e8e94e29d252178cfb223452812d2b

author	Jan-Marek Glogowski <glogow@fbihome.de>	2018-10-30 12:44:06 +0000
committer	Jan-Marek Glogowski <glogow@fbihome.de>	2018-10-30 16:12:56 +0100
commit 02a2b75550e8e94e29d252178cfb223452812d2b (patch)
tree 6377c79daa1aaa75cf94f6f2921fd10efe3c8579
parent b9e4bb65bcd7600f8e9150aa18ecd2527646ae05 (diff)
Fix SalLayoutGlyphs copy constructor

Bisected with: bibisect-linux64-6.2

Adding Cc: to Jan-Marek Glogowski
Comment 10 Xisco Faulí 2018-12-02 14:26:35 UTC
Created attachment 147226 [details]
gdb backtrace
Comment 11 Commit Notification 2018-12-04 18:09:03 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/9e2e6c27231f916fec349ff60cb0f2c12e0988ad%5E%21

tdf#121815 just use valid cached layout glyphs

It will be available in 6.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 12 Commit Notification 2018-12-05 07:54:43 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

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

tdf#121815 just use valid cached layout glyphs

It will be available in 6.2.0.1.

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 13 Xisco Faulí 2018-12-12 12:44:57 UTC
Verified in

Version: 6.3.0.0.alpha0+
Build ID: 3911bf8364dae4c855ad37237c114f9007f70657
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@jan-marek glogowski, thanks for fixing this!!