[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #25943] Error trying to lock focus in offscreen window
From: |
Doug Simons |
Subject: |
[bug #25943] Error trying to lock focus in offscreen window |
Date: |
Thu, 26 Mar 2009 23:27:53 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_4_11; en) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1 |
Follow-up Comment #3, bug #25943 (project gnustep):
That gets me past my call to lockFocus, but it seems something is still
missing. I now crash a few lines later in a call to [NSBitmapImageRep
initWithFocusedViewRect:]. Here is the relevant portion of the gdb
transcript:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb692ab90 (LWP 27413)]
0xb6f8f6a8 in -[ARTGState(ReadRect) GSReadRect:] (self=0x954fe98,
_cmd=0xb6f9ab58, r=
{origin = {x = 0, y = 0}, size = {width = 54, height = 17}}) at
ReadRect.m:79
79 if (x0 > wi->sx) x0 = wi->sx;
(gdb) bt
#0 0xb6f8f6a8 in -[ARTGState(ReadRect) GSReadRect:] (self=0x954fe98,
_cmd=0xb6f9ab58, r=
{origin = {x = 0, y = 0}, size = {width = 54, height = 17}}) at
ReadRect.m:79
#1 0xb6f29e7e in -[GSContext(NSGraphics) GSReadRect:] (self=0x86848c0,
_cmd=0xb7eadc88, rect=
{origin = {x = 0, y = 0}, size = {width = 54, height = 17}}) at
GSContext.m:878
#2 0xb7c6e3ee in -[NSBitmapImageRep initWithFocusedViewRect:]
(self=0x9120698, _cmd=0x81def58, rect=
{origin = {x = 0, y = 0}, size = {width = 54, height = 17}}) at
NSBitmapImageRep.m:354
#3 0x080e8e8b in +[TestScriptImage generateTextImageWithAttributes:]
(self=0x81de760, _cmd=0x81dec30,
attributes=0x92ee388) at TestScriptImage.m:698
#4 0x080e383d in +[TestScriptImage
makeTestScriptTextImageForFullAttributes:usingPlatform:] (
self=0x81de760, _cmd=0x81ce070, fullAttributes=0x92ee388,
textPlatformDict=0x955aeb8)
at TestScriptImage.m:215
(gdb) p wi
$3 = (class XWindowBuffer *) 0x0
(gdb) f 3
#3 0x080e8e8b in +[TestScriptImage generateTextImageWithAttributes:]
(self=0x81de760, _cmd=0x81dec30,
attributes=0x92ee388) at TestScriptImage.m:698
698 textBitmapImage = [[[NSBitmapImageRep alloc]
initWithFocusedViewRect:NSMakeRect(0,0,stringSize.width,stringSize.height)]
autorelease];
(gdb) l
693 [[simpleWindow contentView] lockFocus];
694 NS_DURING {
695 [bgColor set];
696 [NSBezierPath
fillRect:NSMakeRect(0,0,stringSize.width,stringSize.height)];
697 [generatedString drawAtPoint:NSMakePoint(1,0)];
698 textBitmapImage = [[[NSBitmapImageRep alloc]
initWithFocusedViewRect:NSMakeRect(0,0,stringSize.width,stringSize.height)]
autorelease];
699 }
700 NS_HANDLER {
701 NSLog(@"Exception trying to generate text image: %@",
localException);
702 [[simpleWindow contentView] unlockFocus];
The lockFocus at line 693 works fine now, but I'm still not able to draw into
the new context and extract the drawn image.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?25943>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/