gnustep-dev
[Top][All Lists]
Advanced

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

Re: Testing for drawing fixes r30523


From: Wolfgang Lux
Subject: Re: Testing for drawing fixes r30523
Date: Sun, 6 Jun 2010 19:39:23 +0200

Quentin Mathé wrote:

I just committed a patch I have been working on for a while. See bug report https://savannah.gnu.org/bugs/?27782

It looks like your changes have inadvertently introduced a new bug. Clicking on the overflow menu of a toolbar now causes a crash in every application. For instance, the following traceback was produced with ToolbarExample after shrinking it horizontally so much that an overflow menu item appears and then clicking that item.

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000004
0x0300b894 in cairo_get_target ()
(gdb) bt
#0  0x0300b894 in cairo_get_target ()
#1 0x0345ec84 in -[CairoGState compositeGState:fromRect:toPoint:op:fraction:] (self=0x33d9208, _cmd=0x34714b0, source=0x330b998, srcRect={origin = {x = 0, y = 0}, size = {width = 20, height = 20}}, destPoint={x = 4, y = 41}, op=NSCompositeSourceOver, delta=1) at CairoGState.m:1273 #2 0x0340cb00 in -[GSContext(Ops) GScomposite:toPoint:fromRect:operation:fraction:] (self=0x33d79f8, _cmd=0x1439d88, gstateNum=12, aPoint={x = 4, y = 41}, srcRect={origin = {x = 0, y = 0}, size = {width = 20, height = 20}}, op=NSCompositeSourceOver, delta=1) at GSContext.m:817 #3 0x0114f4e4 in -[NSImage compositeToPoint:fromRect:operation:fraction:] (self=0x3761c88, _cmd=0x1439d58, aPoint={x = 4, y = 41}, srcRect={origin = {x = 0, y = 0}, size = {width = 20, height = 20}}, op=NSCompositeSourceOver, delta=1) at NSImage.m:864 #4 0x0114efa4 in -[NSImage compositeToPoint:fromRect:operation:] (self=0x3761c88, _cmd=0x1439d50, aPoint={x = 4, y = 41}, aRect= {origin = {x = 0, y = 0}, size = {width = 20, height = 20}}, op=NSCompositeSourceOver) at NSImage.m:815 #5 0x0114ee70 in -[NSImage compositeToPoint:operation:] (self=0x3761c88, _cmd=0x145472c, aPoint={x = 4, y = 41}, op=NSCompositeSourceOver) at NSImage.m:808
#6  0x000e85d4 in ffi_call_DARWIN ()
#7 0x000e7c4c in ffi_call (cif=0x3309200, fn=0x114ed34 <-[NSImage compositeToPoint:operation:]>, rvalue=0x3320fd4, avalue=0x3309238) at src/powerpc/ffi_darwin.c:457 #8 0x0214e0bc in GSFFIInvokeWithTargetAndImp (inv=0x3320fa8, anObject=0x3761c88, imp=0x114ed34 <-[NSImage compositeToPoint:operation:]>) at GSFFIInvocation.m:396 #9 0x0214e644 in -[GSFFIInvocation invokeWithTarget:] (self=0x3320fa8, _cmd=0x1453cec, anObject=0x3761c88) at GSFFIInvocation.m:470 #10 0x01330be8 in -[GSThemeProxy forwardInvocation:] (self=0x3761388, _cmd=0x21fc8f4, anInvocation=0x3320fa8) at GSTheme.m:1332 #11 0x0214f0e4 in GSFFIInvocationCallback (cif=0x3309200, retp=0xbfffdae0, args=0xbfffd9c0, user=0x3309200) at GSFFIInvocation.m:636 #12 0x000e84dc in ffi_closure_helper_DARWIN (closure=0x704000, rvalue=0xbfffdae0, pgr=0xbfffdb1c, pfr=0xbfffda78) at src/powerpc/ ffi_darwin.c:796
#13 0x000e86b4 in ffi_closure_ASM ()
#14 0x01336c60 in -[GSTheme(Drawing) drawImage:inButtonCell:withFrame:position:] (self=0x3738e88, _cmd=0x142ff8c, image=0x3761388, cell=0x3761428, aRect={origin = {x = 0, y = 0}, size = {width = 28, height = 62}}, position={x = 4, y = 41}) at GSThemeDrawing.m:765 #15 0x01094ba4 in -[NSButtonCell drawImage:withFrame:inView:] (self=0x3761428, _cmd=0x142ffec, imageToDisplay=0x3761388, cellFrame= {origin = {x = 0, y = 0}, size = {width = 28, height = 62}}, controlView=0x3729108) at NSButtonCell.m:957 #16 0x01095c74 in -[NSButtonCell drawInteriorWithFrame:inView:] (self=0x3761428, _cmd=0x1430c0c, cellFrame={origin = {x = 0, y = 0}, size = {width = 28, height = 62}}, controlView=0x3729108) at NSButtonCell.m:1249 #17 0x010a4df4 in -[NSCell drawWithFrame:inView:] (self=0x3761428, _cmd=0x142a578, cellFrame={origin = {x = 0, y = 0}, size = {width = 28, height = 62}}, controlView=0x3729108) at NSCell.m:2055 #18 0x01010060 in -[NSActionCell drawWithFrame:inView:] (self=0x3761428, _cmd=0x1430c2c, cellFrame={origin = {x = 0, y = 0}, size = {width = 28, height = 62}}, controlView=0x3729108) at NSActionCell.m:344 #19 0x010a5160 in -[NSCell highlight:withFrame:inView:] (self=0x3761428, _cmd=0x142fc00, lit=1 '\001', cellFrame={origin = {x = 0, y = 0}, size = {width = 28, height = 62}}, controlView=0x3729108) at NSCell.m:2107 #20 0x0108f80c in -[NSButton highlight:] (self=0x3729108, _cmd=0x14596fc, flag=1 '\001') at NSButton.m:392 #21 0x013be7fc in -[GSToolbarClippedItemsButton mouseDown:] (self=0x3729108, _cmd=0x144d960, event=0x318d748) at GSToolbarView.m:206 #22 0x012e3914 in -[NSWindow sendEvent:] (self=0x3322458, _cmd=0x142c6d0, theEvent=0x318d748) at NSWindow.m:3837 #23 0x0103e7bc in -[NSApplication sendEvent:] (self=0x3335478, _cmd=0x142c600, theEvent=0x318d748) at NSApplication.m:2282 #24 0x0103c03c in -[NSApplication run] (self=0x3335478, _cmd=0x142a3b8) at NSApplication.m:1662 #25 0x01009460 in NSApplicationMain (argc=1, argv=0xbfffe650) at Functions.m:89 #26 0x00002aac in gnustep_base_user_main (argc=1, argv=0xbfffe650) at main.m:13 #27 0x02060ab0 in main (argc=1, argv=0xbfffe650, env=0xbfffe658) at NSProcessInfo.m:910
(gdb) up
#1 0x0345ec84 in -[CairoGState compositeGState:fromRect:toPoint:op:fraction:] (self=0x33d9208, _cmd=0x34714b0, source=0x330b998, srcRect={origin = {x = 0, y = 0}, size = {width = 20, height = 20}}, destPoint={x = 4, y = 41}, op=NSCompositeSourceOver, delta=1) at CairoGState.m:1273
1273      BOOL copyOnSelf = (src == cairo_get_target(_ct));
(gdb) print _ct
$1 = (struct _cairo *) 0x0

Apparently, the problem is that the graphic state's _ct attribute is 0 when -compositeGState:fromRect:toPoint:op:fraction: is called.

Wolfgang





reply via email to

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