discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linux-x86-64 and cairo crash


From: Fred Kiefer
Subject: Re: Linux-x86-64 and cairo crash
Date: Mon, 12 Sep 2011 10:58:23 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.22) Gecko/20110907 SUSE/3.1.14 Thunderbird/3.1.14

If your version of cairo is not too old, then it is rather our bug :-(
In the file XGCairoXImageSurface we create a cairo surface for the X window and the code I put there will only work correctly for 24 or 32 bit display depth.

You could try to use a different value for CAIRO_FORMAT_ARGB32 based on your display depth. CAIRO_FORMAT_RGB16_565 would be the one to use for 16 bit displays.

When I wrote that I was under the impression that X and cairo should be able to provide 32 bit image surfaces even when the actual drawing was taking place on a 16 bit surface and that all the conversions would happen internally. But we use these mechanisms incorrectly. We create an XWindowBuffer with the actual display depth and later on, try to use it as if it had 32 bit depth. Correcting this seems to require some changes to XWindowBuffer and this should only be done with a 16 bit display at hand. If you are seriously interested in supporting this format you will either have to implement it yourself or grant access to your machine to Eric or me.

On 12.09.2011 03:32, Eric Wasylishen wrote:
Hm..
The segfault in cairo_get_target is probably coming from passing NULL to that 
function. I made an adjustment to drawGState so it won't call cairo_get_target 
until after checking that the cairo context is non-NULL.

The thing I don't understand is "invalid value for stride" error. I attached a patch to 
apply to back which should print a warning at the source of the "invalid value for 
stride"… hopefully that narrows it down. btw, I tried but wasn't able to reproduce this on my 
x86-64 linux system with a 16-bit Xephyr display :-(

Eric


On 2011-09-11, at 6:00 PM, Riccardo Mottola wrote:

Hi,

I just updated everything on my linux-x86-64 box, running gcc4 and libobjc2 
from our own repo. Reconfigured/cleaned/installed all core.

All apps segfault, here Ink:


2011-09-11 23:11:28.802 Ink[30192] No local time zone specified.
2011-09-11 23:11:28.803 Ink[30192] Using time zone with absolute offset 0.
2011-09-11 23:11:28.802 Ink[30192] Cairo status 'invalid value for stride' in 
DPSinitgraphics
2011-09-11 23:11:28.814 Ink[30192] XShm not supported, XShmAttach() failed.
2011-09-11 23:11:28.814 Ink[30192] Falling back to normal XImage (will be 
slower).
2011-09-11 23:11:28.814 Ink[30192] Cairo status 'invalid value for stride' in 
DPSinitgraphics
2011-09-11 23:11:28.815 Ink[30192] The font specified for NSFont, FreeSans, 
can't be found.
2011-09-11 23:11:28.859 Ink[30192] Cairo status 'invalid value for stride' in 
DPSinitgraphics

Program received signal SIGSEGV, Segmentation fault.
0x00007fffefd3ca30 in cairo_get_target () from /usr/lib64/libcairo.so.2

#0  0x00007fffefd3ca30 in cairo_get_target () from /usr/lib64/libcairo.so.2
#1  0x00007ffff0036489 in -[CairoGState drawGState:fromRect:toPoint:op:fraction:] 
(self=0xd3ed58, _cmd=<optimized out>, source=0xd438f8, aRect=...,
    aPoint=..., op=NSCompositeSourceOver, delta=1) at CairoGState.m:1344
#2  0x00007ffff781b90c in -[NSCachedImageRep nativeDrawInRect:fromRect:operation:fraction:] 
(self=<optimized out>, _cmd=<optimized out>, dstRect=...,
    srcRect=..., op=NSCompositeSourceOver, delta=<optimized out>)
    at NSCachedImageRep.m:278
#3  0x00007ffff78807b4 in -[NSImageRep 
drawInRect:fromRect:operation:fraction:respectFlipped:hints:] (self=0xd3f4f8, 
_cmd=<optimized out>, dstRect=...,
    srcRect=..., op=NSCompositeSourceOver, delta=1,
    respectFlipped=<optimized out>, hints=<optimized out>) at NSImageRep.m:793
#4  0x00007ffff787a84c in -[NSImage 
drawInRect:fromRect:operation:fraction:respectFlipped:hints:] (self=0xd13be8, 
_cmd=<optimized out>, dstRect=...,
    srcRect=..., op=NSCompositeSourceOver, delta=1, respectFlipped=1 '\001',
    hints=0x0) at NSImage.m:995
#5  0x00007ffff781d7a4 in -[NSCell drawInteriorWithFrame:inView:] (
    self=<optimized out>, _cmd=<optimized out>, cellFrame=...,
    controlView=<optimized out>) at NSCell.m:2036
#6  0x00007ffff781d947 in -[NSCell drawWithFrame:inView:] (self=0xd13ce8,
    _cmd=<optimized out>, cellFrame=..., controlView=0xd13d58) at NSCell.m:2060
#7  0x00007ffff77e6333 in -[NSAppIconView drawRect:] (self=0xd13d58,
    _cmd=<optimized out>, rect=...) at NSApplication.m:564

Update: the issue is that it is exported to a 15/16bit display perhaps?
I tried exporting to a 24bit display and Ink works fine!

I wonder if it is our bug or cairo's...




reply via email to

[Prev in Thread] Current Thread [Next in Thread]