{ "id": "111471", "key": "TIMOB-13142", "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": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2013-03-21T18:30:14.000+0000", "created": "2013-03-20T21:59:18.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "triage" ], "versions": [ { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [], "assignee": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-22T18:34:01.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": [], "description": "REPRODUCTION:\r\nRun the code below on the iOS Simulator.\r\n\r\nRESULTS:\r\nThe application crashes.\r\n\r\nNOTES:\r\nCode runs OK on the Android emulator (version 4.2). If you remove the `properties` property from the template, the application runs OK on the iOS simulator.\r\n\r\nTEST CODE:\r\n{code}\r\nvar win = Ti.UI.createWindow({backgroundColor: 'white'});\r\n\r\nvar myTemplate = {\r\n childTemplates: [\r\n { \r\n type: 'Ti.UI.ImageView', \r\n bindId: 'pic',\r\n properties: { \r\n width: '50dp', height: '50dp', left: 0\r\n }\r\n },\r\n { \r\n type: 'Ti.UI.Label', \r\n bindId: 'info', \r\n properties: { \r\n color: 'black',\r\n font: { fontFamily:'Arial', fontSize: '20dp', fontWeight:'bold' },\r\n }\r\n },\r\n { \r\n type: 'Ti.UI.Label',\r\n bindId: 'es_info',\r\n properties: {\r\n color: 'gray',\r\n font: { fontFamily:'Arial', fontSize: '14dp' },\r\n left: '10dp'\r\n }\r\n }\r\n ],\r\n properties: {layout: 'horizontal'}\r\n};\r\n\r\nvar listView = Ti.UI.createListView({\r\n templates: { 'template': myTemplate },\r\n defaultItemTemplate: 'template'\r\n});\r\nvar sections = [];\r\n\r\nvar fruitSection = Ti.UI.createListSection({ headerTitle: 'Fruits / Frutas'});\r\nvar fruitDataSet = [\r\n { info: {text: 'Apple'}, es_info: {text: 'Manzana'}, pic: {image: 'KS_nav_views.png'}},\r\n { info: {text: 'Banana'}, es_info: {text: 'Banana'}, pic: {image: 'KS_nav_views.png'}}\r\n];\r\nfruitSection.setItems(fruitDataSet);\r\nsections.push(fruitSection);\r\n\r\nvar vegSection = Ti.UI.createListSection({ headerTitle: 'Vegetables / Verduras'});\r\nvar vegDataSet = [\r\n { info: {text: 'Carrot'}, es_info: {text: 'Zanahoria'}, pic: {image: 'KS_nav_views.png'}},\r\n { info: {text: 'Potato'}, es_info: {text: 'Patata'}, pic: {image: 'KS_nav_views.png'}}\r\n];\r\nvegSection.setItems(vegDataSet);\r\nsections.push(vegSection);\r\n\r\nvar grainSection = Ti.UI.createListSection({ headerTitle: 'Grains / Granos'});\r\nvar grainDataSet = [\r\n { info: {text: 'Corn'}, es_info: {text: 'Maiz'}, pic: {image: 'KS_nav_views.png'}},\r\n { info: {text: 'Rice'}, es_info: {text: 'Arroz'}, pic: {image: 'KS_nav_views.png'}}\r\n];\r\ngrainSection.setItems(grainDataSet);\r\nsections.push(grainSection);\r\n\r\nlistView.setSections(sections);\r\nwin.add(listView);\r\nwin.open();\r\n{code}\r\n\r\nSIMULATOR LOG:\r\n{{monospaced}}\r\n[ERROR] : \b\b \bThe application has crashed with an uncaught exception 'NSInvalidArgumentException'.\r\n[INFO] : \b\b \b TestListView/1.0 (3.1.0.v20130319225749.29a41bf)\r\n[ERROR] : \b\b \bReason:\r\n[ERROR] : \b\b \b-[UITableViewCellContentView fillBoundsToRect:]: unrecognized selector sent to instance 0xcc0b670\r\n[ERROR] : \b\b \bStack trace:\r\n[ERROR] : \b\b \b0 CoreFoundation 0x038ec012 __exceptionPreprocess + 178\r\n[ERROR] : \b\b \b1 libobjc.A.dylib 0x033ade7e objc_exception_throw + 44\r\n[ERROR] : \b\b \b2 CoreFoundation 0x039774bd -[NSObject(NSObject) doesNotRecognizeSelector:] + 253\r\n[ERROR] : \b\b \b3 CoreFoundation 0x038dbbbc ___forwarding___ + 588\r\n[ERROR] : \b\b \b4 CoreFoundation 0x038db94e _CF_forwarding_prep_0 + 14\r\n[ERROR] : \b\b \b5 libobjc.A.dylib 0x033c16b0 -[NSObject performSelector:withObject:] + 70\r\n[ERROR] : \b\b \b6 TestListView 0x00079c68 -[TiViewProxy makeViewPerformSelector:withObject:createIfNeeded:waitUntilDone:] + 200\r\n[ERROR] : \b\b \b7 TestListView 0x00071158 -[TiViewProxy size] + 184\r\n[ERROR] : \b\b \b8 TestListView 0x0015f605 SizeConstraintViewWithSizeAddingResizing + 277\r\n[ERROR] : \b\b \b9 TestListView 0x0007ce22 -[TiViewProxy relayout] + 610\r\n[ERROR] : \b\b \b10 TestListView 0x00081058 -[TiViewProxy layoutChild:optimize:withMeasuredBounds:] + 1736\r\n[ERROR] : \b\b \b11 TestListView 0x00081340 -[TiViewProxy layoutChildren:] + 656\r\n[ERROR] : \b\b \b12 TestListView 0x0028ccfa -[TiUIListItem layoutSubviews] + 138\r\n[ERROR] : \b\b \b13 UIKit 0x011fa2dd -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 279\r\n[ERROR] : \b\b \b14 libobjc.A.dylib 0x033c16b0 -[NSObject performSelector:withObject:] + 70\r\n[ERROR] : \b\b \b15 QuartzCore 0x02769fc0 -[CALayer layoutSublayers] + 240\r\n[ERROR] : \b\b \b16 QuartzCore 0x0275e33c _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 468\r\n[ERROR] : \b\b \b17 QuartzCore 0x0275e150 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26\r\n[ERROR] : \b\b \b18 QuartzCore 0x026dc0bc _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 324\r\n[ERROR] : \b\b \b19 QuartzCore 0x026dd227 _ZN2CA11Transaction6commitEv + 395\r\n[ERROR] : \b\b \b20 QuartzCore 0x0277fb50 +[CATransaction flush] + 52\r\n[ERROR] : \b\b \b21 UIKit 0x011bfedf _afterCACommitHandler + 132\r\n[ERROR] : \b\b \b22 CoreFoundation 0x038b4afe __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30\r\n[ERROR] : \b\b \b23 CoreFoundation 0x038b4a3d __CFRunLoopDoObservers + 381\r\n[ERROR] : \b\b \b24 CoreFoundation 0x038927c2 __CFRunLoopRun + 1106\r\n[ERROR] : \b\b \b25 CoreFoundation 0x03891f44 CFRunLoopRunSpecific + 276\r\n[ERROR] : \b\b \b26 CoreFoundation 0x03891e1b CFRunLoopRunInMode + 123\r\n[ERROR] : \b\b \b27 GraphicsServices 0x036737e3 GSEventRunModal + 88\r\n[ERROR] : \b\b \b28 GraphicsServices 0x03673668 GSEventRun + 104\r\n[ERROR] : \b\b \b29 UIKit 0x011a9ffc UIApplicationMain + 1211\r\n[ERROR] : \b\b \b30 TestListView 0x00004488 main + 456\r\n[ERROR] : \b\b \b31 TestListView 0x00002d95 start + 53\r\n[ERROR] : \b\b \b2013-03-20 14:52:44.587 TestListView[64139:1c103] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UITableViewCellContentView fillBoundsToRect:]: unrecognized selector sent to instance 0xcc0b670'\r\n[ERROR] : \b\b \b*** First throw call stack:\r\n[ERROR] : \b\b \b(0x38ec012 0x33ade7e 0x39774bd 0x38dbbbc 0x38db94e 0x33c16b0 0x79c68 0x71158 0x15f605 0x7ce22 0x81058 0x81340 0x28ccfa 0x11fa2dd 0x33c16b0 0x2769fc0 0x275e33c 0x275e150 0x26dc0bc 0x26dd227 0x277fb50 0x11bfedf 0x38b4afe 0x38b4a3d 0x38927c2 0x3891f44 0x3891e1b 0x36737e3 0x3673668 0x11a9ffc 0x4488 0x2d95)\r\n-- End simulator log ---------------------------------------------------------\r\n[ERROR] : \b\b \bAn error occurred running the iOS Simulator\r\n[ERROR] : \b\b \b\r\n[ERROR] : \b\b \bProject failed to build after 14s 273ms\r\n{{monospaced}}\r\n\r\n", "attachment": [], "flagged": false, "summary": "iOS: ListView, setting the layout property of the ItemTemplate causes the application to crash ", "creator": { "name": "bhatfield", "key": "bhatfield", "displayName": "Benjamin Hatfield", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "bhatfield", "key": "bhatfield", "displayName": "Benjamin Hatfield", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "Titanium SDK version 3.1.0.v20130319225749\r\niOS SDK: 6.1", "comment": { "comments": [ { "id": "243471", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Layout property is not supported on ItemTemplate.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-21T18:30:14.000+0000", "updated": "2013-03-21T18:30:14.000+0000" }, { "id": "243530", "author": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR https://github.com/appcelerator/titanium_mobile/pull/4004", "updateAuthor": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-21T21:09:31.000+0000", "updated": "2013-03-21T21:09:31.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }