CoreImage Strangeness

  • I am trying to have an NSView subclass draw a CIImage* every time it
    draws. This works the first time, but afterwards it doesn't. The logs
    indicate that the program starts treating the CIImage* like an
    NSCFString (e.g., when I try to run the extent method, it says
    NSCFString doesn't have one). Is there something obvious I am doing
    wrong?
  • Make sure you're retaining the CIImage properly. The error you're
    describing often occurs when an object is released, and then the
    memory to which your pointer points becomes occupied by another
    object (a string in this case.)

    -Jonathan Grynspan

    On 29-Oct-06, at 1:48 AM, Henry Skelton wrote:

    > I am trying to have an NSView subclass draw a CIImage* every time
    > it draws. This works the first time, but afterwards it doesn't. The
    > logs indicate that the program starts treating the CIImage* like an
    > NSCFString (e.g., when I try to run the extent method, it says
    > NSCFString doesn't have one). Is there something obvious I am doing
    > wrong?
    > _______________________________________________
    > MacOSX-dev mailing list
    > <MacOSX-dev...>
    > http://www.omnigroup.com/mailman/listinfo/macosx-dev
  • Thanks, adding a retain fixed it.
    On Oct 29, 2006, at 1:52 AM, Jonathan Grynspan wrote:

    > Make sure you're retaining the CIImage properly. The error you're
    > describing often occurs when an object is released, and then the
    > memory to which your pointer points becomes occupied by another
    > object (a string in this case.)
    >
    > -Jonathan Grynspan
    >
    > On 29-Oct-06, at 1:48 AM, Henry Skelton wrote:
    >
    >> I am trying to have an NSView subclass draw a CIImage* every time
    >> it draws. This works the first time, but afterwards it doesn't.
    >> The logs indicate that the program starts treating the CIImage*
    >> like an NSCFString (e.g., when I try to run the extent method, it
    >> says NSCFString doesn't have one). Is there something obvious I am
    >> doing wrong?
    >> _______________________________________________
    >> MacOSX-dev mailing list
    >> <MacOSX-dev...>
    >> http://www.omnigroup.com/mailman/listinfo/macosx-dev
    >
    > _______________________________________________
    > MacOSX-dev mailing list
    > <MacOSX-dev...>
    > http://www.omnigroup.com/mailman/listinfo/macosx-dev
  • Okay, now make sure you release it when you're done with it. ;)
    CIImage isn't exactly a lightweight object.

    -Jonathan Grynspan

    On 29-Oct-06, at 2:52 AM, Henry Skelton wrote:

    > Thanks, adding a retain fixed it.
    > On Oct 29, 2006, at 1:52 AM, Jonathan Grynspan wrote:
    >
    >> Make sure you're retaining the CIImage properly. The error you're
    >> describing often occurs when an object is released, and then the
    >> memory to which your pointer points becomes occupied by another
    >> object (a string in this case.)
    >>
    >> -Jonathan Grynspan
    >>
    >> On 29-Oct-06, at 1:48 AM, Henry Skelton wrote:
    >>
    >>> I am trying to have an NSView subclass draw a CIImage* every time
    >>> it draws. This works the first time, but afterwards it doesn't.
    >>> The logs indicate that the program starts treating the CIImage*
    >>> like an NSCFString (e.g., when I try to run the extent method, it
    >>> says NSCFString doesn't have one). Is there something obvious I
    >>> am doing wrong?
    >>> _______________________________________________
    >>> MacOSX-dev mailing list
    >>> <MacOSX-dev...>
    >>> http://www.omnigroup.com/mailman/listinfo/macosx-dev
    >>
    >> _______________________________________________
    >> MacOSX-dev mailing list
    >> <MacOSX-dev...>
    >> http://www.omnigroup.com/mailman/listinfo/macosx-dev
    >
previous month october 2006 next month
MTWTFSS
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
Go to today