On the KonqFrame::attach[Internal]() crash (Analysis, #58480 and others)..
Maks Orlovich
mo002j at mail.rochester.edu
Thu May 15 03:33:33 BST 2003
Hi..
Thanks largely to great investigative work by Malte S. Stretz, I think I
understand one of frequently filed Konq crashers (at least 8x); as I can't
fix it myself, though, I guess I'll post it here.
The bt looks basically like this (occasionally the first entry may be cut
off):
#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
Reproduction instructions:
Configure Konqueror to not open a part in the web browsing profile
Run konqueror --profile webbrowsing
Open a website that sends a nonsense mimetype -- #58480 gives
msquadrat.de/env.sh as an example.
<crash>
Analysis:
When running w/o a part, the following code in KonqMainWindow::openView gets
triggered:
// Create a new view
// Initialize always uses force auto-embed even if user setting is
"separate viewer",
// since this window has no view yet - we don't want to keep an empty
mainwindow.
// This can happen with e.g. application/pdf from a target="_blank"
link, or window.open.
childView = m_pViewManager->Initialize( serviceType, serviceName );
KonqViwManager::Initialize calls createView to get a factory, but that fails,
as the mimetype is not handled by anything
(debug output:
kio (KMimeType): WARNING: KServiceType::offers : servicetype text/x-sh not
found
kio (KMimeType): WARNING: KServiceType::offers : servicetype text/x-sh not
found
konqueror: WARNING: KonqFactory::createView : no factory),
so an empty/null factory is returned.
Then setupView is called to create a part, which then passes the null factory
through the KonqView ctor, into KonqView::switchView, and finally into
KonqFrame::attach(). There, we do this:
m_pPart = factory.create( this, "view widget", 0, "" );
And proceed on to attachInternal which happily does stuff like
m_pLayout->addWidget( m_pPart->widget(), 1 ); where m_pPart is null,
thus blowing up.
Obviously, this should be interrupted someplace along the way, but I
don't know where the right spot is. I am willing to do the legwork
if someone just wants to direct me on fixing this.
Thanks,
Maks, 'Looking-through-Bugzilla Eagle'
More information about the kfm-devel
mailing list