Bug 1665402

Summary: Inkscape segfaults after hitting the End key and an Down Arrow key while editing text.
Product: [Fedora] Fedora Reporter: Lukas Ruzicka <lruzicka>
Component: inkscapeAssignee: Gwyn Ciesla <gwync>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 29CC: duffy, gwync, jonathan.underwood, lkundrak, rlerch, tspiteri
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: inkscape-0.92.4-1.fc29 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-01-21 02:02:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch to fix end of line crash none

Description Lukas Ruzicka 2019-01-11 09:50:08 UTC
If you try editing text in a text frame and the text is so long that it spans over several lines, Inkscape crashes whenever you hit the END key and then the DOWN ARROW key. You have to this type of movement when you double click a text frame to start editing the text and the cursor is put in the middle of the text (let's say on the second line of four). You then press the END key to arrive at the end of the text which does not happen, because you only arrive at the end of that respective line. They you hit the DOWN ARROW key to come to the next line and Inkscape crashes in that moment.

To reproduce:

1. Start Inkscape.
2. Add a text frame and start writing a text.
3. Make it long so that expands over several lines.
4. Click in the middle of the text to put the cursor on a non-ultimate line.
5. Hit END key to move to the end of the text (that does not happen, because you arrive at the end of that line only.
6. Press DOWN ARROW to move to the next line.
7. Inkscape crashes.

It leaves the following trace:

/usr/include/c++/8/bits/stl_vector.h:950: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) const [with _Tp = Inkscape::Text::Layout::Character; _Alloc = std::allocator<Inkscape::Text::Layout::Character>; std::vector<_Tp, _Alloc>::const_reference = const Inkscape::Text::Layout::Character&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]: Assertion '__builtin_expect(__n < this->size(), true)' failed.

Software versions:
Fedora 29
Inkscape 0.92 (inkscape-0.92.3-5.fc29.x86_64)

Comment 1 Fedora Update System 2019-01-11 19:08:28 UTC
inkscape-0.92.3-9.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-7f9bfd58d0

Comment 2 Fedora Update System 2019-01-12 02:31:02 UTC
inkscape-0.92.3-9.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-7f9bfd58d0

Comment 3 Fedora Update System 2019-01-15 08:16:21 UTC
inkscape-0.92.3-10.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-5de93d92bd

Comment 4 Trevor Spiteri 2019-01-15 13:03:44 UTC
Created attachment 1520769 [details]
Patch to fix end of line crash

This patch (applied after applying inkscape-0.92.3-oob.patch of inkscape-0.92.3-10.fc29) fixes bugs #1612618 and #1665402 for me.

Comment 5 Fedora Update System 2019-01-15 16:39:06 UTC
inkscape-0.92.3-11.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-85f17f2be2

Comment 6 Fedora Update System 2019-01-16 03:31:21 UTC
inkscape-0.92.3-11.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-85f17f2be2

Comment 7 Fedora Update System 2019-01-18 17:57:06 UTC
inkscape-0.92.4-1.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-1dd63e1bd4

Comment 8 Fedora Update System 2019-01-19 04:28:45 UTC
inkscape-0.92.4-1.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-1dd63e1bd4

Comment 9 Fedora Update System 2019-01-21 02:02:24 UTC
inkscape-0.92.4-1.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.