bugfix update in Fedora 29 for inkscape

Status: obsolete

Patch for text crash.

Comments 14

This update has been submitted for testing by limb.

limb edited this update.

This update has been pushed to testing.

It does not crash, but now clicking after the last character or between the last two characters will place the cursor before the last two characters. I submitted an (untested) alternative patch on the upstream bug, maybe it helps?

fixes my textbox crashes

fixes my textbox crashes

May I have a link to that patch, please?


--- src/libnrtype/Layout-TNG-OutIter.cpp.orig   2019-01-11 19:56:12.701209914 +0100
+++ src/libnrtype/Layout-TNG-OutIter.cpp    2019-01-11 19:58:19.624114664 +0100
@@ -46,7 +46,8 @@
             best_x_difference = this_x_difference;
-    if (best_char_index == -1) return iterator(this, char_index);
+    if (best_char_index == -1) best_char_index = char_index;
+    if (best_char_index == _characters.size()) return end();
     return iterator(this, best_char_index);

Awesome! Most of those bugs are fixed now. I'm seeing same behaviour the anonymous user reported.

File from #1573152 still crashes inkscape, but only when using Open with... -> inkscape (in Cinnamon). Drag'n'drop or Open menu in inkscape loads it successfully.

With steps from #1612618 i still can reproduce the crash.

karma: +1 #1573152: -1 #1577125: +1 #1580211: +1 #1608371: +1 #1612618: -1 #1657329: +1 #1665402: +1

Hmm, yes, #1612618 still crashes, so I tried it in gdb. This is half-guessing (i.e. untested): in src/libnrtype/Layout-TNG-OutIter.cpp, there is the function

bool Layout::iterator::nextLineCursor(int n) {
    // ...
    _char_index = _parent_layout->_cursorXOnLineToIterator(line_index + n, _x_coordinate)._char_index;
    _glyph_index = _parent_layout->_characters[_char_index].in_glyph;
    return true;

_char_index can actaully be _characters.size(), so I think it could be fixed by changing the last lines to:

bool Layout::iterator::nextLineCursor(int n) {
    // ...
    _char_index = _parent_layout->_cursorXOnLineToIterator(line_index + n, _x_coordinate)._char_index;
    if (_char_index == _characters.size())
        _glyph_index = _glyphs.size();
        _glyph_index = _parent_layout->_characters[_char_index].in_glyph;
    return true;

(Sorry if this is not the right place to post tentative patches.)


I've had the best luck with https://launchpadlibrarian.net/405852336/inkscape-0.92.3-oob.patch by itself. I'll update to use that.

This update has been obsoleted by inkscape-0.92.3-10.fc29.

Content Type
Test Gating
Submitted by
Update Type
Update Severity
stable threshold: 3
unstable threshold: -3
submitted 6 months ago
in testing 6 months ago
modified 6 months ago

Related Bugs 7

-10 #1573152 Inkscape crash in sp_document_namedview
0+1 #1577125 inkscape killed by SIGABRT - when double-clicking text with cursor tool
0+1 #1580211 Editing text on inkscape aborts in "Inkscape::Text::Layout::_cursorXOnLineToIterator"
0+1 #1608371 Inkscape crashes on selecting boxed text
-10 #1612618 Inkscape crashes when hitting ENTER on text input
0+1 #1657329 Issue with Text
0+1 #1665402 Inkscape segfaults after hitting the End key and an Down Arrow key while editing text.

Automated Test Results