• 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
RE: Crash while getting the NSColor components
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Crash while getting the NSColor components


  • Subject: RE: Crash while getting the NSColor components
  • From: Vinay Prabhu <email@hidden>
  • Date: Wed, 21 Jun 2006 11:11:12 +0530
  • Importance: Normal

I have found out the cause for the crash,

Before I call the method, where it was crashing,
I was manipulating the color of the iVar colorOfPanelSolid.

This is how the code is,

float red, green, blue, alpha;
float redEdit = [sender floatValue]/255;  // divide by 255 is because the
text field will take values from 0 to 255
currentColor = [activeColorWell color];
[currentColor getRed:&red green:&green blue:&blue alpha:&alpha];
editedColor = [NSColor colorWithCalibratedRed:redEdit green:green blue:blue
alpha:alpha];

colorOfPanelSolid = editedColor;

If the value's of redEdit and red is same, afterwards when I execute
[colorOfPanelSolid getRed:&red green:&green blue:&blue alpha:&alpha];
Application crashes.

I suppose it should not crash in the above condition...


-----Original Message-----
From: Corbin Dunn [mailto:email@hidden]
Sent: Wednesday, June 21, 2006 4:04 AM
To: Vinay Prabhu
Cc: email@hidden
Subject: Re: Crash while getting the NSColor components




> [colorOfPanelSolid getRed:&red green:&green blue:&blue
> alpha:&alpha];

This ivar, colorOfPanelSolid, may not be properly retained. It is hard
to say without seeing more code. Also, what is the backtrace of the
crash?

corbin

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s)and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender or email@hidden
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Crash while getting the NSColor components
      • From: Chris Suter <email@hidden>
References: 
 >Re: Crash while getting the NSColor components (From: Corbin Dunn <email@hidden>)

  • Prev by Date: Re: Problem in simulating the events
  • Next by Date: Re: Crash while getting the NSColor components
  • Previous by thread: Re: Crash while getting the NSColor components
  • Next by thread: Re: Crash while getting the NSColor components
  • Index(es):
    • Date
    • Thread