Bug 67624 - konqueror crashes when submitting bug on bugs.gentoo.org
Summary: konqueror crashes when submitting bug on bugs.gentoo.org
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR crash
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
: 67404 68537 69386 69600 70276 70710 71055 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-11-08 21:59 UTC by richard
Modified: 2004-11-23 16:25 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Suggested patch (untested) (1.16 KB, patch)
2004-11-23 14:39 UTC, David Faure
Details

Note You need to log in before you can comment on or make changes to this bug.
Description richard 2003-11-08 21:59:22 UTC
Version:            (using KDE KDE 3.1.93)
Installed from:    Gentoo Packages
Compiler:          gcc 3.3 
OS:          Linux

When I submit a bug on bugs.gentoo.org, konqueror crashes immediately. I assume it's something in the "bug submitted" page that causes this, because the bug is entered in the database. This has happened with two bugs I submitted today, but I can't reproduce it again without finding another bug :) The backtrace is identical for both crashes:

Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 12029)]
0x40ffa768 in waitpid () from /lib/libpthread.so.0
#0  0x40ffa768 in waitpid () from /lib/libpthread.so.0
#1  0x4086d150 in __JCR_LIST__ () from /usr/kde/3.2/lib/libkdecore.so.4
#2  0x407b2feb in KCrash::defaultCrashHandler(int) (sig=11) at kcrash.cpp:246
#3  0x40ff9453 in __pthread_sighandler () from /lib/libpthread.so.0
#4  <signal handler called>
#5  0x40b98327 in QObject::inherits(char const*) const ()
   from /usr/qt/3/lib/libqt-mt.so.3
#6  0x41dfcef5 in KHTMLPartBrowserExtension::updateEditActions() (
    this=0x83d70e8) at khtml_ext.cpp:273
#7  0x41dfc9b5 in KHTMLPartBrowserExtension::setExtensionProxy(KParts::BrowserExtension*) (this=0x83d70e8, proxy=0x0) at khtml_ext.cpp:174
#8  0x41de8fc2 in KHTMLPart::slotActiveFrameChanged(KParts::Part*) (
    this=0x83d70e8, part=0x83d6248) at khtml_part.cpp:5797
#9  0x41deaea7 in KHTMLPart::qt_invoke(int, QUObject*) (this=0x837be10, 
    _id=-1073750380, _o=0x0) at khtml_part.moc:504
#10 0x40b9ab7c in QObject::activate_signal(QConnectionList*, QUObject*) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#11 0x40046120 in KParts::PartManager::activePartChanged(KParts::Part*) (
    this=0x8581d98, t0=0x0) at partmanager.moc:156
#12 0x400457da in KParts::PartManager::setActivePart(KParts::Part*, QWidget*) (
    this=0x8581d98, part=0x0, widget=0x0) at partmanager.cpp:443
#13 0x40045399 in KParts::PartManager::removePart(KParts::Part*) (
    this=0x8581d98, part=0x85253e8) at partmanager.cpp:347
#14 0x41dd3651 in KHTMLPart::clear() (this=0x837be10) at khtml_part.cpp:1211
#15 0x41dd5474 in KHTMLPart::begin(KURL const&, int, int) (this=0x837be10, 
    url=@0x83d630c, xOffset=0, yOffset=0) at khtml_part.cpp:1595
#16 0x41dd3ec7 in KHTMLPart::slotData(KIO::Job*, QMemArray<char> const&) (
    this=0x837be10, kio_job=0x88f1c00, data=@0xbfffe770) at khtml_part.cpp:1329
#17 0x41deabe4 in KHTMLPart::qt_invoke(int, QUObject*) (this=0x837be10, 
    _id=-1073748112, _o=0xbfffe41c) at khtml_part.moc:469
#18 0x40b9ab7c in QObject::activate_signal(QConnectionList*, QUObject*) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#19 0x401d3382 in KIO::TransferJob::data(KIO::Job*, QMemArray<char> const&) (
    this=0x88f1c00, t0=0x0, t1=@0x0) at jobclasses.moc:709
#20 0x401c40d7 in KIO::TransferJob::slotData(QMemArray<char> const&) (
    this=0x88f1c00, _data=@0x0) at job.cpp:770
#21 0x401d3944 in KIO::TransferJob::qt_invoke(int, QUObject*) (this=0x88f1c00, 
    _id=-1073748716, _o=0x88f1c00) at jobclasses.moc:788
#22 0x40b9ab7c in QObject::activate_signal(QConnectionList*, QUObject*) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#23 0x401b3bad in KIO::SlaveInterface::data(QMemArray<char> const&) (
    this=0x83f7a30, t0=@0x0) at slaveinterface.moc:194
#24 0x401b25d5 in KIO::SlaveInterface::dispatch(int, QMemArray<char> const&) (
    this=0x83f7a30, _cmd=100, rawdata=@0xbfffe770) at slaveinterface.cpp:246
#25 0x401b233f in KIO::SlaveInterface::dispatch() (this=0x83f7a30)
    at slaveinterface.cpp:191
#26 0x401b0255 in KIO::Slave::gotInput() (this=0x83f7a30) at slave.cpp:294
#27 0x401b1938 in KIO::Slave::qt_invoke(int, QUObject*) (this=0x83f7a30, 
    _id=4, _o=0xbfffe8a0) at slave.moc:113
#28 0x40b9ab7c in QObject::activate_signal(QConnectionList*, QUObject*) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#29 0x40b9acdd in QObject::activate_signal(int, int) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#30 0x40eb9a02 in QSocketNotifier::activated(int) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#31 0x40bb6ac0 in QSocketNotifier::event(QEvent*) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#32 0x40b3f89f in QApplication::internalNotify(QObject*, QEvent*) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#33 0x40b3ec6b in QApplication::notify(QObject*, QEvent*) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#34 0x4072565e in KApplication::notify(QObject*, QEvent*) (this=0xbffff040, 
    receiver=0x8506a38, event=0xbffff040) at kapplication.cpp:509
#35 0x40b2f44a in QEventLoop::activateSocketNotifiers() ()
   from /usr/qt/3/lib/libqt-mt.so.3
#36 0x40aec8a8 in QEventLoop::processEvents(unsigned) ()
   from /usr/qt/3/lib/libqt-mt.so.3
#37 0x40b52eb8 in QEventLoop::enterLoop() () from /usr/qt/3/lib/libqt-mt.so.3
#38 0x40b52d68 in QEventLoop::exec() () from /usr/qt/3/lib/libqt-mt.so.3
#39 0x40b3faf1 in QApplication::exec() () from /usr/qt/3/lib/libqt-mt.so.3
#40 0x4198c043 in kdemain (argc=0, argv=0x0) at konq_main.cc:162
#41 0x408b1916 in kdeinitmain (argc=0, argv=0x0) at konqueror_dummy.cc:2
#42 0x0804e1b2 in launch (argc=2, _name=0x8061474 "konqueror", 
    args=0x805cf68 "t\024\006\b", cwd=0x0, envc=1, envs=0x8061498 "", 
    reset_env=false, tty=0x0, avoid_loops=false, startup_id_str=0x0)
    at kinit.cpp:597
#43 0x08050326 in handle_launcher_request (sock=7) at kinit.cpp:1094
#44 0x0804f1fb in handle_requests (waitForPid=0) at kinit.cpp:1265
#45 0x0804d537 in main (argc=3, argv=0xbffff704, envp=0x0) at kinit.cpp:1686
Comment 1 Thiago Macieira 2003-11-09 05:06:21 UTC
Not identical, but the backtraces look very similar.

*** This bug has been marked as a duplicate of 67404 ***
Comment 2 Stephan Kulow 2003-11-09 12:49:20 UTC
Thiago: if you resolve as duplicates, please leave the one with a test case open!
Comment 3 Stephan Kulow 2003-11-09 12:49:48 UTC
*** Bug 67404 has been marked as a duplicate of this bug. ***
Comment 4 Stephan Kulow 2003-11-09 13:01:59 UTC
I ran through the process under valgrind and couldn't find a problem:
http://bugs.gentoo.org/show_bug.cgi?id=33072

this can mean two things:
1. it's fixed in CVS
2. you did something differently without beeing aware of it

Please either update to KDE CVS or run your build through valgrind too
(I hope the gentoo bugzilla maintainers do not mind :)
Comment 5 richard 2003-11-09 18:45:14 UTC
In both cases I made use of the Javascript search on the page - did you try that?
Comment 6 richard 2003-11-13 03:46:46 UTC
I submitted another bug, running konqueror under valgrind, and got the same crash. Then output ends with this:

khtml (render): RenderWidget::detach( 0x4c559540 )
khtml (jscript): Window::clear 0x49378bc0
kparts: 0x4c51a734 emitting activePartChanged (nil)
kparts: KPart::slotWidgetDestroyed(), deleting part somebugs
kparts: Part::~Part 0x4ab6e064
==19292==
==19292== Invalid read of size 4
==19292==    at 0x40FC7535: QObject::inherits(char const*) const (qobject.cpp:581)
==19292==    by 0x49DD3EF4: KHTMLPartBrowserExtension::updateEditActions() (khtml_ext.cpp:273)
==19292==    Address 0x0 is not stack'd, malloc'd or free'd
==19292== Warning: client attempted to close Valgrind's logfile fd (2).
==19292==    Use --logfile-fd=<number> to select an alternative logfile fd.
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = konqueror path = <unknown> pid = 19292

I have another bug to report in case there's anything else I can do to get more information out of this :)
Comment 7 Stephan Kulow 2003-11-13 14:22:14 UTC
I still can't make sense of that. The updateEditActions function checks
the value it accesses, so I can't think of a reason why it should be 0
later ;(
Comment 8 Stephan Kulow 2003-11-13 14:24:26 UTC
On second thought: do you use gentoo packages for qt or compile from source?
gentoo adds quite some patches to the package and there is 
http://bugs.kde.org/show_bug.cgi?id=61412 - which triggers a Qt bug from
the exact same function as above.
Comment 9 richard 2003-11-13 17:49:26 UTC
I'm using Gentoo's qt-3.2.2-r1.
Comment 10 Caleb Tennis 2003-11-13 17:55:35 UTC
I get this crash too via the gentoo packages.  Gentoo's Qt is built using some of the patches available in qt-copy - do you know which one causes this?
Comment 11 Stephan Kulow 2003-11-25 11:48:43 UTC
*** Bug 68537 has been marked as a duplicate of this bug. ***
Comment 12 Stephan Kulow 2003-12-01 11:41:36 UTC
*** Bug 69386 has been marked as a duplicate of this bug. ***
Comment 13 Stephan Kulow 2003-12-03 22:40:26 UTC
*** Bug 69600 has been marked as a duplicate of this bug. ***
Comment 14 Thiago Macieira 2003-12-13 05:24:06 UTC
*** Bug 70276 has been marked as a duplicate of this bug. ***
Comment 15 Caleb Tennis 2003-12-13 13:34:30 UTC
Can't reproduce anymore using qt-3.2.3 and kde 3.2_beta2 packages.
Comment 16 Thiago Macieira 2003-12-18 16:24:34 UTC
*** Bug 70710 has been marked as a duplicate of this bug. ***
Comment 17 richard 2003-12-20 06:36:08 UTC
I just had the crash again, using Qt 3.2.3 and KDE 3.2 beta 2 from Gentoo packages:

Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 4640)]
0x4124b7e8 in waitpid () from /lib/libpthread.so.0
#0  0x4124b7e8 in waitpid () from /lib/libpthread.so.0
#1  0x4086a8ac in __JCR_LIST__ () from /usr/kde/3.2/lib/libkdecore.so.4
#2  0x407aefab in KCrash::defaultCrashHandler(int) (sig=11) at kcrash.cpp:246
#3  0x4124a4d3 in __pthread_sighandler () from /lib/libpthread.so.0
#4  <signal handler called>
#5  0x40c37c81 in QObject::inherits(char const*) const (this=0x0, 
    clname=0x421f4b8a "QLineEdit") at kernel/qobject.cpp:581
