• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Crashing View
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Crashing View


  • Subject: Crashing View
  • From: Tom Marchand <email@hidden>
  • Date: Sat, 7 Apr 2007 18:00:32 -0400

Hi,

I've got a custom view that has a transparent background created with colorWithDeviceRed. Everything works ok until I resize the window, which results in the app crashing. Any help would be appreciated. Here's the code:

- (id)initWithFrame:(NSRect)frameRect
{
if ((self = [super initWithFrame:frameRect]) != nil)
{
BackGround=[NSColor colorWithDeviceRed:.50 green:0.50 blue:.50 alpha:.50];

//BackGround=[NSColor grayColor];
}
return self;
}


- (void)drawRect:(NSRect)rect
{
	[BackGround set];
	[NSBezierPath fillRect:[self bounds]];
}


And here is the crash info:

#0 0x90a594c7 in objc_msgSend
#1 0x00324e00 in ??
#2 0x9330e3b1 in -[NSView _drawRect:clip:]
#3 0x9330d40b in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:]
#4 0x9330c473 in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisible RectForView:topView:]
#5 0x9330d041 in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisible RectForView:topView:]
#6 0x9330d041 in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisible RectForView:topView:]
#7 0x9330bb78 in -[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisible RectForView:topView:]
#8 0x9330b362 in -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:]
#9 0x9330ac8e in -[NSView displayIfNeeded]
#10 0x93305693 in -[NSWindow _setFrameCommon:display:stashSize:]
#11 0x9330a0ea in -[NSWindow setFrame:display:]
#12 0x934438bd in -[NSTitledFrame resizeWithEvent:]
#13 0x93442882 in -[NSTitledFrame mouseDown:]
#14 0x93442707 in -[NSThemeFrame mouseDown:]
#15 0x9336c3af in -[NSWindow sendEvent:]
#16 0x9335e350 in -[NSApplication sendEvent:]
#17 0x93288dfe in -[NSApplication run]
#18 0x9327cd2f in NSApplicationMain
#19 0x0000dffc in main at main.m:13
_______________________________________________


Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Crashing View
      • From: Chris Hanson <email@hidden>
    • Re: Crashing View
      • From: Sherm Pendley <email@hidden>
    • Re: Crashing View
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: DO crashes when returning NSError by reference
  • Next by Date: Re: Crashing View
  • Previous by thread: Re: DO crashes when returning NSError by reference
  • Next by thread: Re: Crashing View
  • Index(es):
    • Date
    • Thread