Weird crash w/ MGA + RandR 1.2

Tilman Sauerbeck tilman at
Thu Feb 22 23:14:19 PST 2007

I started implementing RandR 1.2 support in the MGA driver, based on how
stuff is done in the Intel driver.

Now when I start X, I'm getting this crash & backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x081b9301 in damagePaintWindow (pWindow=0x8290758, prgn=0xbfc4f694, what=0) at
1645        if ((what != PW_BACKGROUND || pWindow->backgroundState != None) &&
(gdb) bt
#0  0x081b9301 in damagePaintWindow (pWindow=0x8290758, prgn=0xbfc4f694, what=0)
#1  0x08128050 in compPaintWindowBackground (pWin=0x8290758, pRegion=0xbfc4f694,
#2  0x08149f05 in miWindowExposures (pWin=0x8290758, prgn=0xbfc4f694, other_expo
#3  0x080787e5 in MapWindow (pWin=0x8290758, client=0x8260790) at window.c:2829
#4  0x080737c9 in InitRootWindow (pWin=0x8290758) at window.c:537
#5  0x0806f91b in main (argc=1, argv=0xbfc4f7c4, envp=0xbfc4f7cc) at main.c:430

On startup, a number of pixmaps get passed to damagePaintWindow, but
when the first window (type == DRAWABLE_WINDOW) gets passed to that
function, the server crashes.

I haven't checked what exact code path is chosen in
getDrawableDamageRef(), but the PixmapPtr that it returns doesn't have a
valid devPrivates field (valgrind complains about an invalid read).

I'm sure it's a bug in the MGA driver that I introduced, but I have no
idea where I should start looking.
Dave Airlie suggested it might be due to a bad CreateScreenResources
hook, but even with that it still crashes.

Any idea what kind of driver bug could lead to that behaviour?


A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <>

More information about the xorg mailing list