#6  0x42063fb5 in KHTMLPartBrowserExtension::updateEditActions() (
    this=0x8e6a418) at khtml_ext.cpp:274
#7  0x42063a35 in KHTMLPartBrowserExtension::setExtensionProxy(KParts::BrowserExtension*) (this=0x8e6a418, proxy=0x0) at khtml_ext.cpp:174
#8  0x42050142 in KHTMLPart::slotActiveFrameChanged(KParts::Part*) (
    this=0x8e6a418, part=0x8890988) at khtml_part.cpp:5800
#9  0x42052027 in KHTMLPart::qt_invoke(int, QUObject*) (this=0x86abd90, 
    _id=-1073750524, _o=0x0) at khtml_part.moc:504
#10 0x40c3ab72 in QObject::activate_signal(QConnectionList*, QUObject*) (
    this=0x859e238, clist=0x8ce0330, o=0xbfffddf0) at kernel/qobject.cpp:2333
#11 0x40048b60 in KParts::PartManager::activePartChanged(KParts::Part*) (
    this=0x859e238, t0=0x0) at partmanager.moc:156
#12 0x4004821a in KParts::PartManager::setActivePart(KParts::Part*, QWidget*) (
    this=0x859e238, part=0x0, widget=0x0) at partmanager.cpp:443
#13 0x40047dd9 in KParts::PartManager::removePart(KParts::Part*) (
    this=0x859e238, part=0x8b38030) at partmanager.cpp:347
#14 0x4203abf1 in KHTMLPart::clear() (this=0x86abd90) at khtml_part.cpp:1207
#15 0x4203ca04 in KHTMLPart::begin(KURL const&, int, int) (this=0x86abd90, 
    url=@0x8890a48, xOffset=0, yOffset=0) at khtml_part.cpp:1605
#16 0x4203b463 in KHTMLPart::slotData(KIO::Job*, QMemArray<char> const&) (
    this=0x86abd90, kio_job=0x8affe38, data=@0xbfffe700) at khtml_part.cpp:1325
#17 0x42051d64 in KHTMLPart::qt_invoke(int, QUObject*) (this=0x86abd90, 
    _id=-1073748224, _o=0xbfffe39c) at khtml_part.moc:469
#18 0x40c3ab72 in QObject::activate_signal(QConnectionList*, QUObject*) (
    this=0x8affe38, clist=0x8933e00, o=0xbfffe370) at kernel/qobject.cpp:2333
#19 0x401d70f2 in KIO::TransferJob::data(KIO::Job*, QMemArray<char> const&) (
    this=0x8affe38, t0=0x0, t1=@0x0) at jobclasses.moc:722
#20 0x401c7b37 in KIO::TransferJob::slotData(QMemArray<char> const&) (
    this=0x8affe38, _data=@0x0) at job.cpp:790
#21 0x401d76b4 in KIO::TransferJob::qt_invoke(int, QUObject*) (this=0x8affe38, 
    _id=-1073748828, _o=0x8affe38) at jobclasses.moc:801
#22 0x40c3ab72 in QObject::activate_signal(QConnectionList*, QUObject*) (
    this=0x87df1a8, clist=0x87aa3f8, o=0xbfffe490) at kernel/qobject.cpp:2333
#23 0x401b746d in KIO::SlaveInterface::data(QMemArray<char> const&) (
    this=0x87df1a8, t0=@0x0) at slaveinterface.moc:194
#24 0x401b5e95 in KIO::SlaveInterface::dispatch(int, QMemArray<char> const&) (
    this=0x87df1a8, _cmd=100, rawdata=@0xbfffe700) at slaveinterface.cpp:246
#25 0x401b5bff in KIO::SlaveInterface::dispatch() (this=0x87df1a8)
    at slaveinterface.cpp:191
#26 0x401b3b15 in KIO::Slave::gotInput() (this=0x87df1a8) at slave.cpp:294
#27 0x401b51f8 in KIO::Slave::qt_invoke(int, QUObject*) (this=0x87df1a8, 
    _id=4, _o=0xbfffe860) at slave.moc:113
