[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    Fixing my first Kate bug
From:       Travis Nicholl <uninja () enigma9 ! org>
Date:       2010-04-30 21:30:23
Message-ID: 1272663023.2791.1.camel () localhost
[Download RAW message or body]

My name is Travis and I am trying to fix my first Kate bug. It shows
itself when I am deleting text in vi-mode. It doesn't happen every time
I delete a line of text using 'dd' but I found a setup in which I can
reproduce this bug.

In KateLayoutCache::viewLine(const KTextEditor::Cursor& realCursor) a
call is made to KateLayoutCache::line(int realLine, int virtualLine) and
assigned to KateLineLayoutPtr thisLine. 

The line function hits the if (realLine < 0 || realLine >=
m_renderer->doc()->lines())
    return KateLineLayoutPtr();

It appears that thisLine is null, so when it is referenced a few lines
down (thisLine->viewLineCount()), there is a SIGABRT, and the following
assert is displayed on the command line: ASSERT: "d" in
file /usr/include/kde4/ksharedptr.h, line 126.

It looks like the pointer returned from the KateLayoutCache::line
function should be checked, but I am unsure what to do if it fails. I
would appreciate any helping in figuring this out, but would like the
experience of filing a bug report and committing any necessary code
changes.

Thanks,
Travis

_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic