{ "id": "91920", "key": "TIMOB-9155", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "11", "description": "Is not a bug in our product", "name": "Not Our Bug" }, "resolutiondate": "2016-11-02T12:21:42.000+0000", "created": "2012-05-16T14:18:49.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "api" ], "versions": [ { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-14T22:12:34.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "I had an error in my code that was returning an undefined value instead of the text value I'd entered into my text field.\r\nThis caused {{queryMusicLibrary}} to crash with code like the following:\r\n\r\n{code}\r\nitems = Ti.Media.queryMusicLibrary({\r\n\ttitle: { value: undefined, exact: false }\r\n});\r\n{code}\r\n\r\nIt seems like we should handle this better--at least catching the condition and throwing a more coherent exception, instead of with a bit iOS stack trace:\r\n\r\n{code}\r\nMay 16 14:07:27 unknown MusicLibraryTest[776] : *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'invalid value (nil) for property item_extra.title.'\r\n\t*** First throw call stack:\r\n\t(0x37d528bf 0x318381e5 0x37d527b9 0x31c513b3 0x349dfb91 0x349e7f05 0x314e0245 0x314df8a3 0x314df6b3 0x314da85d 0x314dc277 0x314da815 0x314d824b 0x37a0dd55 0x37a10897 0x361751cf 0x361750a4)\r\nMay 16 14:07:27 unknown UIKitApplication:com.appcelerator.musiclibtest[0xb3ee][776] : 1 libobjc.A.dylib 0x318381e5 objc_exception_throw + 32\r\nMay 16 14:07:27 unknown UIKitApplication:com.appcelerator.musiclibtest[0xb3ee][776] : 2 CoreFoundation 0x37d527b9 +[NSException raise:format:] + 0\r\nMay 16 14:07:27 unknown UIKitApplication:com.appcelerator.musiclibtest[0xb3ee][776] : 3 Foundation 0x31c513b3 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 90\r\nMay 16 14:07:27 unknown UIKitApplication:com.appcelerator.musiclibtest[0xb3ee][776] : 4 MusicLibrary 0x349dfb91 -[ML3ComparisonPredicate initWithProperty:value:comparison:caseInsensitive:transformFunction:treatNullAsBlank:] + 176\r\nMay 16 14:07:27 unknown UIKitApplication:com.appcelerator.musiclibtest[0xb3ee][776] : 5 MusicLibrary 0x349e7f05 +[ML3ComparisonPredicate predicateWithProperty:value:comparison:caseInsensitive:] + 80\r\nMay 16 14:07:27 unknown UIKitApplication:com.appcelerator.musiclibtest[0xb3ee][776] : 6 MediaPlayer 0x314e0245 -[MPMediaPropertyPredicate(ML3Additions) _ML3PredicateForML3EntityProperty:] + 276\r\nMay 16 14:07:27 unknown UIKitApplication:com.appcelerator.musiclibtest[0xb3ee][776] : 7 MediaPlayer 0x314df8a3 -[MPMediaQueryCriteria(ML3Additions) ML3ItemsQueryInLibrary:orderingProperties:nameBlankProperty:] + 490\r\nMay 16 14:07:27 unknown UIKitApplication:com.appcelerator.musiclibtest[0xb3ee][776] : 8 MediaPlayer 0x314df6b3 -[MPMediaQueryCriteria(ML3Additions) ML3ItemsQueryInLibrary:] + 86\r\nMay 16 14:07:27 unknown UIKitApplication:com.appcelerator.musiclibtest[0xb3ee][776] : 9 MediaPlayer 0x314da85d __60-[MPMediaLibraryDataProviderML3 loadItemsUsingFetchRequest:]_block_invoke_0 + 68\r\nMay 16 14:07:27 unknown UIKitApplication:com.appcelerator.musiclibtest[0xb3ee][776] : 10 MediaPlayer 0x314dc277 -[MPMediaLibraryDataProviderML3 performBackgroundTaskWithBlock:] + 238\r\nMay 16 14:07:27 unknown UIKitApplication:com.appcelerator.musiclibtest[0xb3ee][776] : 11 MediaPlayer 0x314da815 -[MPMediaLibraryDataProviderML3 loadItemsUsingFetchRequest:] + 80\r\nMay 16 14:07:27 unknown UIKitApplication:com.appcelerator.musiclibtest[0xb3ee][776] : 12 MediaPlayer 0x314d824b __56-[MPMediaEntityStreamArray _onQueueStartLoadingEntities]_block_invoke_0 + 42\r\nMay 16 14:07:27 unknown UIKitApplication:com.appcelerator.musiclibtest[0xb3ee][776] : 13 libdispatch.dylib 0x37a0dd55 _dispatch_call_block_and_release + 12\r\nMay 16 14:07:27 unknown UIKitApplication:com.appcelerator.musiclibtest[0xb3ee][776] : 14 libdispatch.dylib 0x37a10897 _dispatch_worker_thread2 + 258\r\nMay 16 14:07:27 unknown UIKitApplication:com.appcelerator.musiclibtest[0xb3ee][776] : 15 libsystem_c.dylib 0x361751cf _pthread_wqthread + 294\r\nMay 16 14:07:27 unknown UIKitApplication:com.appcelerator.musiclibtest[0xb3ee][776] : 16 libsystem_c.dylib 0x361750a4 start_wqthread + 8\r\nMay 16 14:07:27 unknown UIKitApplication:com.appcelerator.musiclibtest[0xb3ee][776] : terminate called throwing an exception\r\nMay 16 14:07:27 unknown ReportCrash[781] : Formulating crash report for process MusicLibraryTest[776]\r\nMay 16 14:07:27 unknown com.apple.launchd[1] : (UIKitApplication:com.appcelerator.musiclibtest[0xb3ee]) Job appears to have crashed: Abort trap: 6\r\nMay 16 14:07:27 unknown SpringBoard[15] : Application 'MusicLibraryTest' exited abnormally with signal 6: Abort trap:\r\n{code}\r\n\r\n", "attachment": [], "flagged": false, "summary": "iOS: queryMusicLibrary crashes with undefined value in predicate", "creator": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "400247", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Resolving as \"Not Our Bug\", since the [docs|http://docs.appcelerator.com/platform/latest/#!/api/Titanium.Media-method-queryMusicLibrary] clearly say which parameters (an Array of valid {{Ti.Media.Item}}) are expected by the method. Please always validate your parameter before, thx!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-11-02T12:21:42.000+0000", "updated": "2016-11-02T12:21:42.000+0000" }, { "id": "412381", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as the issue is not our bug.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-14T22:12:34.000+0000", "updated": "2017-03-14T22:12:34.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }