[Kopete-devel] Re: Recent KHTML/Qt changes cause crash in Kopete
Jason Keirstead
jason at keirstead.org
Sun Mar 2 23:41:49 GMT 2003
Initial document structure is always:
<html><body bgproperties=\"fixed\"></body></html>
After this, nodes are created and appended as follows:
DOM::HTMLElement newNode = chatView->document().createElement( QString::fromLatin1("div") );
newNode.setInnerHTML( resultHTML );
chatView->htmlDocument().body().appendChild( newNode );
Typical contents of resultHTML would be:
<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">
<tr>
<td><font color=\"#E11919\"> (3:45 PM) </font><font color=\"red\"><b>Jason Keirstead:</b></font>Message Text</td>
</tr>
</table>
Note, the \" is from C escaping, that isn't part of the HTML :P
> Which exception code is it? Could you provide a sample page that shows the
> existing document structure and what you're trying to insert?
>
> On Sun, 2 Mar 2003, Nick Betcher wrote:
> > > Could you provide a backtrace? I'm guessing that it could be an
> > > exception thrown from appendChild(). Technically you're supposed to
> > > catch exceptions when calling the DOM methods, unless you know for sure
> > > that one will not be thrown.
> >
> > Doh! Sorry, that's what I forgot ;) It is an exception being thrown.
> > Here's the (relavent) bt:
> >
> > #5 0x415fe7d1 in __kill () at __kill:-1
> > #6 0x414a1a9d in pthread_kill (thread=9680, signo=-512) at signals.c:65
> > #7 0x414a1dbb in raise (sig=-512) at signals.c:181
> > #8 0x415ffb39 in *__GI_abort () at ../sysdeps/generic/abort.c:88
> > #9 0x4157fa95 in __cxxabiv1::__terminate(void (*)()) ()
> > from /usr/lib/./libstdc++.so.5
> > #10 0x4157fad2 in std::terminate() () from /usr/lib/./libstdc++.so.5
> > #11 0x4157fc52 in __cxa_throw () from /usr/lib/./libstdc++.so.5
> > #12 0x4030ab27 in DOM::Node::appendChild(DOM::Node const&) ()
> > from /opt/kde3/lib/libkhtml.so.4
> > #13 0x400d276c in Kopete::ChatView::addChatMessage(KopeteMessage&) (
> > this=0x8368c70, m=@0xbfffd6d0) at chatview.cpp:763
> > #14 0x400d17ab in Kopete::ChatView::messageReceived(KopeteMessage&) (
> > this=0x8368c70, message=@0xbfffd960) at chatview.cpp:599
> > #15 0x400afed1 in KopeteViewManager::messageAppended(KopeteMessage&,
> > KopeteMessageManager*) (this=0x818ecf0, msg=@0xbfffd960,
> > manager=0x8242718) at kopeteviewmanager.cpp:154
--
Jason Keirstead, BCS
http://www.keirstead.org
More information about the kfm-devel
mailing list