{ "id": "130822", "key": "TIMOB-17141", "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": "15972", "description": "Release 3.4.0", "name": "Release 3.4.0", "archived": false, "released": true, "releaseDate": "2014-09-28" }, { "id": "16704", "description": "Release 3.5.0", "name": "Release 3.5.0", "archived": false, "released": true, "releaseDate": "2015-01-13" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-09-22T20:53:12.000+0000", "created": "2014-05-23T10:58:03.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "crash", "ios", "listview", "searchbar" ], "versions": [ { "id": "15971", "description": "Release 3.2.3", "name": "Release 3.2.3", "archived": false, "released": true, "releaseDate": "2014-04-30" } ], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-11-21T20:31:40.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": "h1. Problem\r\nif you change the position of the listView during a search the app crashes\r\n\r\nh1. Reproduction\r\nDrop the following in an app.js. \r\n1) Run it\r\n2) put 555 in the textField and do a search \r\n3) press the button (\"change top of listview\") twice and it will crash.\r\n\r\n(values like 555 or 100 crash the application)\r\n\r\nwarning!: we noticed that if the searched values are less than the listview's height the application will crash.\r\n\r\nAs a matter of fact, if we put values like '78' or '0' the application does not crash.\r\n{code:title=App.js | borderStyle=solid}\r\nvar win = Ti.UI.createWindow({});\r\n\r\nvar search = Ti.UI.createSearchBar({});\r\n\r\nvar items = [];\r\nfor (var i = 0; i<1000; i++) {\r\n\titems.push({\r\n\t\tproperties: {\r\n\t\t\ttitle: 'item: ' + i,\r\n\t\t\tsearchableText: 'item: ' + i\r\n\t\t}\r\n\t});\r\n}\r\n\r\nvar button = Ti.UI.createButton({\r\n\ttitle : 'Change top of listView',\r\n\ttop:50,\r\n});\r\n\r\nbutton.addEventListener('click', function() {\r\n\tlistView.top === 100 ? listView.top = 150 : listView.top = 100;\r\n});\r\n\r\nvar listView = Titanium.UI.createListView({\r\n\ttop: 100,\r\n\tsections: [ Ti.UI.createListSection({items: items}) ],\r\n\tsearchView: search,\r\n});\r\n\r\nwin.add(button);\r\nwin.add(listView);\r\n\r\nwin.open();\r\n{code}\r\nh1. Console Log\r\n\r\n{code:title=Console Log | borderStyle=solid}\r\n[ERROR] : The application has crashed with an uncaught exception 'NSRangeException'.\r\n[ERROR] : Reason:\r\n[ERROR] : *** -[__NSArrayM objectAtIndex:]: index 19 beyond bounds [0 .. 0]\r\n[ERROR] : Stack trace:\r\n[ERROR] : 0 CoreFoundation 0x044081c8 __exceptionPreprocess + 152\r\n[ERROR] : 1 libobjc.A.dylib 0x040c48e5 objc_exception_throw + 44\r\n[ERROR] : 2 CoreFoundation 0x043a93f6 -[__NSArrayM objectAtIndex:] + 246\r\n[ERROR] : 3 test 0x00291768 -[TiUIListView pathForSearchPath:] + 184\r\n[ERROR] : 4 test 0x00297b19 -[TiUIListView tableView:cellForRowAtIndexPath:] + 73\r\n[ERROR] : 5 UIKit 0x00ade11f -[UITableView _createPreparedCellForGlobalRow:withIndexPath:] + 412\r\n[ERROR] : 6 UIKit 0x00ade1f3 -[UITableView _createPreparedCellForGlobalRow:] + 69\r\n[ERROR] : 7 UIKit 0x00abfece -[UITableView _updateVisibleCellsNow:] + 2428\r\n[ERROR] : 8 UIKit 0x00ad46a5 -[UITableView layoutSubviews] + 213\r\n[ERROR] : 9 UIKit 0x00a54964 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 355\r\n[ERROR] : 10 libobjc.A.dylib 0x040d682b -[NSObject performSelector:withObject:] + 70\r\n[ERROR] : 11 QuartzCore 0x0301a45a -[CALayer layoutSublayers] + 148\r\n[ERROR] : 12 QuartzCore 0x0300e244 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380\r\n[ERROR] : 13 QuartzCore 0x0300e0b0 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26\r\n[ERROR] : 14 QuartzCore 0x02f747fa _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 294\r\n[ERROR] : 15 QuartzCore 0x02f75b85 _ZN2CA11Transaction6commitEv + 393\r\n[ERROR] : 16 QuartzCore 0x02f76258 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92\r\n[ERROR] : 17 CoreFoundation 0x043d036e __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30\r\n[ERROR] : 18 CoreFoundation 0x043d02bf __CFRunLoopDoObservers + 399\r\n[ERROR] : 19 CoreFoundation 0x043ae254 __CFRunLoopRun + 1076\r\n[ERROR] : 20 CoreFoundation 0x043ad9d3 CFRunLoopRunSpecific + 467\r\n[ERROR] : 21 CoreFoundation 0x043ad7eb CFRunLoopRunInMode + 123\r\n[ERROR] : 22 GraphicsServices 0x05e795ee GSEventRunModal + 192\r\n[ERROR] : 23 GraphicsServices 0x05e7942b GSEventRun + 104\r\n[ERROR] : 24 UIKit 0x009e5f9b UIApplicationMain + 1225\r\n[ERROR] : 25 test 0x00005a58 main + 456\r\n[ERROR] : 26 libdyld.dylib 0x04a3b701 start + 1\r\n[ERROR] : 2014-05-23 11:46:27.329 test[85362:70b] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 19 beyond bounds [0 .. 0]'\r\n[ERROR] : *** First throw call stack:\r\n[ERROR] : (\r\n[ERROR] : \t0 CoreFoundation 0x044081e4 __exceptionPreprocess + 180\r\n[ERROR] : \t1 libobjc.A.dylib 0x040c48e5 objc_exception_throw + 44\r\n[ERROR] : \t2 CoreFoundation 0x043a93f6 -[__NSArrayM objectAtIndex:] + 246\r\n[ERROR] : \t3 test 0x00291768 -[TiUIListView pathForSearchPath:] + 184\r\n[ERROR] : \t4 test 0x00297b19 -[TiUIListView tableView:cellForRowAtIndexPath:] + 73\r\n[ERROR] : \t5 UIKit 0x00ade11f -[UITableView _createPreparedCellForGlobalRow:withIndexPath:] + 412\r\n[ERROR] : \t6 UIKit 0x00ade1f3 -[UITableView _createPreparedCellForGlobalRow:] + 69\r\n[ERROR] : \t7 UIKit 0x00abfece -[UITableView _updateVisibleCellsNow:] + 2428\r\n[ERROR] : \t8 UIKit 0x00ad46a5 -[UITableView layoutSubviews] + 213\r\n[ERROR] : \t9 UIKit 0x00a54964 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 355\r\n[ERROR] : \t10 libobjc.A.dylib 0x040d682b -[NSObject performSelector:withObject:] + 70\r\n[ERROR] : \t11 QuartzCore 0x0301a45a -[CALayer layoutSublayers] + 148\r\n[ERROR] : \t12 QuartzCore 0x0300e244 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380\r\n[ERROR] : \t13 QuartzCore 0x0300e0b0 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26\r\n[ERROR] : \t14 QuartzCore 0x02f747fa _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 294\r\n[ERROR] : \t15 QuartzCore 0x02f75b85 _ZN2CA11Transaction6commitEv + 393\r\n[ERROR] : \t16 QuartzCore 0x02f76258 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92\r\n[ERROR] : \t17 CoreFoundation 0x043d036e __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30\r\n[ERROR] : \t18 CoreFoundation 0x043d02bf __CFRunLoopDoObservers + 399\r\n[ERROR] : \t19 CoreFoundation 0x043ae254 __CFRunLoopRun + 1076\r\n[ERROR] : \t20 CoreFoundation 0x043ad9d3 CFRunLoopRunSpecific + 467\r\n[ERROR] : \t21 CoreFoundation 0x043ad7eb CFRunLoopRunInMode + 123\r\n[ERROR] : \t22 GraphicsServices 0x05e795ee GSEventRunModal + 192\r\n[ERROR] : \t23 GraphicsServices 0x05e7942b GSEventRun + 104\r\n[ERROR] : \t24 UIKit 0x009e5f9b UIApplicationMain + 1225\r\n[ERROR] : \t25 test 0x00005a58 main + 456\r\n[ERROR] : \t26 libdyld.dylib 0x04a3b701 start + 1\r\n[ERROR] : )\r\n[ERROR] : libc++abi.dylib: terminating with uncaught exception of type NSException\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "iOS: Application crashes during a numeric search on a ListView", "creator": { "name": "Roberto", "key": "roberto", "displayName": "Roberto Zaratin", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "Roberto", "key": "roberto", "displayName": "Roberto Zaratin", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium Mobile SDK 3.2.3.GA", "closedSprints": [ { "id": 219, "state": "closed", "name": "2014 Sprint 19 SDK", "startDate": "2014-09-18T21:06:27.559Z", "endDate": "2014-09-27T00:00:00.000Z", "completeDate": "2014-09-29T13:58:58.022Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "306259", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I followed the exact same steps provided by you and tried to reproduce the issue on iPhone 5S but was not able to reproduce it.\r\n\r\nAre you seeing this error on a particular device?", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-23T17:31:08.000+0000", "updated": "2014-05-23T17:31:08.000+0000" }, { "id": "306401", "author": { "name": "Roberto", "key": "roberto", "displayName": "Roberto Zaratin", "active": true, "timeZone": "America/Los_Angeles" }, "body": "please test again the code,\r\nwe added better explanation ", "updateAuthor": { "name": "Roberto", "key": "roberto", "displayName": "Roberto Zaratin", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-26T08:36:40.000+0000", "updated": "2014-05-26T08:36:40.000+0000" }, { "id": "308438", "author": { "name": "yuchi", "key": "yuchi", "displayName": "Pier Paolo Ramon", "active": true, "timeZone": "Europe/Berlin" }, "body": "This issues is preventing us from porting an old TableView-based layout to a more performant ListView. [~ragrawal], could you have a look on it?", "updateAuthor": { "name": "yuchi", "key": "yuchi", "displayName": "Pier Paolo Ramon", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-06-11T10:07:52.000+0000", "updated": "2014-06-11T10:07:52.000+0000" }, { "id": "308482", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving this to engineering as I can reproduce the issue with the provided test case and steps for further evaluation and prioritization.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-11T17:13:18.000+0000", "updated": "2014-06-11T17:13:18.000+0000" }, { "id": "320523", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue still exists with SDK Version 3.2.3 and 3.4.0\r\n\r\nTitanium Command-Line Interface, \r\nCLI version 3.3.0, \r\nTitanium SDK version 3.2.3.GA \r\nTitanium SDK version 3.4.0.GA \r\nAppcelerator Studio, build: 3.3.0.201407111535 \r\niOS SDK: 7.1 \r\niOS iPhone Simulator: 7.1", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-27T06:16:42.000+0000", "updated": "2014-08-27T06:16:42.000+0000" }, { "id": "325015", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR https://github.com/appcelerator/titanium_mobile/pull/6152 (master)\r\nPR https://github.com/appcelerator/titanium_mobile/pull/6153 (3.4.x)\r\n\r\nMERGED", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-09-22T20:53:12.000+0000", "updated": "2014-09-22T20:57:27.000+0000" }, { "id": "325182", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested and verified no crashes, using\r\nMac osx 10.9.5 Mavericks\r\nAppcelerator Studio, build: 3.4.0.201409161950\r\nTitanium SDK, build: 3.4.0.v20140922135716\r\nacs@1.0.16\r\nalloy 1.5.0-rc2\r\ninstall@0.1.7\r\nnpm@1.4.23\r\nsudo@1.0.3\r\ntitanium 3.4.0-rc4\r\ntitanium-code-processor@1.1.1\r\nXcode6.0.1 (6A317)\r\nDevices:\r\niPhone 6 iOS 8\r\niPhone 6+ iOS 8\r\nClosing as fixed.\r\n", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-23T17:13:19.000+0000", "updated": "2014-09-23T17:13:19.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }