Bug 10702

Summary: The X Server crash if an composite window manager is loaded and an Windows with OpenGL objects is moved to right down corner
Product: xorg Reporter: Víctor Daniel <bombayvdmo>
Component: Server/Ext/DRIAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: blocker    
Priority: highest CC: gmillet, simos.bugzilla
Version: 7.1 (2006.05)   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Clip cliprects obtained from DRIGetDrawableInfo to screen dimensions. none

Description Víctor Daniel 2007-04-21 06:15:24 UTC
Description of problem:
The X Server crash if a composite window manager is loaded and an Windows with OpenGL objects is moved to right  down corner  (i810 Card)

Version-Release number of selected component (if applicable):
This is reproducible in AIGLX and XGL.

How reproducible:
Load a composite windows manager (like compiz or beryl) and run glxgear (or a  OpenGL xscreensaver) move theis new window to beyond right down corner.

This bug is repodusible in XGL and AIGLX.

Steps to Reproduce:
1. Load composite window manager (compiz or beryl)
2. Run glxgears or an OpenGL xscreensaver or an OpenGL Game (quake,...)
3. Move the window to this position:
+----------------------------------------------+
|                                              |
|                                              |
|                                              |
|                                              |
|                     1                        |
|                                              |
|                                     +--------|-------+
|                                     |        |       |
|                                     |        |       |
|                                     |        |       |
+----------------------------------------------+       |
                                      |        2       |
                                      |                |
                                      |                |
                                      +----------------+
  Leyend
  1: Screen
  2: A screen with 3d object (sample: glxgears, an OpenGL xscreensaver)
4. Boom! The systems crash.

I report this bug to bugzilla.redhat.com
Bye and Thanks!
Comment 1 Michel Dänzer 2007-05-10 01:03:12 UTC
*** Bug 10855 has been marked as a duplicate of this bug. ***
Comment 2 Michel Dänzer 2007-05-10 01:06:30 UTC
The problem is that the cliprects of redirected windows can exceed the screen dimensions. As was discussed on the dri-devel or mesa3d-dev (or xorg?) mailing list recently, the best solution for now would probably be for the DRI extension to always clamp cliprects to the screen dimensions when reporting them to clients.
Comment 3 Simos Xenitellis 2007-05-21 06:11:47 UTC
When you run Crack Attack (crack-attack), the following similar error messages (in syslog) appear.

[17184397.112000] [drm:i915_emit_box] *ERROR* Bad box 65535,65535..399,399
[17184397.112000] [drm:i915_cmdbuffer] *ERROR* i915_dispatch_cmdbuffer failed

The system does not crash; the application simply does not start.
Running Beryl on Ubuntu Edgy with 855GM.
Comment 4 Michel Dänzer 2007-06-05 03:14:02 UTC
Created attachment 10190 [details] [review]
Clip cliprects obtained from DRIGetDrawableInfo to screen dimensions.

Does this patch help? Only build tested.
Comment 5 Michel Dänzer 2007-06-11 01:15:53 UTC
Works for me, pushed to xserver master.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.