khtml's find, KFind or KComboBox

Koos Vriezen koos.vriezen at xs4all.nl
Tue Nov 19 20:05:51 GMT 2002


Hi,

Wondering why,
 open a html page, choose a word there and enter it in the ^F box and
 press enter and ESC next - choose another word and do the same - press ^F
 and move the cursor up to the previous word and press enter,
it shows 'Find next occurrence of "?', I found that the pattern of KFind
changes to something strange (and eventually causes a crash):

#0  KFindDialog::textSearchChanged(QString const&) (this=....
...
#4  0x40dc139b in QComboBox::textChanged(QString const&) ()
...
#12 0x40b93960 in QComboBox::removeItem(int) ()
#13 0x405fbd5c in KHistoryCombo::addToHistory(QString const&) ()
#14 0x417882ca in KFindDialog::slotOk()

Maybe KFind or KComboBox should disconnect a signal before changing
history?

Another thing is, in khtml_part.cpp:2050

   // Create the KFind object
+  delete d->m_find;
   d->m_find = new KFind( optionsDialog.pattern(), options, widget() );

d->m_find is not always deleted when a new KFind is created.

Regards,

Koos

BTW, crash trace
#0  0x4161aa4c in QGVector::at(unsigned) const (this=0x84dadb4, index=0)
    at /mnt/hda7/local/koos/qt3/include/qgvector.h:92
#1  0x41616063 in QPtrVector<khtml::TextSlave>::operator[](int) const (
    this=0x84dadb4, i=0) at
/mnt/hda7/local/koos/qt3/include/qptrvector.h:83
#2  0x415f2a34 in khtml::RenderText::findTextSlave(int, int&)
(this=0x84dad98,
    offset=0, pos=@0xbfffe510) at render_text.cpp:297
#3  0x415f30e4 in khtml::RenderText::posOfChar(int, int&, int&) (
    this=0x84dad98, chr=0, x=@0xbfffe55c, y=@0xbfffe558) at
render_text.cpp:439
#4  0x4155a481 in KHTMLPart::slotHighlight(QString const&, int, int) (
    this=0x81ba218, index=8, length=0) at khtml_part.cpp:2216
#5  0x4156a219 in KHTMLPart::qt_invoke(int, QUObject*) (this=0x81ba218,
    _id=57, _o=0xbfffe690) at khtml_part.moc:392
#6  0x40b15eeb in QObject::activate_signal(QConnectionList*, QUObject*) ()
   from /mnt/hda7/local/koos/qt3/lib/libqt-mt.so.3
#7  0x41785ca2 in KFind::highlight(QString const&, int, int)
(this=0x84df7c8,
    t0=@0x84df804, t1=8, t2=0) at kfind.moc:108
#8  0x41785189 in KFind::find() (this=0x84df7c8) at kfind.cpp:128
#9  0x4155a15b in KHTMLPart::findTextNext() (this=0x81ba218)
    at khtml_part.cpp:2171
#10 0x41559960 in KHTMLPart::slotFindNext() (this=0x81ba218)
    at khtml_part.cpp:2025
#11 0x41569e07 in KHTMLPart::qt_invoke(int, QUObject*) (this=0x81ba218,
    _id=30, _o=0xbfffe8e0) at khtml_part.moc:365
#12 0x40b15eeb in QObject::activate_signal(QConnectionList*, QUObject*) ()
   from /mnt/hda7/local/koos/qt3/lib/libqt-mt.so.3
#13 0x40b15d90 in QObject::activate_signal(int) ()
   from /mnt/hda7/local/koos/qt3/lib/libqt-mt.so.3
#14 0x41785d11 in KFind::findNext() (this=0x84df7c8) at kfind.moc:114
#15 0x4178579a in KFind::slotFindNext() (this=0x84df7c8) at kfind.cpp:307
#16 0x41785d67 in KFind::qt_invoke(int, QUObject*) (this=0x84df7c8, _id=2,
    _o=0xbfffea00) at kfind.moc:120
#17 0x40b15eeb in QObject::activate_signal(QConnectionList*, QUObject*) ()
   from /mnt/hda7/local/koos/qt3/lib/libqt-mt.so.3
#18 0x40b15d90 in QObject::activate_signal(int) ()
   from /mnt/hda7/local/koos/qt3/lib/libqt-mt.so.3
#19 0x405d09de in KDialogBase::user1Clicked() ()
   from /mnt/hda3/usr/local/kde3/lib/libkdeui.so.4
#20 0x405ceaa7 in KDialogBase::slotUser1() ()
   from /mnt/hda3/usr/local/kde3/lib/libkdeui.so.4
.....





More information about the kfm-devel mailing list