kwindowsystem crashes

Martin Graesslin mgraesslin at kde.org
Tue May 31 06:23:42 UTC 2016


On Monday, May 30, 2016 11:36:54 AM CEST Kurt Hindenburg wrote:
> There are a number of lines that division by zero could happen in
> frameworks/kwindowsystem/src/platforms/xcb/kwindowsystem.cpp  if
> displayGeometry returns a 0 QRect.  I think that is what is happening with
> bug 349512.

urgh. That means that there are no QScreens with a size.

> 
> viewportToDesktop, viewportWindowToDesktop, desktopToViewport
> 
> I’m not clear on the best way to prevent this.  Forcing displayGeometry to
> never return a 0 QRect (which seem the best) or by checking all the
> locations of division by 0.

If the size is 0/0 then returning a false size looks incorrect to me. On the 
other hand it means that we are in an intermediate state - no screens is not a 
valid setup.

So my suggestion would be to change line 75 to only update the displayGeometry 
if region.boundingRect() is not empty.

Cheers
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160531/3556e00b/attachment.sig>


More information about the Kde-frameworks-devel mailing list