[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: little patch for khtml_part.cpp
From: "Andreas Leuner" <al14 () inf ! tu-dresden ! de>
Date: 2005-10-30 16:42:48
Message-ID: 49477.212.144.2.5.1130690568.squirrel () mail ! inf ! tu-dresden ! de
[Download RAW message or body]
Hi all,
When I use valgrind together with konqueror, I see the following output
when I switch from an empty khtmlview (appearing just after startup) to
e.g. a directory view:
Conditional jump or move depends on uninitialised value(s)
at 0x6F8ACE6: KHTMLPart::clear() (khtml_part.cpp:1369)
by 0x6F8DE66: KHTMLPart::begin(KURL const&, int, int) (khtml_part.cpp:1875)
by 0x6F8BA59: KHTMLPart::slotData(KIO::Job*, QMemArray<char> const&)
(khtml_part.cpp:1578)
by 0x6FAF51C: KHTMLPart::qt_invoke(int, QUObject*) (qucom_p.h:316)
by 0x4F570A8: QObject::activate_signal(QConnectionList*, QUObject*)
(qobject.cpp:2356)
by 0x43C9410: KIO::TransferJob::data(KIO::Job*, QMemArray<char> const&)
(jobclasses.moc:993)
by 0x43B1663: KIO::TransferJob::slotData(QMemArray<char> const&)
(job.cpp:900)
by 0x43C9929: KIO::TransferJob::qt_invoke(int, QUObject*) (qucom_p.h:316)
by 0x4F570A8: QObject::activate_signal(QConnectionList*, QUObject*)
(qobject.cpp:2356)
by 0x439F127: KIO::SlaveInterface::data(QMemArray<char> const&)
(slaveinterface.moc:194)
by 0x439B560: KIO::SlaveInterface::dispatch(int, QMemArray<char> const&)
(slaveinterface.cpp:234)
by 0x439B293: KIO::SlaveInterface::dispatch() (slaveinterface.cpp:173)
by 0x4398017: KIO::Slave::gotInput() (slave.cpp:300)
by 0x439A7E6: KIO::Slave::qt_invoke(int, QUObject*) (slave.moc:113)
by 0x4F570A8: QObject::activate_signal(QConnectionList*, QUObject*)
(qobject.cpp:2356)
by 0x4F573FB: QObject::activate_signal(int, int) (qobject.cpp:2449)
by 0x52BD014: QSocketNotifier::activated(int) (moc_qsocketnotifier.cpp:85)
by 0x4F770BE: QSocketNotifier::event(QEvent*) (qsocketnotifier.cpp:258)
by 0x4EF374C: QApplication::internalNotify(QObject*, QEvent*)
(qapplication.cpp:2635)
by 0x4EF2C84: QApplication::notify(QObject*, QEvent*)
(qapplication.cpp:2358)
by 0x49D80D1: KApplication::notify(QObject*, QEvent*)
(kapplication.cpp:550)
by 0x409C633: QApplication::sendEvent(QObject*, QEvent*)
(qapplication.h:496)
by 0x4EE1F9A: QEventLoop::activateSocketNotifiers()
(qeventloop_unix.cpp:578)
by 0x4E98C50: QEventLoop::processEvents(unsigned) (qeventloop_x11.cpp:383)
by 0x4F07DE0: QEventLoop::enterLoop() (qeventloop.cpp:198)
Well this seems to happen because m_bCleared (member of KHTMLPartPrivate)
was not initialised. At least valgrind claims this. Reading the code I see
that m_bCleared would be initialised in the constructor of
KHTMLPartPrivate.
But I guess that no instance of KHTMLPartPrivate seems to be created at
that time.
The following patch makes KHTMLPart::begin initialise m_bCleared just
before calling clear instead of after it which seems to make no sense:
Index: khtml_part.cpp
===================================================================
--- khtml_part.cpp (Revision 474751)
+++ khtml_part.cpp (Arbeitskopie)
@@ -1872,11 +1872,11 @@
}
}
- clear();
d->m_bCleared = false;
d->m_cacheId = 0;
d->m_bComplete = false;
d->m_bLoadEventEmitted = false;
+ clear();
if(url.isValid()) {
QString urlString = url.url();
______________________________________________________________
Andreas Leuner
p.s. Please CC me in replies because I'm not subscribed.
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic