Bug 58480

Summary: Konqueror crashes instead of showing the "save/open" dialog
Product: [Applications] konqueror Reporter: Malte S. Stretz <mss>
Component: khtmlAssignee: Konqueror Bugs <konqueror-bugs-null>
Status: RESOLVED FIXED    
Severity: major CC: adam.r.hunt, benjamin.gillmann, boban, dbx, lucius1, maksim, michael, olivier.leclant, palantir, scain, tmoser
Priority: NOR    
Version First Reported In: 4.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: backtrace of crashing kongueror
output of konqueror running under valgrind

Description Malte S. Stretz 2003-05-14 16:54:52 UTC
Version:           4.0 (using KDE 3.1.1)
Installed from:    SuSE
Compiler:          gcc version 2.95.3 20010315 (SuSE)
OS:          Linux (i686) release 2.4.18

Hi,

My server was a bit misconfigured and triggered a crash in Konqueror today. It's corrected now, but I can still reproduce it with a similar config. To reproduce it, I do the following:

1. Open a fresh Konqueror (via K->Internet->Konqueror). It should start up with a blank page.
2. Type exactly the following into the address bar: msquadrat.de/env.sh
3. Press return
Konqi will crash now with a segv (bt will be attached). I expected the "save/open" dialog to appear.

It doesn't crash if you include the protocol part "http://" in the address. So I think the problem might be that Konqi queries that address, gets an unknown MIME type (see below) and tries to open the address locally.

The header my server sends is the following:
200 OK
Connection: close
Date: Wed, 14 May 2003 14:48:23 GMT
Accept-Ranges: bytes
Server: Apache/1.3.26 (Unix) Debian GNU/Linux PHP/4.1.2
Content-Length: 58
Content-Type: text/x-sh
ETag: "2b2a7a-3a-3ec255b4"
Last-Modified: Wed, 14 May 2003 14:41:56 GMT
Client-Date: Wed, 14 May 2003 14:48:37 GMT
Client-Peer: 217.160.130.191:80

I asked on IRC and others weren's able to reproduce it, so it might be because of my config:
<Moonflux> hmmm... might somebody check a konqi crash for me?
<Moonflux> so i know if i should file a bug ;)
<tpr> Moonflux, if you can reproduce it, fail a bug.
<tpr> or if you have debugging symbols compiled in.
<Moonflux> tpr: the problem is that i use the suse-rpms -- without debugging symbols
<Moonflux> but i can reproduce it
<Eisfuchs> Moonflux: What do you do to make it crash?
<Moonflux> open up a fresh konqi
<Moonflux> and *type* "msquadrat.de/cgi-bin/env.sh" to the address bar
<Moonflux> hit return -> crash
<Eisfuchs> I get a download dialog here
<Eisfuchs> "Open or Save"
<Moonflux> if i type it with http:// i get that dialog, too
<Moonflux> but without i get a crash
<Moonflux> 3.1.1
<Eisfuchs> Works fine here.
<Moonflux> weird
<tpr> Moonflux, so if you can reproduce it, you should file a bug :p
<tpr> imho.
<Moonflux> tpr: probably
<Eisfuchs> SuSE 8.0 / KDE 3.1 RPOM
<Eisfuchs> -O
<tpr> :p
<tpr> debian unstable / kde 3.1.1 deb ;)
<Moonflux> but what should i write? "this page crashes for me but only me and only i can reproduce it"?
<Moonflux> SuSE 7.3 / KDE 3.1.1 rpms :)
<adrianS> Moonflux: the packages contain debugging symbols for a backtrace (not for code debugging)
<tpr> hm, I don't know :)
<Moonflux> adrianS: hmmm... seems like you're right. after the (no debugging symbols found) there seems to be some useful infrmation
Comment 1 Malte S. Stretz 2003-05-14 16:57:16 UTC
Created attachment 1573 [details]
backtrace of crashing kongueror

seems like it's crashing when it tries to create a 'View' -- whatever that is.
Comment 2 Maksim Orlovich 2003-05-14 17:05:47 UTC
Pasting the backtrace, hoping that the similar crash searcher will see it: 
#0  0x40f0a099 in wait4 () from /lib/libc.so.6 
#1  0x40f828e4 in __DTOR_END__ () from /lib/libc.so.6 
#2  0x40dc7177 in waitpid () from /lib/libpthread.so.0 
#3  0x4057895e in KCrash::defaultCrashHandler () 
   from /opt/kde3/lib/libkdecore.so.4 
#4  0x40dc4bc4 in pthread_sighandler () from /lib/libpthread.so.0 
#5  <signal handler called> 
#6  0x4128be47 in KonqFrame::attachInternal () from /opt/kde3/lib/konqueror.so 
#7  0x4128bd81 in KonqFrame::attach () from /opt/kde3/lib/konqueror.so 
#8  0x4127e445 in KonqView::switchView () from /opt/kde3/lib/konqueror.so 
#9  0x4127d868 in KonqView::KonqView () from /opt/kde3/lib/konqueror.so 
#10 0x412859f6 in KonqViewManager::setupView () from /opt/kde3/lib/konqueror.so 
#11 0x41281e11 in KonqViewManager::Initialize () 
   from /opt/kde3/lib/konqueror.so 
#12 0x41262a3e in KonqMainWindow::openView () from /opt/kde3/lib/konqueror.so 
#13 0x4127cbb4 in KonqRun::foundMimeType () from /opt/kde3/lib/konqueror.so 
#14 0x4003c481 in KParts::BrowserRun::slotBrowserMimetype () 
   from /opt/kde3/lib/libkparts.so.2 
#15 0x4003dc81 in KParts::BrowserRun::qt_invoke () 
   from /opt/kde3/lib/libkparts.so.2 
#16 0x4127d533 in KonqRun::qt_invoke () from /opt/kde3/lib/konqueror.so 
#17 0x408c5d54 in QObject::activate_signal () 
   from /usr/lib/qt3/lib/libqt-mt.so.3 
#18 0x4013f8a5 in KIO::TransferJob::mimetype () from /opt/kde3/lib/libkio.so.4 
#19 0x40131596 in KIO::TransferJob::slotMimetype () 
   from /opt/kde3/lib/libkio.so.4 
#20 0x4013fa94 in KIO::TransferJob::qt_invoke () from /opt/kde3/lib/libkio.so.4 
#21 0x408c5d54 in QObject::activate_signal () 
   from /usr/lib/qt3/lib/libqt-mt.so.3 
#22 0x408c606b in QObject::activate_signal () 
   from /usr/lib/qt3/lib/libqt-mt.so.3 
#23 0x40126cae in KIO::SlaveInterface::mimeType () 
   from /opt/kde3/lib/libkio.so.4 
#24 0x40125440 in KIO::SlaveInterface::dispatch () 
   from /opt/kde3/lib/libkio.so.4 
#25 0x40124afa in KIO::SlaveInterface::dispatch () 
   from /opt/kde3/lib/libkio.so.4 
#26 0x40122d5c in KIO::Slave::gotInput () from /opt/kde3/lib/libkio.so.4 
#27 0x401244a9 in KIO::Slave::qt_invoke () from /opt/kde3/lib/libkio.so.4 
#28 0x408c5d54 in QObject::activate_signal () 
   from /usr/lib/qt3/lib/libqt-mt.so.3 
#29 0x408c5edb in QObject::activate_signal () 
   from /usr/lib/qt3/lib/libqt-mt.so.3 
#30 0x40b21b3d in QSocketNotifier::activated () 
   from /usr/lib/qt3/lib/libqt-mt.so.3 
#31 0x408dcb2f in QSocketNotifier::event () from /usr/lib/qt3/lib/libqt-mt.so.3 
#32 0x4087cf2a in QApplication::internalNotify () 
   from /usr/lib/qt3/lib/libqt-mt.so.3 
#33 0x4087cd37 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3 
#34 0x40515daf in KApplication::notify () from /opt/kde3/lib/libkdecore.so.4 
#35 0x40860f87 in QEventLoop::activateSocketNotifiers () 
   from /usr/lib/qt3/lib/libqt-mt.so.3 
#36 0x4084468b in QEventLoop::processEvents () 
   from /usr/lib/qt3/lib/libqt-mt.so.3 
#37 0x4088d3b0 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3 
#38 0x4088d2f7 in QEventLoop::exec () from /usr/lib/qt3/lib/libqt-mt.so.3 
#39 0x4087d0a6 in QApplication::exec () from /usr/lib/qt3/lib/libqt-mt.so.3 
#40 0x4125da9e in main () from /opt/kde3/lib/konqueror.so 
#41 0x0804d0a6 in strcpy () 
#42 0x0804df28 in strcpy () 
#43 0x0804e435 in strcpy () 
#44 0x0804f2e7 in strcpy () 
#45 0x40e7f7ee in __libc_start_main () from /lib/libc.so.6 
 
Comment 3 Malte S. Stretz 2003-05-14 17:17:37 UTC
hmmm... seems to be the same as bug 53874 (which I can reproduce) and bug 
55124 -- the latter is closed as "FIXED in HEAD". 
Comment 4 Malte S. Stretz 2003-05-14 17:42:57 UTC
Created attachment 1574 [details]
output of konqueror running under valgrind

<SadEagle> Moonflux: As I said, the bug that got marked as a dup, got marked as
such incorrectly, IMHO
<Moonflux> SadEagle: i think you're right. this is not plugin-related but about
unknown MIME types (AFAICS)
<SadEagle> Moonflux:http://bugs.kde.org/show_bug.cgi?id=56627 is a bit like
that, too, but not neccesarily the same.
<SadEagle> Moonflux: And look at the "similar crashes" link on that one
* Moonflux is scrolling through his history for the address...
<Moonflux> the bugzilla-interface sucks for non-developers
<Moonflux> SadEagle: ok, I can reproduce 56627, too ;)
<SadEagle> Moonflux: Interesting. Hmm, could you try reproducing yours with
valgrind? Even w/o lines, it may get a better idea of the problem.
<Moonflux> SadEagle: i'll have a try
<SadEagle> Moonflux: Thanks.
<Moonflux> SadEagle: intersting. konq works as it should if you call it via
"konqueror", ie. if it's initalized with the folder view
<Moonflux> I'll have a try with "kfmclient openProfile webbrowsing"
<Moonflux> SadEagle: how can I prevent kfmclient from forking so that konquror
runs in valgrind?
<SadEagle> Moonflux: You can't do that with kfmclient, as it's a launcher.. Try
konqueror --profile webbrowsing, though


valgrind -v konqueror --profile webbrowsing 2>&1 | tee out
Comment 5 Maksim Orlovich 2003-05-14 19:30:36 UTC
*** Bug 53874 has been marked as a duplicate of this bug. ***
Comment 6 Maksim Orlovich 2003-05-14 19:32:29 UTC
*** Bug 55124 has been marked as a duplicate of this bug. ***
Comment 7 Maksim Orlovich 2003-05-14 19:55:32 UTC
*** Bug 56627 has been marked as a duplicate of this bug. ***
Comment 8 Maksim Orlovich 2003-05-14 19:56:07 UTC
*** Bug 55003 has been marked as a duplicate of this bug. ***
Comment 9 Maksim Orlovich 2003-05-14 20:00:50 UTC
*** Bug 50988 has been marked as a duplicate of this bug. ***
Comment 10 Maksim Orlovich 2003-05-14 20:02:21 UTC
*** Bug 55936 has been marked as a duplicate of this bug. ***
Comment 11 Maksim Orlovich 2003-05-14 20:02:38 UTC
*** Bug 55090 has been marked as a duplicate of this bug. ***
Comment 12 Maksim Orlovich 2003-05-14 20:06:03 UTC
Can confirm -- requires Web browsing profile to have no default view.  
Elevating to major as a frequently reported crash. 
Will e-mail kfm-devel with analysis this evening 
Comment 13 Malte S. Stretz 2003-05-21 08:51:40 UTC
Hmmm... seems like my old bug 52326 is caused by the same or at least a similar 
problem. 
Comment 14 Waldo Bastian 2003-05-21 13:05:48 UTC
*** Bug 52198 has been marked as a duplicate of this bug. ***
Comment 15 Waldo Bastian 2003-05-21 13:19:48 UTC
*** Bug 52326 has been marked as a duplicate of this bug. ***
Comment 16 Waldo Bastian 2003-05-23 13:43:37 UTC
Subject: kdebase/konqueror

CVS commit by waba: 

CCMAIL: 58480-done@bugs.kde.org
Don't crash when no suitable factory can be found for a new window. (BR58480)


  M +1 -5      konq_mainwindow.cc   1.1167
  M +5 -0      konq_viewmgr.cc   1.220


--- kdebase/konqueror/konq_viewmgr.cc  #1.219:1.220
@@ -60,4 +60,9 @@ KonqView* KonqViewManager::Initialize( c
   KTrader::OfferList partServiceOffers, appServiceOffers;
   KonqViewFactory newViewFactory = createView( serviceType, serviceName, service, partServiceOffers, appServiceOffers, true );
+  if ( newViewFactory.isNull() )
+  {
+    kdDebug(1202) << "KonqViewManager::Initialize() No suitable factory found." << endl;
+    return 0;
+  }
   KonqView* childView = setupView( m_pMainWindow, newViewFactory, service, partServiceOffers, appServiceOffers, serviceType, false );
   setActivePart( childView->part() );

--- kdebase/konqueror/konq_mainwindow.cc  #1.1166:1.1167
@@ -756,9 +756,5 @@ bool KonqMainWindow::openView( QString s
 
       if ( !childView )
-      {
-          KMessageBox::sorry( 0L, i18n( "Could not create view for %1\nThe diagnostics is:\n%2").arg(serviceType)
-              .arg(KLibLoader::self()->lastErrorMessage()) );
-          return true; // fake everything was ok, we don't want to propagate the error
-      }
+          return false; // It didn't work out.
   }
   else // We know the child view


Comment 17 Stephan Kulow 2003-05-24 13:10:54 UTC
*** Bug 58882 has been marked as a duplicate of this bug. ***
Comment 18 Maksim Orlovich 2003-05-29 22:11:35 UTC
*** Bug 59118 has been marked as a duplicate of this bug. ***
Comment 19 John Firebaugh 2003-07-07 08:34:32 UTC
*** Bug 60439 has been marked as a duplicate of this bug. ***
Comment 20 Maksim Orlovich 2003-07-11 15:28:57 UTC
*** Bug 61091 has been marked as a duplicate of this bug. ***
Comment 21 Stephan Kulow 2003-11-06 10:55:40 UTC
*** Bug 67384 has been marked as a duplicate of this bug. ***