{ "id": "76417", "key": "TIMOB-4494", "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": "11363", "description": "Mobile 1.8.0 M10", "name": "Sprint 2011-31", "archived": true, "released": true, "releaseDate": "2011-08-08" } ], "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2011-08-01T12:14:32.000+0000", "created": "2011-06-15T08:21:04.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "XMLDomDocument", "xml" ], "versions": [ { "id": "11367", "description": "", "name": "Release 1.7.1", "archived": true, "released": true, "releaseDate": "2011-06-21" } ], "issuelinks": [ { "id": "11477", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "77377", "key": "TIMOB-4561", "fields": { "summary": "Actually do iOS TiDomElementProxy 'TODO's", "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-31T20:37:56.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 have had some stable code since API 1.5. \r\n\r\n+Usecase has been developed and attached to the ticket, including an app.js that is from a simple project and an xml file+\r\n+In the usecase, it seems to crash consistently around node 403. Deleting node 403, or nodes before doesn't \"move\" the crash, still crashes at 403 (implying not an xml file issue)+\r\n\r\n\r\nTwo code snippets are listed below that access an XML document with several hundred nodes. The code worked very consistently in previous API versions. With API 1.7 I am getting frequent crashes in simulator and the device always crashes when executing either of these two sections of code\r\n\r\nI have switched back to API 1.6.2 and confirmed that this does NOT Crash.\r\n\r\nThe crash does NOT always happen at the same nodes, (I don't think this is an xml format issue)\r\n\r\nCode Snippet 1:\r\n{code:lang=javascript}\r\nvar docTags = Ti.XML.parseString(oContents.text);\r\nTi.API.debug('B:');\r\nvar eleTags = docTags.getElementsByTagName(\"tag\");\r\nTi.API.debug('C:');\r\n\r\n//Populate the Table View\r\nfor (var i = 0, iLen = eleTags.length; i < iLen; i++) {\r\n\tTi.API.debug('D:'+i +' '+iLen);\r\n\tvar row = Ti.UI.createTableViewRow({\r\n\t\ttitle: eleTags.item(i).getAttribute('tag'),\r\n\t\tclassName: 'tag'\r\n\t});\r\n\tTi.API.debug('E:'+i);\r\n\tvar countLabel = Ti.UI.createLabel({\r\n\t\twidth: 35,\r\n\t\theight: '65%',\r\n\t\tright: 10,\r\n\t\tbackgroundColor: '#778',\r\n\t\tborderColor: '#778',\r\n\t\tborderRadius: 15,\r\n\t\tcolor: 'white',\r\n\t\ttext: eleTags.item(i).getAttribute('count'),\r\n\t\tfont: {\tfontWeight: 'bold',fontSize: 16\t},\r\n\t\ttextAlign: 'center'\r\n\t});\r\n\r\n\trow.add(countLabel);\r\n\tTi.API.debug('F:'+i);\r\n\trow.addEventListener('click', winTagMenu.rowClickEvent);\r\n\ttagData.push(row);\r\n}\r\n{code}\r\n\r\nSimulator Console Output Crash\r\n{code}\r\n[DEBUG] E:99\r\n\r\n[DEBUG] F:99\r\n\r\n[DEBUG] D:100 293\r\n\r\n[DEBUG] E:100\r\n\r\n[DEBUG] App Spec: specified by path /Users/home/Documents/Appcelerator/miMarks/build/iphone/build/Debug-iphonesimulator/miMarks.app\r\n[DEBUG] SDK Root: path=/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk version=4.3 name=Simulator - iOS 4.3\r\n[DEBUG] using device family ipad\r\n[DEBUG] Session started\r\n[DEBUG] Session did end with error Error Domain=DTiPhoneSimulatorErrorDomain Code=1 UserInfo=0x113610 \"The simulated application quit.\"\r\n[INFO] Application has exited from Simulator\r\n{code}\r\n\r\nCode Snippet 2\r\n{code:lang=javascript}\r\nif (filePosts.exists()) {\r\n\tvar oContents = filePosts.read();\r\n\tvar docPosts = Ti.XML.parseString(oContents.text);\r\n\tvar elePosts = docPosts.getElementsByTagName(\"post\");\r\n\t\t\t\r\n\t//For Loop to check Tag and push to post array.\r\n\t//Populate the data Array\r\n\tUtil.log({\r\n\t\ttype: 'debug',\r\n\t\tmsg: 'Service.getPostData: Before For'\r\n\t});\r\n\tfor (var i = 0, iLen = elePosts.length; i < iLen; i++) {\r\n\t\t//Populate Object\r\n\t\tTi.API.debug('1:'+i+ \" \"+iLen);\r\n\t\tvar sDescription = elePosts.item(i).getAttribute('description');\r\n\t\tTi.API.debug('2:'+i+\" \"+sDescription);\r\n\t\tvar sHref = elePosts.item(i).getAttribute('href');\r\n\t\tTi.API.debug('3:'+i);\r\n\t\tvar oPost = {\r\n\t\t\thref: sHref,\r\n\t\t\ttitle: sDescription,\r\n\t\t\thash: elePosts.item(i).getAttribute('hash'),\r\n\t\t\tdescription: sDescription,\r\n\t\t\ttag: elePosts.item(i).getAttribute('tag'),\r\n\t\t\timage: parseUri(sHref).host + '.jpg'\r\n\t\t};\r\n\t\t\t\t\r\n\t\toReturn.data.push(oPost);\r\n\t};\r\n}\r\n{code}\r\n\r\nSimulator Console Crash 2\r\n{code}\r\n[DEBUG] 1:482 527\r\n\r\n[DEBUG] 2:482 Openomy - The Online File System - Organizing your web based world\r\n\r\n[DEBUG] 3:482\r\n\r\n[DEBUG] App Spec: specified by path /Users/home/Documents/Appcelerator/miMarks/build/iphone/build/Debug-iphonesimulator/miMarks.app\r\n[DEBUG] SDK Root: path=/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk version=4.3 name=Simulator - iOS 4.3\r\n[DEBUG] using device family ipad\r\n[DEBUG] Session started\r\n[DEBUG] Session did end with error Error Domain=DTiPhoneSimulatorErrorDomain Code=1 UserInfo=0x104d80 \"The simulated application quit.\"\r\n[INFO] Application has exited from Simulator\r\n{code}", "attachment": [ { "id": "21453", "filename": "app.js", "author": { "name": "talosi", "key": "talosi", "displayName": "Tim Alosi", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-06-24T14:47:09.000+0000", "size": 1198, "mimeType": "application/x-javascript" }, { "id": "21454", "filename": "posts.xml", "author": { "name": "talosi", "key": "talosi", "displayName": "Tim Alosi", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-06-24T14:47:30.000+0000", "size": 150627, "mimeType": "application/xml" } ], "flagged": false, "summary": "Ti.XML.XMLDomDocument causing device and simulator crashes in API 1.7 with accessing attributes", "creator": { "name": "talosi", "key": "talosi", "displayName": "Tim Alosi", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "talosi", "key": "talosi", "displayName": "Tim Alosi", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "* API 1.7 (Released)\r\n* API 1.7.1\r\n* Titanium Studio 1.0\r\n* iOS 4.3.2\r\n* Xcode 4.0.2\r\n", "comment": { "comments": [ { "id": "157227", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "In order for us to progress this issue, please would you edit your ticket and replace your code with a [Use-case|http://wiki.appcelerator.org/display/guides/Contributing+to+Titanium#ContributingtoTitanium-CreatingGoodUsecases]. To summarize, this is the simplest code that will demonstrate the issue, and will run without any modification.\r\n\r\nAlso, please include some test data, so that we may reproduce it.\r\n\r\nLastly, please use the wiki markup provided, to reformat your code block (surround it with the \\{code\\} macro)\r\n\r\nThanks", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-06-20T16:06:48.000+0000", "updated": "2011-06-20T16:06:48.000+0000" }, { "id": "157727", "author": { "name": "talosi", "key": "talosi", "displayName": "Tim Alosi", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Been out of town ... I will work up a use case with sample data", "updateAuthor": { "name": "talosi", "key": "talosi", "displayName": "Tim Alosi", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-06-24T05:51:27.000+0000", "updated": "2011-06-24T05:51:27.000+0000" }, { "id": "157753", "author": { "name": "talosi", "key": "talosi", "displayName": "Tim Alosi", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Developed and attached a use case. Looking forward to your assessment", "updateAuthor": { "name": "talosi", "key": "talosi", "displayName": "Tim Alosi", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-06-24T14:58:56.000+0000", "updated": "2011-06-24T14:58:56.000+0000" }, { "id": "158529", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This issue is caused by our lack of attribute support.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-07-05T12:14:01.000+0000", "updated": "2011-07-05T12:14:01.000+0000" }, { "id": "161330", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Could not get app.js to crash. The code snippets refused to run, even after massaging (eleTags would be null) the code.\n\nIt's likely that between the new TiJSCore and TIMOB-4610, this has already been fixed.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-01T12:14:32.000+0000", "updated": "2011-08-01T12:14:32.000+0000" }, { "id": "161368", "author": { "name": "talosi", "key": "talosi", "displayName": "Tim Alosi", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Blain,\r\n\r\ntwo questions.\r\n\r\n1. Did you try to reproduce on the current code base (with changes from TIMOB-4610)?\r\n2. When you said \"code snippets refused to run\" ... did you mean not crash or not run ... just want to make sure.\r\n\r\nThanks\r\nTim", "updateAuthor": { "name": "talosi", "key": "talosi", "displayName": "Tim Alosi", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-01T13:39:56.000+0000", "updated": "2011-08-01T13:39:56.000+0000" }, { "id": "416534", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as this was last updated in 2011, please open a new ticket if this problem persists.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-31T20:37:56.000+0000", "updated": "2017-03-31T20:37:56.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }