[cairo-bugs] [Bug 5846] New: Crash inside _get_image_surface() on 8-bit pseudocolor display Xlib surface

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Feb 8 20:32:04 PST 2006


Please do not reply to this email: if you want to comment on the bug, go to    
       
the URL shown below and enter yourcomments there.     
   
https://bugs.freedesktop.org/show_bug.cgi?id=5846          
     
           Summary: Crash inside _get_image_surface() on 8-bit  pseudocolor
                    display Xlib surface
           Product: cairo
           Version: 1.0.2
          Platform: PC
               URL: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=350217
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: xlib backend
        AssignedTo: cworth at cworth.org
        ReportedBy: dave at dajobe.org
         QAContact: cairo-bugs at cairographics.org


This is a forwarding of a debian bug #350217 at
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=350217

Quoting partially:
[[
In _get_image_surface() in cairo-xlib-surface.c the code commented
"XXX This can't work." is getting used.  (Not a confidence-inspiring
comment :-).

It looks like the func _cairo_image_surface_create_with_masks() ends
up putting depth==0 in cairo_image_surface_t.  Still dunno if that's
normal, but it seems to get through to the XPutImage and the server
doesn't like it.

As a workaround I changed the code earlier in _get_image_surface()
from

	masks.alpha_mask = 0;
to
	masks.alpha_mask = 0xff;

This is a dirty hack, I guess it hard-codes 8-bit greyscale or
something.  But it has the effect of making the test

	if (_CAIRO_MASK_FORMAT (&masks, &format))

succeed, and the code under that leg using
cairo_image_surface_create_for_data() ends up giving depth==8, which
the server likes.  It makes all the problems I reported go away.

So my guess would be there's something dodgy in the code when an 8-bit
pseudocolor visual is in use, I'd imagine the problems should show up
for anyone with that.
]]

the debian bug report also contains the crash and a request dump, partially
quoted here:
[[
#4  0xb73441ff in _XError () from /usr/X11R6/lib/libX11.so.6
#5  0xb73448ef in _XReply () from /usr/X11R6/lib/libX11.so.6
#6  0xb733f215 in XSync () from /usr/X11R6/lib/libX11.so.6
#7  0xb733f2c3 in XSync () from /usr/X11R6/lib/libX11.so.6
#8  0xb733927b in XPutImage () from /usr/X11R6/lib/libX11.so.6
#9  0xb74034ac in cairo_test_xlib_disable_render () from /usr/lib/libcairo.so.2
...

	 ............REQUEST: PutImage
	     sequence number: 058b
	              format: ZPixmap
	      request length: 54fc
	            drawable: DWB 0140002d
	                  gc: GXC 0140002e
	               width: 012c
	              height: 0122
	               dst-x: 0
	               dst-y: 0
	            left-pad: 00
	               depth: 00
	                data: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
	                    : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
	                    : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
	                    : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
	                    : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
	                    : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
                              ...


				               Error (fd 5): 00 08 8b 05 2e 00 
40 01 00 00 48 08 00 00 00 00 50 d8 da bf 00 00 00 00 00 00 00 00 68 da da bf 
				 ..............ERROR: Match
				     sequence number: 058b
				        minor opcode: 0000
]]          
     
     
--           
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email         
     
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.


More information about the cairo-bugs mailing list