{ "id": "63674", "key": "TIMOB-3042", "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": [ { "id": "11258", "description": "Holding Pen for Triaged Issues", "name": "Backlog", "archived": false, "released": false } ], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2011-10-27T18:30:18.000+0000", "created": "2011-04-15T03:35:22.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "defect", "ios", "reported-1.5.1", "reported-1.6.0", "rplist" ], "versions": [ { "id": "11231", "name": "Release 1.5.1", "archived": true, "released": true, "releaseDate": "2011-01-24" }, { "id": "11233", "name": "Release 1.6.0", "archived": true, "released": true, "releaseDate": "2011-02-23" } ], "issuelinks": [ { "id": "13665", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "82068", "key": "TIMOB-5892", "fields": { "summary": "iOS: needs to handle thrown exceptions (revisiting)", "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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-03T06:28:30.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": "{html}

Problem

\n

Calling removeRow on a picker column throws an Unexpected\nArgument Exception.

\n

Sample Code

\n

The following code shows a picker. If you tap on the\nnon-selected row, removeRow will be called on the first row in the\npicker.

\n
\nvar win = Ti.UI.createWindow({ backgroundColor: '#fff' });\n\nvar picker = Titanium.UI.createPicker();\nvar rows = [\n    Titanium.UI.createPickerRow({title:'Bananas'}),\n    Titanium.UI.createPickerRow({title:'Strawberries'}),\n    Titanium.UI.createPickerRow({title:'Mangos'}),\n    Titanium.UI.createPickerRow({title:'Grapes'})\n];\npicker.add(rows);\npicker.addEventListener('change', function(evt) {\n    var column = picker.getColumns()[0];\n    column.removeRow(column.rowAt(0));\n});\n\nwin.add(picker);\nwin.open();\n
\n

Exception

\n
\n[ERROR] Invalid type passed to function. expected: NSNull, was: TiUIPickerRowProxy in -[TiUIPickerColumnProxy removeRow:] (TiUIPickerColumnProxy.m:57)\n[ERROR] The application has crashed with an unhandled exception. Stack trace:\n0 CoreFoundation 0x02254bcc __exceptionPreprocess + 156\n1 libobjc.A.dylib 0x023a95c2 objc_exception_throw + 47\n2 Playground2 0x0009c1a4 -[TiProxy throwException:subreason:location:] + 478\n3 Playground2 0x00115067 -[TiUIPickerColumnProxy removeRow:] + 514\n4 CoreFoundation 0x021c567d __invoking___ + 29\n5 CoreFoundation 0x021c5551 -[NSInvocation invoke] + 145\n6 Playground2 0x00039321 -[KrollMethod call:] + 2092\n7 Playground2 0x000386d3 KrollCallAsFunction + 327\n8 Playground2 0x0028b058 _ZN2TI16TiCallbackObjectINS_8TiObjectEE4callEPNS_10TiExcStateEPS1_NS_7TiValueERKNS_7ArgListE + 552\n9 Playground2 0x0024ef28 cti_op_call_NotTiFunction + 632\n10 ??? 0x0b0f2aa3 0x0 + 185543331\n11 Playground2 0x001fe69b _ZN2TI11Interpreter7executeEPNS_18FunctionExecutableEPNS_10TiExcStateEPNS_10TiFunctionEPNS_8TiObjectERKNS_7ArgListEPNS_14ScopeChainNodeEPNS_7TiValueE + 971\n12 Playground2 0x0026a8ff _ZN2TI10TiFunction4callEPNS_10TiExcStateENS_7TiValueERKNS_7ArgListE + 127\n13 Playground2 0x001ae529 _ZN2TI4callEPNS_10TiExcStateENS_7TiValueENS_8CallTypeERKNS_8CallDataES2_RKNS_7ArgListE + 57\n14 Playground2 0x002873d4 TiObjectCallAsFunction + 612\n15 Playground2 0x0003317e -[KrollCallback call:thisObject:] + 784\n16 Playground2 0x00034395 -[KrollEvent invoke:] + 92\n17 Playground2 0x00033a26 -[KrollContext invoke:] + 43\n18 Playground2 0x00035243 -[KrollContext main] + 3216\n19 Foundation 0x005eed4c -[NSThread main] + 81\n20 Foundation 0x005eecd8 __NSThread__main__ + 1387\n21 libSystem.B.dylib 0x97f7e85d _pthread_start + 345\n22 libSystem.B.dylib 0x97f7e6e2 thread_start + 34\n2011-02-03 12:10:00.806 Playground2[65343:6003] *** Terminating app due to uncaught exception 'org.playground2.TiUIPickerColumnProxy', reason: 'Invalid type passed to function. expected: NSNull, was: TiUIPickerRowProxy in -[TiUIPickerColumnProxy removeRow:] (TiUIPickerColumnProxy.m:57)'\n*** Call stack at first throw:\n(\n0 CoreFoundation 0x02254be9 __exceptionPreprocess + 185\n1 libobjc.A.dylib 0x023a95c2 objc_exception_throw + 47\n2 Playground2 0x0009c1a4 -[TiProxy throwException:subreason:location:] + 478\n3 Playground2 0x00115067 -[TiUIPickerColumnProxy removeRow:] + 514\n4 CoreFoundation 0x021c567d __invoking___ + 29\n5 CoreFoundation 0x021c5551 -[NSInvocation invoke] + 145\n6 Playground2 0x00039321 -[KrollMethod call:] + 2092\n7 Playground2 0x000386d3 KrollCallAsFunction + 327\n8 Playground2 0x0028b058 _ZN2TI16TiCallbackObjectINS_8TiObjectEE4callEPNS_10TiExcStateEPS1_NS_7TiValueERKNS_7ArgListE + 552\n9 Playground2 0x0024ef28 cti_op_call_NotTiFunction + 632\n10 ??? 0x0b0f2aa3 0x0 + 185543331\n11 Playground2 0x001fe69b _ZN2TI11Interpreter7executeEPNS_18FunctionExecutableEPNS_10TiExcStateEPNS_10TiFunctionEPNS_8TiObjectERKNS_7ArgListEPNS_14ScopeChainNodeEPNS_7TiValueE + 971\n12 Playground2 0x0026a8ff _ZN2TI10TiFunction4callEPNS_10TiExcStateENS_7TiValueERKNS_7ArgListE + 127\n13 Playground2 0x001ae529 _ZN2TI4callEPNS_10TiExcStateENS_7TiValueENS_8CallTypeERKNS_8CallDataES2_RKNS_7ArgListE + 57\n14 Playground2 0x002873d4 TiObjectCallAsFunction + 612\n15 Playground2 0x0003317e -[KrollCallback call:thisObject:] + 784\n16 Playground2 0x00034395 -[KrollEvent invoke:] + 92\n17 Playground2 0x00033a26 -[KrollContext invoke:] + 43\n18 Playground2 0x00035243 -[KrollContext main] + 3216\n19 Foundation 0x005eed4c -[NSThread main] + 81\n20 Foundation 0x005eecd8 __NSThread__main__ + 1387\n21 libSystem.B.dylib 0x97f7e85d _pthread_start + 345\n22 libSystem.B.dylib 0x97f7e6e2 thread_start + 34\n)\nterminate called after throwing an instance of 'NSException'\n[DEBUG] Session did end with error (null)\n[INFO] Application has exited from Simulator\n
\n

Tested On

\n

Titanium SDK version: 1.6.0 (02/02/11 15:22 a02f7db...), also\n1.5.1
\nBROKEN on iPhone Simulator 4.2

\n

Associated Helpdesk Ticket

\n

http://developer.appcelerator.com/helpdesk/view/69891

{html}", "attachment": [], "flagged": false, "summary": "iOS: Picker Column removeRow Throws Unexpected Argument Exception", "creator": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "environment": "BROKEN on iPhone Simulator 4.2", "comment": { "comments": [ { "id": "170702", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is because of NSInvocation.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-27T18:28:51.000+0000", "updated": "2011-10-27T18:28:51.000+0000" }, { "id": "408794", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing issue due to time passed and irrelevance of the ticket.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-03T06:28:30.000+0000", "updated": "2017-03-03T06:28:30.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }