Bug 54397 - clicking email link freezes konqueror
Summary: clicking email link freezes konqueror
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: 4.0
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-10 11:33 UTC by Jens Dagerbo
Modified: 2003-02-16 21:36 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Dagerbo 2003-02-10 11:33:23 UTC
Version:           4.0 (using KDE 3.1.0)
Installed from:    compiled sources
Compiler:          gcc version 3.2.2
OS:          Linux (i686) release 2.4.20-gentoo-r1

Running a freshly built cvs build from KDE_3_1_BRANCH, clicking an email link on a website in konqueror launches kmail fine, but makes the launching instance of konqueror freeze and grab 100% cpu. Need SIGHUP to close it.
Comment 1 Jens Dagerbo 2003-02-11 20:32:33 UTC
I just noticed that this happens in konqueror-as-filemanager also. So, it's apparently 
not a khtml error, at least.  
 
Rightclicking on a directory and selecting "Open Terminal Here" produces the same 
error. Konsole opens fine, Konqueror freezes. 
Comment 2 Jens Dagerbo 2003-02-16 18:58:52 UTC
 
Well.. I managed to trace it to kdelibs/kio/kio/krun.cpp and the 1.215.2.1 -> 1.215.2.2 
change, which was a backport of a broken change from HEAD. 
 
See: 
http://lists.kde.org/?l=kde-cvs&m=104493207421274&w=2 
http://lists.kde.org/?l=kde-cvs&m=104497971105458&w=2 
 
Simply reverting to 1.215.2.1 solved it in my case, but maybe latest HEAD should be 
backported again?  
 
Hope someone sees this before KDE-3.1.1 :) 
 
Comment 3 Dirk Mueller 2003-02-16 21:36:23 UTC
Subject: KDE_3_1_BRANCH: kdelibs/kio/kio

CVS commit by mueller: 

argh. apparently this broken change in HEAD was even backported. so better
backport the fix too. 
CCMAIL: 54397-done@bugs.kde.org


  M +13 -16    krun.cpp   1.215.2.3
  M +3 -0      kservice.h   1.71.2.1


--- kdelibs/kio/kio/krun.cpp  #1.215.2.2:1.215.2.3
@@ -548,5 +548,5 @@ QString KRun::binaryName( const QString 
 }
 
-static pid_t runCommandInternal( KProcess* proc, const KService::Ptr& service, const QString& binName,
+static pid_t runCommandInternal( KProcess* proc, const KService* service, const QString& binName,
     const QString &execName_P, const QString & iconName_P )
 {
@@ -554,5 +554,5 @@ static pid_t runCommandInternal( KProces
   QString execName = execName_P;
   QString iconName = iconName_P;
-  if ( service != NULL && !KDesktopFile::isAuthorizedDesktopFile( service->desktopEntryPath() ))
+  if ( service && !KDesktopFile::isAuthorizedDesktopFile( service->desktopEntryPath() ))
   {
      KMessageBox::sorry(0, i18n("You are not authorized to execute this file."));
@@ -563,7 +563,5 @@ static pid_t runCommandInternal( KProces
   QCString wmclass;
   KStartupInfoId id;
-  if( service != NULL )
-  {
-      if( service->property( "X-KDE-StartupNotify" ).isValid())
+  if( service && service->property( "X-KDE-StartupNotify" ).isValid())
       {
           startup_notify = service->property( "X-KDE-StartupNotify" ).toBool();
@@ -572,5 +570,5 @@ static pid_t runCommandInternal( KProces
       else // non-compliant app ( .desktop file )
       {
-          if( service->type() == "Application" )
+      if( service && service->type() == "Application" )
           {
               startup_notify = true; // doesn't have .desktop entries needed
@@ -578,5 +576,4 @@ static pid_t runCommandInternal( KProces
           }
       }
-  }
   if( startup_notify )
   {
@@ -648,5 +645,5 @@ static pid_t runTempService( const KServ
      *proc << arg;
   }
-  return runCommandInternal( proc, KService::Ptr( new KService( _service ) ), _service.exec(), _service.name(), _service.icon() );
+  return runCommandInternal( proc, &_service, _service.exec(), _service.name(), _service.icon() );
 }
 
@@ -726,5 +723,5 @@ pid_t KRun::runCommand( const QString& c
   QString bin = binaryName( cmd, false );
   KService::Ptr service = KService::serviceByDesktopName( bin );
-  return runCommandInternal( proc, service, bin, execName, iconName );
+  return runCommandInternal( proc, service.data(), bin, execName, iconName );
 }
 

--- kdelibs/kio/kio/kservice.h  #1.71:1.71.2.1
@@ -45,4 +45,7 @@ class KService : public KSycocaEntry
   K_SYCOCATYPE( KST_KService, KSycocaEntry )
 
+  KService(const KService&);
+  KService& operator=(const KService&);
+
   friend class KBuildSycoca;