#28 0x40c3ab72 in QObject::activate_signal(QConnectionList*, QUObject*) (
    this=0x8e50bf0, clist=0x8d7d910, o=0xbfffe860) at kernel/qobject.cpp:2333
#29 0x40c3af2c in QObject::activate_signal(int, int) (this=0x8e50bf0, 
    signal=2, param=30) at kernel/qobject.cpp:2426
#30 0x41003d1d in QSocketNotifier::activated(int) (this=0x8e50bf0, t0=30)
    at .moc/debug-shared-mt/moc_qsocketnotifier.cpp:85
#31 0x40c5f48d in QSocketNotifier::event(QEvent*) (this=0x8e50bf0, 
    e=0xbfffeb40) at kernel/qsocketnotifier.cpp:271
#32 0x40bca877 in QApplication::internalNotify(QObject*, QEvent*) (
    this=0xbfffefb0, receiver=0x8e50bf0, e=0xbfffeb40)
    at kernel/qapplication.cpp:2582
#33 0x40bc9aba in QApplication::notify(QObject*, QEvent*) (this=0xbfffefb0, 
    receiver=0x8e50bf0, e=0xbfffeb40) at kernel/qapplication.cpp:2305
#34 0x407279de in KApplication::notify(QObject*, QEvent*) (this=0xbfffefb0, 
    receiver=0x8e50bf0, event=0xbfffefb0) at kapplication.cpp:509
#35 0x4004a0d6 in QApplication::sendEvent(QObject*, QEvent*) (receiver=0x0, 
    event=0x421f4b8a) at qapplication.h:492
#36 0x40bb5de7 in QEventLoop::activateSocketNotifiers() (this=0x80d45c8)
    at kernel/qeventloop_unix.cpp:579
#37 0x40b67785 in QEventLoop::processEvents(unsigned) (this=0x80d45c8, flags=4)
    at kernel/qeventloop_x11.cpp:340
#38 0x40be3d8d in QEventLoop::enterLoop() (this=0x80d45c8)
    at kernel/qeventloop.cpp:198
#39 0x40be3ca6 in QEventLoop::exec() (this=0x80d45c8)
    at kernel/qeventloop.cpp:145
#40 0x40bcaa19 in QApplication::exec() (this=0xbfffefb0)
    at kernel/qapplication.cpp:2705
#41 0x41c1a2c3 in kdemain (argc=0, argv=0x0) at konq_main.cc:177
#42 0x408ae916 in kdeinitmain (argc=0, argv=0x0) at konqueror_dummy.cc:2
#43 0x0804e232 in launch (argc=3, _name=0x806370c "konqueror", 
    args=0x8063468 "\f7\006\b", cwd=0x0, envc=0, envs=0x806375b "", 
    reset_env=false, tty=0x0, avoid_loops=false, startup_id_str=0x0)
    at kinit.cpp:604
