osx - crash on document close when binding trough one-to-one relationship -


build environment: xcode 7 beta 7 os x: 10.10.5 swift 2

i have project using bsmanageddocument class github wrap core data nsdocument. using cocoa bindings data core data nsoutlineview using nstree controller.

the object model simple. object (called sourcegroup_ tied tree controller has one-to-many relationship provide hierarchical data tree controller. has optional one-to-one relationship media object provides url associated media (image, video, etc.).

the outline view has 3 columns bound, 2 bound properties of main object while third thumbnail image comes one-to-one media relationship.

everything displays fine someitmes when close document exc_bad_access in _nsgetusingkeyvaluegetter goes though nsautounbinder , [nstablecellview release] through [nsautoreleasepool drain]. doesn't happen every time happen occasionally.

it remove column bound through one-to-one relationship never crashes. if add in non-core data property on sourcegroup returns image preferredmedia relationship , bind property on sourcegroup, never crashes.

it doesn't matter type of field is. if bind through relationship, (sometimes) crashes on close, whether it's string or nsimage.

i've tried generating core data objects objective c rather swift made no difference in behavior. no matter change 1 constant if bind view in table column through relationship crashes on close. yet, on detail side, if bind same fields through selectionindex works fine , never crashes. crash occurs if it's in outline view.

i know descriptions can bit vague prepared screenshots unfortunately appear lack enough reputation share them. i'll try describe setup.

the tree controller in entity mode entity set sourcegroup. it's source descriptors , managed object context bound view controller.

the outline view's content bound tree controller's arrangedobjects controller key. selectionindexpaths , sort descriptors bound tree controller.

the value nsimageview in column bound table cell view model key path set objectvalue.preferredmedia.thumbnail.

this displays causes intermittent problems on closing document. if put thumbnail image property sourcegroup , bind image view objectvalue.thumbnail never see issue

i don't see in docs type of setup being problem i'm new enough os x programming may have missed something.

can see problem in i'm trying do?

i had similar problem core data, treecontroller , images. managed object context released before outlineview , treecontroller. context turning managed objects faults before bindings remove observers. workaround setting content of treecontroller nil when window close.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -