Crash in decoder.cpp & CSS loading problem

kzk mover at hct.zaq.ne.jp
Tue Mar 2 14:26:38 GMT 2004


On Tuesday 02 March 2004 23:10, Andras Mantia wrote:
> But the assert was not hit before (as I would have notice that KHTML
> crashes when I close a file in Quanta...). I saw a recent commit:
>
> --- kdelibs/khtml/khtml_part.cpp  #1.976:1.977
> @@ -1695,10 +1695,10 @@ void KHTMLPart::write( const char *str,
>      d->m_decoder = createDecoder();
>
> -  if ( len == 0 )
> -    return;
> -
>    if ( len == -1 )
>      len = strlen( str );
>
> +  if ( len == 0 )
> +    return;
> +
>    QString decoded = d->m_decoder->decode( str, len );
>
> It might be that this (the old code) triggered the assert?
I committed this code after reading your mail:-)
and this commit will fix your problem.

according to the  backtrace, KHTMLPart::write was called with len == 0.
but Decoder::decode seems to be called.
Isn't it a bit strange?
before decode is called, the procedure should be returned through "if( len == 
0 ) return;".
hmm...

cheers.

Kazuki Ohta : mover at hct.zaq.ne.jp




More information about the kfm-devel mailing list