Exception when filtering data of entity which contains transformable attribute #14

Closed
garnett opened this Issue Mar 9, 2013 · 5 comments

Comments

Projects
None yet
2 participants
@garnett
Contributor

garnett commented Mar 9, 2013

Here it the trace (1800 is 'NSTransformableAttributeType'):

2013-03-09 19:05:49.984 CoreDataPro[7015:303] NSPredicatePattern cannot create operators for an NSAttributeDescription with type 1800
2013-03-09 19:05:49.986 CoreDataPro 7015:303 (
0 CoreFoundation 0x00007fff86dd60a6 __exceptionPreprocess + 198
1 libobjc.A.dylib 0x00007fff902a93f0 objc_exception_throw + 43
2 CoreFoundation 0x00007fff86dd5e7c +[NSException raise:format:] + 204
3 AppKit 0x00007fff8a373708 +[NSPredicateEditorRowTemplate _operatorsForAttributeType:] + 474
4 AppKit 0x00007fff8a373a1b +[NSPredicateEditorRowTemplate templatesWithAttributeKeyPaths:inEntityDescription:] + 478
5 CoreDataPro 0x0000000100023440 -[MFLMainWindowController showPredicateEditor:] + 1840
6 AppKit 0x00007fff89dd9a59 -[NSApplication sendAction:to:from:] + 342
7 AppKit 0x00007fff89dd98b7 -[NSControl sendAction:to:] + 85
8 AppKit 0x00007fff89dd97eb -[NSCell _sendActionFrom:] + 138
9 AppKit 0x00007fff89dd7cd3 -[NSCell trackMouse:inRect:ofView:untilMouseUp:] + 1855
10 AppKit 0x00007fff89dd7521 -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 504
11 AppKit 0x00007fff89dd6c9c -[NSControl mouseDown:] + 820
12 AppKit 0x00007fff89dce60e -[NSWindow sendEvent:] + 6853
13 AppKit 0x00007fff89dca744 -[NSApplication sendEvent:] + 5761
14 AppKit 0x00007fff89ce02fa -[NSApplication run] + 636
15 AppKit 0x00007fff89c84cb6 NSApplicationMain + 869
16 CoreDataPro 0x0000000100001302 main + 34
17 CoreDataPro 0x00000001000012d4 start + 52
)

@yepher

This comment has been minimized.

Show comment Hide comment
@yepher

yepher Mar 9, 2013

Owner

Do you have a sample .mom and persistence file that demonstrates this?

Owner

yepher commented Mar 9, 2013

Do you have a sample .mom and persistence file that demonstrates this?

@garnett

This comment has been minimized.

Show comment Hide comment
@garnett

garnett Mar 12, 2013

Contributor

It's reproducible in test file 'fetchRequest.mom': just try to filter AnotherEntity

Contributor

garnett commented Mar 12, 2013

It's reproducible in test file 'fetchRequest.mom': just try to filter AnotherEntity

@yepher

This comment has been minimized.

Show comment Hide comment
@yepher

yepher Mar 13, 2013

Owner

Thanks, I was able to reproduce this. I will have a look at it.

Owner

yepher commented Mar 13, 2013

Thanks, I was able to reproduce this. I will have a look at it.

yepher pushed a commit that referenced this issue Mar 13, 2013

@yepher

This comment has been minimized.

Show comment Hide comment
@yepher

yepher Mar 13, 2013

Owner

Filter no longer crashes on entities that contains NSTransformableAttributeType.

@garnett can you please verify it is working for you. If so I will close the issue.

This is the commit that solves the issue and has been merged into Develop and Master. I will wait until verified before merging into feature/multiDocSupport.

Commit: 26da37a [26da37a]
Parents: da0782e
Date: March 13, 2013 8:15:37 AM CDT
Prevents crash when attribute type NSTransformableAttributeType. This was reported in issue #14.

On a side note:

I don't really call this a fix. It is more of a solution to prevent the filter crash.

I would like to enable filtering for this type somehow but I am not sure what the best solution is. The attributeValueClassName will probably help with the filter scheme but I am not sure how folks tend to use this in their data models. If it is custom classes than maybe the best we can do is allow them to filter by size or less valuable "attributeValueClassName" which will probably be all the same.

For now I have just excluded "NSTransformableAttributeType" from the filter list until someone finds a need and can offer a good scenario for filtering by that attribute type.

Owner

yepher commented Mar 13, 2013

Filter no longer crashes on entities that contains NSTransformableAttributeType.

@garnett can you please verify it is working for you. If so I will close the issue.

This is the commit that solves the issue and has been merged into Develop and Master. I will wait until verified before merging into feature/multiDocSupport.

Commit: 26da37a [26da37a]
Parents: da0782e
Date: March 13, 2013 8:15:37 AM CDT
Prevents crash when attribute type NSTransformableAttributeType. This was reported in issue #14.

On a side note:

I don't really call this a fix. It is more of a solution to prevent the filter crash.

I would like to enable filtering for this type somehow but I am not sure what the best solution is. The attributeValueClassName will probably help with the filter scheme but I am not sure how folks tend to use this in their data models. If it is custom classes than maybe the best we can do is allow them to filter by size or less valuable "attributeValueClassName" which will probably be all the same.

For now I have just excluded "NSTransformableAttributeType" from the filter list until someone finds a need and can offer a good scenario for filtering by that attribute type.

@garnett

This comment has been minimized.

Show comment Hide comment
@garnett

garnett Mar 13, 2013

Contributor

Works for me.

Contributor

garnett commented Mar 13, 2013

Works for me.

@yepher yepher closed this Mar 13, 2013

yepher pushed a commit that referenced this issue Mar 14, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment