[PATCH] Avoid crash in Konsole (TEWidget::setCursorPos)

Robert Knight robertknight at gmail.com
Fri Sep 8 03:21:57 BST 2006


Hi,

Forgot to mention - could you use gdb to find the values of the
variables referenced in these two lines (just above the call to
setMicroFocusHint) when the crash occurs:

    ypos = bY + tLy + font_h*(cury-1) + font_a;
    xpos = bX + tLx + font_w*curx;


Regards,
Robert.

On 08/09/06, Robert Knight <robertknight at gmail.com> wrote:
> Hi,
>
> > An alternative way to avoid the crash was not calling the
> > setMicroFocusHint if xpos or ypos is less than zero, but that might be a
> > worser "fix".
>
> xpos or ypos being < 0 should not happen.  The proposed patch
> unfortunately just papers over the crack.
>
> Regards,
> Robert.
>
> On 08/09/06, Andras Mantia <amantia at kde.org> wrote:
> > Hi,
> >
> >  KDevelop users frequently experience crashes on project loading. I know
> > about two backtraces which always end with a call to
> > QWidget::setMicroFocusHint and from there a
> > QXIMInputContext::setMicroFocus call (actually the
> > QWidget::mapFromGlobal is the one which crashes). Altough I
> > don't know the exact reason, I could find out that the crash only
> > happens if the widget for what setMicroFocusHint is called does not
> > have the focus.
> >  I could workaround in KDevelop one of the cases where the katepart was
> > involved, but for the second case where the embedded konsole part is
> > crashing I couldn't see any solution. Both KDevelop's code and the
> > konsolePart constructor tries to set the focus to the embedded widget,
> > but it still doesn't get it or loses it later. As a solution I would
> > recommend the following patch. This fixes the KDevelop problem, but I
> > have no idea if it has any bad effects or not.
> > An alternative way to avoid the crash was not calling the
> > setMicroFocusHint if xpos or ypos is less than zero, but that might be a
> > worser "fix".
> >
> > Please comment, otherwise I will commit before 3.5.5 is tagged.
> >
> > Andras
> > --
> > Quanta Plus developer - http://quanta.kdewebdev.org
> > K Desktop Environment - http://www.kde.org
> >
> >
> >
>




More information about the kde-core-devel mailing list