• 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
cocoa bindings causing crash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cocoa bindings causing crash


  • Subject: cocoa bindings causing crash
  • From: Michael Link <email@hidden>
  • Date: Wed, 21 Jun 2006 17:00:06 -0500

I have an array controller populated with a Core-Data entity "User" that has some attributes and 1 to-one relationship to an "Image" entity. I also have a tableview with the table columns bound to the following model keys of "User":

icon.image, name, city, state, country

After inserting new User's and Icon's scrolling in the tableview will eventually cause a crash. It appears CFRetain() is called with a nil value.

From digging around in memory it appears that the icon.image key is the culprit. The code that changes the image is:

- (void)parseFetchIconDataFromConnection:(CRURLConnection*)connection
{
NSImage* __image = [[NSImage alloc] initWithData:[connection data]];
Icon* __icon = [[connection user] icon];

if (__icon != nil) {
[__icon setImage:__image];
}
else {
__icon = [NSEntityDescription insertNewObjectForEntityForName:@"Icon" inManagedObjectContext:[[self dataSource] managedObjectContext]];
[__icon setImage:__image];
[[connection user] setIcon:__icon];
}

[__image release];
}


This appears to be KVO, so I'm not sure what is causing the crash? The accessor methods are all standard core-data factory methods.

#0 0x907c6584 in CFRetain
#1 0x929fc724 in _NSKeyValueObservationInfoCreateByRemoving
#2 0x929fc4fc in -[NSObject(NSKeyValueObserverRegistration) _removeObserver:forProperty:]
#3 0x929fc3ec in -[NSObject(NSKeyValueObserverRegistration) removeObserver:forKeyPath:]
#4 0x929fc33c in -[NSObject(NSKeyValueObserverRegistration) removeObserver:forKeyPath:]
#5 0x93974ae0 in -[_NSModelObservingTracker _registerOrUnregister:observerNotificationsForModelObject:]
#6 0x93bd7bd8 in -[_NSModelObservingTracker _stopObservingModelObject:]
#7 0x93bd7cd8 in -[_NSModelObservingTracker stopObservingModelObjectAtReferenceIndex:]
#8 0x9397472c in -[_NSModelObservingTracker setObservingToModelObjectsRange:]
#9 0x93974618 in -[_NSBindingAdaptor tableView:updateVisibleRowInformation:]
#10 0x937d0ca4 in -[NSTableView drawRect:]
#11 0x93765bf8 in -[NSView _drawRect:clip:]
#12 0x9376499c in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisible RectForView:topView:]
#13 0x93764d48 in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisible RectForView:topView:]
#14 0x93764d48 in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisible RectForView:topView:]
#15 0x93764d48 in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisible RectForView:topView:]
#16 0x9375e3f4 in -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:]
#17 0x937536e8 in -[NSView displayIfNeeded]
#18 0x9385a7d8 in -[NSClipView _immediateScrollToPoint:]
#19 0x9385a0e8 in -[NSScrollView scrollClipView:toPoint:]
#20 0x937c8934 in -[NSClipView _scrollTo:animate:]
#21 0x93859ec4 in -[NSScrollView _doScroller:hitPart:multiplier:]
#22 0x93aee448 in -[NSScrollView scrollWheel:]
#23 0x937ee318 in forwardMethod
#24 0x93b65cfc in -[NSView scrollWheel:]
#25 0x937ee318 in forwardMethod
#26 0x93b65cfc in -[NSView scrollWheel:]
#27 0x9377c340 in -[NSWindow sendEvent:]
#28 0x002e28a0 in -[MXWindow sendEvent:] at MXWindow.m:247
#29 0x93724c74 in -[NSApplication sendEvent:]
#30 0x9371c0b0 in -[NSApplication run]
#31 0x9380cbfc in NSApplicationMain
#32 0x00014f28 in main at main.m:14


If anyone has a clue to what might be going on, please share :)

--
Michael

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

  • Prev by Date: Re: project pointers and transition advice
  • Next by Date: NSMatrix and NSImageCel
  • Previous by thread: Re: Unique data in Core Data?
  • Next by thread: NSMatrix and NSImageCel
  • Index(es):
    • Date
    • Thread