{
"id": "166950",
"key": "TIMOB-24558",
"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": "10000",
"description": "",
"name": "Done"
},
"resolutiondate": "2018-02-04T16:10:27.000+0000",
"created": "2017-04-05T17:51:01.000+0000",
"priority": {
"name": "High",
"id": "2"
},
"labels": [],
"versions": [
{
"id": "19275",
"description": "Patch release for 6.0.x regressions or important fixes",
"name": "Release 6.0.3",
"archived": false,
"released": true,
"releaseDate": "2017-03-22"
}
],
"issuelinks": [],
"assignee": {
"name": "hknoechel",
"key": "hansknoechel",
"displayName": "Hans Knöchel",
"active": true,
"timeZone": "Europe/Berlin"
},
"updated": "2018-08-06T17:34:48.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": "Our builds have suddenly started intermittently failing for iOS due to unit test crashes. Specifically, the XML tests are now crashing. Please find attached a number of crash reports from one of the build nodes.\r\n\r\nAppears that there's some bad GC/dealloc of xml structures.",
"attachment": [
{
"id": "61971",
"filename": "CrashReports.zip",
"author": {
"name": "cwilliams",
"key": "cwilliams",
"displayName": "Christopher Williams",
"active": true,
"timeZone": "America/New_York"
},
"created": "2017-04-05T17:50:59.000+0000",
"size": 433568,
"mimeType": "application/zip"
},
{
"id": "61991",
"filename": "xml-files.zip",
"author": {
"name": "hknoechel",
"key": "hansknoechel",
"displayName": "Hans Knöchel",
"active": true,
"timeZone": "Europe/Berlin"
},
"created": "2017-04-07T20:17:07.000+0000",
"size": 8876,
"mimeType": "application/zip"
}
],
"flagged": false,
"summary": "iOS: XML unit tests crash for iOS intermittently on build machines",
"creator": {
"name": "cwilliams",
"key": "cwilliams",
"displayName": "Christopher Williams",
"active": true,
"timeZone": "America/New_York"
},
"subtasks": [],
"reporter": {
"name": "cwilliams",
"key": "cwilliams",
"displayName": "Christopher Williams",
"active": true,
"timeZone": "America/New_York"
},
"environment": null,
"closedSprints": [
{
"id": 990,
"state": "closed",
"name": "2018 Sprint 02 SDK",
"startDate": "2018-01-14T22:48:43.544Z",
"endDate": "2018-01-28T22:48:00.000Z",
"completeDate": "2018-01-29T16:22:42.911Z",
"originBoardId": 114
}
],
"comment": {
"comments": [
{
"id": "417059",
"author": {
"name": "hknoechel",
"key": "hansknoechel",
"displayName": "Hans Knöchel",
"active": true,
"timeZone": "Europe/Berlin"
},
"body": "The crashs are indeed looking like a race-condition. There are some odd {{OSSpinLockLock}} references that might cause issues. We may need to move those to the GCD pattern, so I'll create a test-case that includes all XML unit-tests to get started.",
"updateAuthor": {
"name": "hknoechel",
"key": "hansknoechel",
"displayName": "Hans Knöchel",
"active": true,
"timeZone": "Europe/Berlin"
},
"created": "2017-04-07T19:58:57.000+0000",
"updated": "2017-04-07T19:58:57.000+0000"
},
{
"id": "417061",
"author": {
"name": "hknoechel",
"key": "hansknoechel",
"displayName": "Hans Knöchel",
"active": true,
"timeZone": "Europe/Berlin"
},
"body": "Test-case:\r\n{code:js}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#fff'\r\n});\r\n\r\nvar btn = Ti.UI.createButton({\r\n title: 'Trigger'\r\n});\r\n\r\nbtn.addEventListener('click', runXMLTests);\r\n\r\nwin.add(btn);\r\nwin.open();\r\n\r\nfunction runXMLTests() {\r\n function it(name, cb) {\r\n Ti.API.info('Test: ' + name);\r\n cb();\r\n }\r\n \r\n // some common initialization specific to the xml suite\r\n\tfunction countNodes(node, type) {\r\n\t\tvar nodeCount = 0;\r\n\t\ttype = 'undefined' == typeof type ? null : type;\r\n\t\tfor (var i = 0; i < node.childNodes.length; i++) {\r\n\t\t\tvar child = node.childNodes.item(i);\r\n\t\t\tif (null == type || child.nodeType == type) {\r\n\t\t\t\tnodeCount++;\r\n\t\t\t\tnodeCount += countNodes(child, type);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn nodeCount;\r\n\t}\r\n\r\n\tvar testSource = {};\r\n\tvar invalidSource = {};\r\n\r\n\tvar i = 0;\r\n\tvar testFiles = [ 'soap.xml', 'xpath.xml', 'nodes.xml', 'nodeCount.xml', 'cdata.xml', 'cdataEntities.xml', 'with_dtd.xml', 'with_ns.xml', 'attrs.xml', 'element.xml', 'elementNS.xml' ];\r\n\tvar invalidFiles = [ 'mismatched_tag.xml', 'no_toplevel.xml', 'no_end.xml' ];\r\n\r\n\tfor (i = 0; i < testFiles.length; i++) {\r\n\t\ttestSource[testFiles[i]] = Ti.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory, testFiles[i]).read().text;\r\n\t}\r\n\tfor (i = 0; i < invalidFiles.length; i++) {\r\n\t\tinvalidSource[invalidFiles[i]] = Ti.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory, invalidFiles[i]).read().text;\r\n\t}\r\n // \r\n\t// it('parseString', function (finish) {\r\n\t// \tshould(Ti.XML.parseString).be.a.Function;\r\n\t// \tshould(function () {\r\n\t// \t\tvar xml = Ti.XML.parseString('