[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    [khtml] FW: Found the problem causing kfm to crash X
From:       David Faure <David.Faure () cramersystems ! com>
Date:       1999-11-11 16:46:38
[Download RAW message or body]


Of interest for the khtml hackers :

> -----Original Message-----
> From: kde-user-request@lists.netcentral.net
> [mailto:kde-user-request@lists.netcentral.net]On Behalf Of 
> Calvin Ostrum
> Sent: Thursday, November 11, 1999 2:56 PM
> To: KDE User List
> Subject: Found the problem causing kfm to crash X
> 
> 
> 
> I determined by the process of elimination that any large html
> file with an aligned image in it would cause kfm to crash X with
> my setup.  I assume this would also cause kfm to crash with 
> similar setups (so far, people seem to suspect that the crash only
> occurs with XFree86 and the Mach64 driver, but this is not
> certain).
> 
> I then started to examine the khtmlw code.  I haven't considered
> the problems of html rendering before, but obviously aligned
> images are more complex, as one has to use their dimensions,
> once placed, to guide where the other stuff can go.  It must flow 
> around them.  Perhaps these images are not being dealt with
> correctly.
> 
> Indeed, that appears to be the case. In the qwidget 
> example reported by Michael Haeckel in bug 1987
> (http://bugs.kde.org/db/19/1987.html), the single 
> qt logo icon at the top of the page is redrawn 
> each time the cursor key is pressed, even though 
> very quickly, it goes so far off the screen that it will
> never be seen.  Eventually, somewhere around that
> magic number of -32768, the range of coordinates being
> passed into XFree86 is too large for it to handle,
> and it crashes.  
> 
> No doubt this is a bug in XFree86 (probably just the
> Mach64 driver), since it should probably accept any
> coordinates and merely ignore them if they are outside
> the range that it can deal with.  However, it also seems
> as if kfm should probably not be writing this
> pixmap at all once it goes very far out of range.  
> 
> I made a crude and quick fix that I believe will
> probably work.  It seems to enable browsing in
> the many sample files I created that previously
> were crashing X totally, and I don't think it changes 
> the rendering in any other way.  But I'm not sure: 
> it should be looked at more closely.
> 
> The problem occurs in the file khtmlw/htmlobj.cpp, function
> void HTMLImage::print( QPainter *_painter, int _tx, int _ty ).
> at the statement on line 1729:
> 
>  _painter->drawPixmap( QPoint( x + _tx + border,
> 	y - ascent + _ty + border), pm, rect );
> 
> (Although it should probably be fixed somewhat earlier).
> 
> This could all be wrong, too!  I was pretty tired
> when working on it...
> 
> --------------------------------------------------------------
> -------------
> Calvin Ostrum                                              
> cbo@interlog.com
> --------------------------------------------------------------
> -------------
> People make their own history, but they do not make it just 
> as they please;
> they do not make it under circumstances chosen by themselves, 
> but under
> circumstances directly encountered, given and transmitted 
> from the past.
>         -- Karl Marx, "The Eighteenth Brumaire of Louis Bonaparte"
> --------------------------------------------------------------
> -------------
> -- 
> Send posts to:  kde-user@lists.netcentral.net
>  Send all commands to:  kde-user-request@lists.netcentral.net
>   Put your command in the SUBJECT of the message:
>    "subscribe", "unsubscribe", "set digest on", or "set digest off"
> 
> All kde mailing lists are archived at http://lists.kde.org
> **********************************************************************
> This list is from your pals at NetCentral <http://www.netcentral.net/>
> 


--
David Faure
faure@kde.org - KDE developer
david@mandrakesoft.com - Mandrake
david.faure@cramersystems.com - Cramer Systems

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic