Bug 147705 - CRASH when pressing compose key
Summary: CRASH when pressing compose key
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.2.5.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.4.0 target:7.3.1 target:7.2.6
Keywords: haveBacktrace
Depends on:
Blocks: KDE, KF5
  Show dependency treegraph
 
Reported: 2022-02-28 23:31 UTC by Hamish
Modified: 2022-03-03 10:27 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Backtrace (15.65 KB, text/x-log)
2022-03-02 00:27 UTC, Hamish
Details
Screenshot where compose key can be configured in Plasma systemsettings (94.38 KB, image/png)
2022-03-03 09:16 UTC, Michael Weghorn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hamish 2022-02-28 23:31:11 UTC
Description:
In Calc, Draw, Impress, Math and Writer (don't use other components), pressing the system compose key crashes LibreOffice

Steps to Reproduce:
1.Define any compose key in KDE system settings (tested using CapsLock, AltGr)
2.Open any new or existing file in Calc, Draw, Impress, Math or Writer
3.(Draw only) Create a text box to enable text entry
4.(Impress only) Click into "Click to add Title/Text" field
5.Press compose key

Actual Results:
LibreOffice crashes to desktop, then automatically restarts with Document Recovery. Calc/Draw/etc runs normally again once recovery is complete

Expected Results:
Allow to complete composing of special characters (or if compose is unsupported, nothing)


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 7.2.5.2.0+ / LibreOffice Community
Build ID: 20(Build:2)
CPU threads: 8; OS: Linux 5.16; UI render: default; VCL: kf5 (cairo+xcb)
Locale: en-GB (en_GB.UTF-8); UI: en-US
7.2.5-4
Calc: threaded

Compose key works normally in other programs (tested in Konsole, Kate, Firefox, Zoom)
Insert > Special character works normally

If LibreOffice was started from a console, it always prints exactly the following to the console as it crashes:

 /usr/include/c++/11.2.0/bits/stl_vector.h:1045: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = ExtTextInputAttr; _Alloc = std::allocator<ExtTextInputAttr>; std::vector<_Tp, _Alloc>::reference = ExtTextInputAttr&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]: Assertion '__n < this->size()' failed.
Comment 1 Julien Nabet 2022-03-01 19:54:47 UTC
Would it be possible you attach a backtrace? (see https://wiki.documentfoundation.org/QA/BugReport/Debug_Information#GNU.2FLinux:_How_to_get_a_backtrace)
Comment 2 Hamish 2022-03-02 00:27:00 UTC
Created attachment 178608 [details]
Backtrace

Is this any good? I can do another if it hasn't worked properly
Comment 3 Julien Nabet 2022-03-03 07:49:15 UTC
Jan-Marek/Michael: thought you might be interested in this one since it concerns KDE, I don't know if the bt contains enough info to help here.
Comment 4 Michael Weghorn 2022-03-03 09:16:14 UTC
Created attachment 178629 [details]
Screenshot where compose key can be configured in Plasma systemsettings
Comment 5 Michael Weghorn 2022-03-03 09:20:19 UTC
This has already been fixed in

commit 05b067f05c561b1993deeea84a5700805bc9c3a6
Author: Caolán McNamara <caolanm@redhat.com>
Date:   Sat Feb 5 20:38:53 2022 +0000

    qt5: crash entering ë with french IM
    
    which for me with french IM enabled on my keyboard is physically
    AltGr+[ (crashes here on trying to underline ¨ with a length of 2)
    then e.
    
    Change-Id: Id59bd84af2ab4d8403b11b1a13efb2bbdb608199
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129538
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm@redhat.com>

I just double-checked that I can reproduce the crash when I revert the above commit locally.

The fix is contained in LibreOffice 7.2.6 as well.

I don't know much about how to use that compose key feature, but at least pressing Compose key and then "e" twice results in a character that looks like "e on its head", which is the same as happens with gtk3, so that looks plausible.

Please open a separate bug report with a more detailed description if specific compose key features are not working as expected.

attachment 178629 [details] shows where the compose key can be configure in systemsettings.
Comment 6 Julien Nabet 2022-03-03 09:24:34 UTC
Thank you Michael for the detailed feedback!
Comment 7 Julien Nabet 2022-03-03 09:27:17 UTC
It's also on 7.3 branch (see https://gerrit.libreoffice.org/c/core/+/129547)
and 7.2 branch (see https://gerrit.libreoffice.org/c/core/+/129539).
I suppose for future 7.3.2 and 7.2.7 (since it's too late for 7.2.6 https://wiki.documentfoundation.org/ReleasePlan/7.2)
Comment 8 Julien Nabet 2022-03-03 09:50:11 UTC
(In reply to Michael Weghorn from comment #5)
> ...
> 
> The fix is contained in LibreOffice 7.2.6 as well.
> ...
Sorry, had missed it! Let's update targets.
Comment 9 Michael Weghorn 2022-03-03 10:04:15 UTC
(In reply to Julien Nabet from comment #8)
> > The fix is contained in LibreOffice 7.2.6 as well.
> > ...
> Sorry, had missed it! Let's update targets.

Thanks! What I did was to run

    git branch -a --contains de72b5f7dd3893ef0d4655cb7943ac0e8ed3c81d

and that listed 'remotes/origin/libreoffice-7-2-6', so it's in the 7-2-6 branch.
Comment 10 Julien Nabet 2022-03-03 10:27:22 UTC
(In reply to Michael Weghorn from comment #9)
> (In reply to Julien Nabet from comment #8)
> > > The fix is contained in LibreOffice 7.2.6 as well.
> > > ...
> > Sorry, had missed it! Let's update targets.
> 
> Thanks! What I did was to run
> 
>     git branch -a --contains de72b5f7dd3893ef0d4655cb7943ac0e8ed3c81d
> 
> and that listed 'remotes/origin/libreoffice-7-2-6', so it's in the 7-2-6
> branch.

Thank you for the info, I didn't know this!
Since git branch -a --contains cc5583d returns remotes/origin/libreoffice-7-3-1, let's update to 7.3.1 for 7.3 branch.