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

Dirk Mueller mueller at kde.org
Mon Sep 11 22:25:38 BST 2006


On Friday, 8. September 2006 01:51, Andras Mantia wrote:

> 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.

It is the wrong fix, and doesn't actually fix the issue, just makes it less 
likely to crash. the cause is a destruction order issue when the focus is on 
the kate part, due to broken code in kate: 

--- kate/part/kateview.cpp      (revision 583159)
+++ kate/part/kateview.cpp      (working copy)
@@ -172,12 +172,15 @@ KateView::~KateView()

   m_doc->removeView( this );

-  delete m_viewInternal;
-  delete m_codeCompletion;
+  // its a QObject. don't double-delete
+  //delete m_viewInternal;
+  //delete m_codeCompletion;

   delete m_renderer;
+  m_renderer = 0;

   delete m_config;
+  m_config = 0;
   KateFactory::self()->deregisterView (this);
 }

I've added this patch to the kate package in opensuse which should fix the 
issue. we haven't received crash reports since then. 



Dirk




More information about the kde-core-devel mailing list