#44 0x080506f6 in handle_launcher_request (sock=8) at kinit.cpp:1167
#45 0x0804f430 in handle_requests (waitForPid=0) at kinit.cpp:1360
#46 0x0804d5b5 in main (argc=3, argv=0xbffff684, envp=0x0) at kinit.cpp:1797
Comment 18 Thiago Macieira 2003-12-22 19:57:39 UTC
*** Bug 71055 has been marked as a duplicate of this bug. ***
Comment 19 Waldo Bastian 2004-11-23 14:04:19 UTC
I found the following invalid read while browsing around on www.email.cz: 
==11334== Invalid read of size 4 
==11334==    at 0x493E666E: KHTMLPart::updateActions() (khtml_part.cpp:3870) 
==11334==    by 0x493F36D0: KHTMLPart::slotActiveFrameChanged(KParts::Part*) 
(khtml_part.cpp:6440) 
==11334==    by 0x493F5D97: KHTMLPart::qt_invoke(int, QUObject*) 
(qucom_p.h:312) 
==11334==    by 0x41105E4E: QObject::activate_signal(QConnectionList*, 
QUObject*) (qobject.cpp:2357) 
==11334==    by 0x403D8F48: 
KParts::PartManager::activePartChanged(KParts::Part*) (partmanager.moc:156) 
==11334==    by 0x403D82F4: KParts::PartManager::setActivePart(KParts::Part*, 
QWidget*) (partmanager.cpp:48 
==11334==    by 0x403D7E1A: KParts::PartManager::removePart(KParts::Part*) 
(partmanager.cpp:388) 
==11334==    by 0x493D8444: KHTMLPart::clear() (khtml_part.cpp:1353) 
==11334==    by 0x493DB073: KHTMLPart::begin(KURL const&, int, int) 
(khtml_part.cpp:1764) 
==11334==    by 0x493DA608: KHTMLPart::htmlError(int, QString const&, KURL 
const&) (khtml_part.cpp:1618) 
==11334==    by 0x493D3C19: KHTMLPart::openURL(KURL const&) 
(khtml_part.cpp:562) 
==11334==    by 0x493E8A6C: KHTMLPart::processObjectRequest(khtml::ChildFrame*, 
KURL const&, QString const& 
==11334==    by 0x493FE25B: KHTMLRun::foundMimeType(QString const&) 
(khtml_run.cpp:47) 
==11334==    by 0x403EAC31: KParts::BrowserRun::redirectToError(int, QString 
const&) (browserrun.cpp:477) 
==11334==    by 0x403EA8BD: KParts::BrowserRun::handleError(KIO::Job*) 
(jobclasses.h:95) 
==11334==    by 0x493FE3DF: KHTMLRun::handleError(KIO::Job*) (khtml_run.cpp:79) 
==11334==    by 0x403E7DFF: 
KParts::BrowserRun::slotBrowserScanFinished(KIO::Job*) (browserrun.cpp:172) 
==11334==    by 0x403EAF76: KParts::BrowserRun::qt_invoke(int, QUObject*) 
(qucom_p.h:312) 
==11334==    by 0x493FE512: KHTMLRun::qt_invoke(int, QUObject*) 
(khtml_run.moc:77) 
==11334==    by 0x41105E4E: QObject::activate_signal(QConnectionList*, 
QUObject*) (qobject.cpp:2357) 
==11334==    by 0x405CB4F5: KIO::Job::result(KIO::Job*) (jobclasses.moc:156) 
==11334==    by 0x405B38E1: KIO::Job::emitResult() (job.cpp:217) 
==11334==    by 0x405B5250: KIO::SimpleJob::slotFinished() (job.cpp:536) 
==11334==    by 0x405B86E0: KIO::TransferJob::slotFinished() (job.cpp:896) 
==11334==    by 0x405B552C: KIO::SimpleJob::slotError(int, QString const&) 
(job.cpp:547) 
==11334==    Address 0x4DCA92D8 is 172 bytes inside a block of size 184 free'd 
==11334==    at 0x4002A0B3: __builtin_delete (vg_replace_malloc.c:244) 
==11334==    by 0x4002A0D1: operator delete(void*) (vg_replace_malloc.c:253) 
==11334==    by 0x493FC2C3: khtml::ChildFrame::~ChildFrame() 
(qguardedptr.h:125) 
==11334==    by 0x493D83CD: KHTMLPart::clear() (khtml_part.cpp:1356) 
==11334==    by 0x493DB073: KHTMLPart::begin(KURL const&, int, int) 
(khtml_part.cpp:1764) 
==11334==    by 0x493DA608: KHTMLPart::htmlError(int, QString const&, KURL 
const&) (khtml_part.cpp:1618) 
==11334==    by 0x493D3C19: KHTMLPart::openURL(KURL const&) 
(khtml_part.cpp:562) 
==11334==    by 0x493E8A6C: KHTMLPart::processObjectRequest(khtml::ChildFrame*, 
KURL const&, QString const& 
==11334==    by 0x493FE25B: KHTMLRun::foundMimeType(QString const&) 
(khtml_run.cpp:47) 
==11334==    by 0x403EAC31: KParts::BrowserRun::redirectToError(int, QString 
const&) (browserrun.cpp:477) 
==11334==    by 0x403EA8BD: KParts::BrowserRun::handleError(KIO::Job*) 
(jobclasses.h:95) 
==11334==    by 0x493FE3DF: KHTMLRun::handleError(KIO::Job*) (khtml_run.cpp:79) 
==11334==    by 0x403E7DFF: 
KParts::BrowserRun::slotBrowserScanFinished(KIO::Job*) (browserrun.cpp:172) 
==11334==    by 0x403EAF76: KParts::BrowserRun::qt_invoke(int, QUObject*) 
(qucom_p.h:312) 
==11334==    by 0x493FE512: KHTMLRun::qt_invoke(int, QUObject*) 
(khtml_run.moc:77) 
==11334==    by 0x41105E4E: QObject::activate_signal(QConnectionList*, 
QUObject*) (qobject.cpp:2357) 
==11334==    by 0x405CB4F5: KIO::Job::result(KIO::Job*) (jobclasses.moc:156) 
==11334==    by 0x405B38E1: KIO::Job::emitResult() (job.cpp:217) 
==11334==    by 0x405B5250: KIO::SimpleJob::slotFinished() (job.cpp:536) 
==11334==    by 0x405B86E0: KIO::TransferJob::slotFinished() (job.cpp:896) 
==11334==    by 0x405B552C: KIO::SimpleJob::slotError(int, QString const&) 
(job.cpp:547) 

Reopening.
Comment 20 Waldo Bastian 2004-11-23 14:04:44 UTC
*reopening*
Comment 21 David Faure 2004-11-23 14:39:29 UTC
Created attachment 8401 [details]
Suggested patch (untested)
Comment 22 Waldo Bastian 2004-11-23 16:25:22 UTC
CVS commit by waba: 

* Crash fix. The information in d->m_frames became invalid during the deletion
of the frames and before d->m_frames got cleared. Clear d->m_frames first
before deleting the frames.
* Related to the above: It makes no sense to switch to another active frame if
we are going to delete all the frames anyway.
BUG: 67624


  M +21 -8     khtml_part.cpp   1.1055


--- kdelibs/khtml/khtml_part.cpp  #1.1054:1.1055
@@ -1344,7 +1344,14 @@ void KHTMLPart::clear()
   d->m_decoder = 0;
 
+  // We don't want to change between parts if we are going to delete all of them anyway
+  disconnect( partManager(), SIGNAL( activePartChanged( KParts::Part * ) ),
+               this, SLOT( slotActiveFrameChanged( KParts::Part * ) ) );
+
+  if (d->m_frames.count())
   {
-    ConstFrameIt it = d->m_frames.begin();
-    const ConstFrameIt end = d->m_frames.end();
+    KHTMLFrameList frames = d->m_frames;
+    d->m_frames.clear();
+    ConstFrameIt it = frames.begin();
+    const ConstFrameIt end = frames.end();
     for(; it != end; ++it )
     {
@@ -1357,13 +1364,19 @@ void KHTMLPart::clear()
     }
   }
+  
+  if (d->m_objects.count())
   {
-    ConstFrameIt oi = d->m_objects.begin();
-    const ConstFrameIt oiEnd = d->m_objects.end();
+    KHTMLFrameList objects = d->m_objects;
+    d->m_objects.clear();
+    ConstFrameIt oi = objects.begin();
+    const ConstFrameIt oiEnd = objects.end();
 
     for (; oi != oiEnd; ++oi )
       delete *oi;
   }
-  d->m_frames.clear();
-  d->m_objects.clear();
+
+  // Listen to part changes again
+  connect( partManager(), SIGNAL( activePartChanged( KParts::Part * ) ),
+             this, SLOT( slotActiveFrameChanged( KParts::Part * ) ) );
 
   d->m_delayRedirect = 0;
@@ -6396,5 +6409,5 @@ void KHTMLPart::slotPartRemoved( KParts:
 void KHTMLPart::slotActiveFrameChanged( KParts::Part *part )
 {
-//    kdDebug(6050) << "KHTMLPart::slotActiveFrameChanged part=" << part << endl;
+//    kdDebug(6050) << "KHTMLPart::slotActiveFrameChanged this=" << this << "part=" << part << endl;
     if ( part == this )
     {