{ "id": "114322", "key": "TIMOB-13849", "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": "15496", "description": "2013 Sprint 13 JS", "name": "2013 Sprint 13 JS", "archived": true, "released": true, "releaseDate": "2013-07-01" }, { "id": "15111", "description": "2013 Sprint 13", "name": "2013 Sprint 13", "archived": true, "released": true, "releaseDate": "2013-07-01" }, { "id": "15479", "description": "Release 3.1.2", "name": "Release 3.1.2", "archived": true, "released": true, "releaseDate": "2013-07-31" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-06-19T17:22:50.000+0000", "created": "2013-05-14T00:01:59.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "qe-3.1.1" ], "versions": [ { "id": "15478", "description": "Release 3.1.1", "name": "Release 3.1.1", "archived": true, "released": true, "releaseDate": "2013-06-17" } ], "issuelinks": [ { "id": "28741", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "114117", "key": "TIMOB-13805", "fields": { "summary": "LiveView launches 20+ instances of node and requires computer force-restart", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "csullivan", "key": "csullivan", "displayName": "Christian Sullivan", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-04-22T10:07:58.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": "13600", "name": "LiveView", "description": "Live preview of Titanium apps" } ], "description": "h5. Description:\r\nWhile attempting to recreate the issue where the combination of Alloy and Liveview produces hundreds of node processes, I noticed after a few attempts that my files where still there but the content was gone. \r\n\r\nI thought this might be related to me running \"killall node\" when the processes started to multiply, but Matt had experienced this as well and did not use this technique.\r\n\r\nh5. Steps to reproduce:\r\nSteps to reproduce are difficult since this might be related to the repro steps of the other bug, and if not carefully monitored it requires a hard restart.\r\n0) Ensure you have no space in the path to Appcelerator Studio plugin folder\r\n1) Import field services app from Studio sample pane\r\n2) Set run configuration to use liveview\r\n3) Open terminal and type \"killall node\" but do not hit enter (this will allow you to recover form error condition without restart)\r\n4) Launch Matt's handy script to monitor processes (see related bug for script)\r\n5) make an edit to the field service app (use App/my-service-outlets/myServiceOutlets.js)\r\n6) When Matt's script shows more than 20 or so processes, move to the \"killall node\" terminal created earlier and hit enter.\r\n7) Close and reopen the Studio editor for the myServiceOutlets.js file. If still populated, repeat.\r\n\r\n\r\nh5. Result:\r\nThe file is present but the contents are gone.\r\n\r\nh5. Expected Result:\r\nFiles remain unedited by the process", "attachment": [ { "id": "38839", "filename": "ps_grep_node_output_ipad_simulator_3.1.2.201305212422.txt_annotated.png", "author": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-21T21:42:27.000+0000", "size": 57892, "mimeType": "image/png" } ], "flagged": false, "summary": "LiveView: Alloy project files emptied of contents in error condition where multiple node processes are spawned", "creator": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Mac OS 10.8.3\r\nSafari: 6.0.4\r\nXcode 4.6\r\nCLI: 3.1.0\r\ntitanium-code-processor: 1.0.1\r\nAlloy: 1.1.2\r\nAppcelerator Studio, build: 3.1.1.201305130813\r\nTitanium SDK version 3.1.1.v20130509140103\r\nLiveView: 0.1.19\r\nNode: v0.8.22", "comment": { "comments": [ { "id": "251719", "author": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I can confirm I have seen this issue twice on FSA 1.0. A 0-byte file exists in place of the original file /Field-Service-App/app/controllers/my-service-outlets/myServiceOutlets.js", "updateAuthor": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-14T01:02:00.000+0000", "updated": "2013-05-14T01:02:00.000+0000" }, { "id": "251880", "author": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I have reproduced this using iPad Simulator. Live View truncated 49 files to 0-bytes:\r\n\r\n{noformat}\r\nfield_service_app (1.0)$ git status | grep modified: | awk '{print $3}' | xargs ls -la\r\n-rw-r--r-- 1 matt staff 0 May 14 13:12 app/controllers/common/mapAnnotation.js\r\n-rw-r--r-- 1 matt staff 0 May 14 13:12 app/controllers/common/optionDialog.js\r\n-rw-r--r-- 1 matt staff 0 May 14 13:12 app/controllers/common/topNav.js\r\n-rwxr-xr-x 1 matt staff 0 May 14 13:12 app/controllers/index.js\r\n-rwxr-xr-x 1 matt staff 0 May 14 13:12 app/controllers/my-service-outlets/activeOutlet.js\r\n-rw-r--r-- 1 matt staff 0 May 14 13:12 app/controllers/my-service-outlets/myServiceOutlets.js\r\n-rwxr-xr-x 1 matt staff 0 May 14 13:12 app/controllers/my-service-outlets/placard.js\r\n-rwxr-xr-x 1 matt staff 0 May 14 13:12 app/controllers/service-outlet-detail/confirmations.js\r\n-rwxr-xr-x 1 matt staff 0 May 14 13:12 app/controllers/service-outlet-detail/expenses.js\r\n-rw-r--r-- 1 matt staff 0 May 14 13:12 app/controllers/service-outlet-detail/expensesDetail.js\r\n-rw-r--r-- 1 matt staff 0 May 14 13:12 app/controllers/service-outlet-detail/itemHeader.js\r\n-rw-r--r-- 1 matt staff 0 May 14 13:12 app/controllers/service-outlet-detail/productDetail.js\r\n-rwxr-xr-x 1 matt staff 0 May 14 13:12 app/controllers/service-outlet-detail/products.js\r\n-rw-r--r-- 1 matt staff 0 May 14 13:12 app/controllers/service-outlet-detail/productsList.js\r\n-rwxr-xr-x 1 matt staff 0 May 14 13:12 app/controllers/service-outlet-detail/summary.js\r\n-rw-r--r-- 1 matt staff 0 May 14 13:12 app/controllers/service-outlet-detail/taskDetail.js\r\n-rw-r--r-- 1 matt staff 0 May 14 13:12 app/controllers/service-outlet-detail/taskRow.js\r\n-rwxr-xr-x 1 matt staff 0 May 14 13:12 app/controllers/service-outlet-detail/tasks.js\r\n-rw-r--r-- 1 matt staff 0 May 14 13:12 app/lib/fieldServiceApi.js\r\n-rwxr-xr-x 1 matt staff 0 May 14 13:12 app/lib/http.js\r\n-rwxr-xr-x 1 matt staff 0 May 14 13:12 app/lib/salesforce.js\r\n-rwxr-xr-x 1 matt staff 0 May 14 13:12 app/models/assignments.js\r\n-rwxr-xr-x 1 matt staff 0 May 14 13:12 app/models/items.js\r\n-rwxr-xr-x 1 matt staff 0 May 14 13:12 app/models/outlets.js\r\n-rwxr-xr-x 1 matt staff 0 May 14 13:12 app/styles/app.tss\r\n-rw-r--r-- 1 matt staff 0 May 14 13:12 app/styles/common/mapAnnotation.tss\r\n-rw-r--r-- 1 matt staff 0 May 14 13:12 app/styles/common/mapView.tss\r\n-rw-r--r-- 1 matt staff 0 May 14 13:12 app/styles/common/optionDialog.tss\r\n-rw-r--r-- 1 matt staff 0 May 14 13:12 app/styles/common/popover.tss\r\n-rw-r--r-- 1 matt staff 0 May 14 13:12 app/styles/common/topNav.tss\r\n-rwxr-xr-x 1 matt staff 0 May 14 13:12 app/styles/index.tss\r\n-rwxr-xr-x 1 matt staff 0 May 14 13:12 app/styles/my-service-outlets/activeOutlet.tss\r\n-rw-r--r-- 1 matt staff 0 May 14 13:12 app/styles/my-service-outlets/myServiceOutlets.tss\r\n-rwxr-xr-x 1 matt staff 0 May 14 13:12 app/styles/my-service-outlets/placard.tss\r\n-rwxr-xr-x 1 matt staff 0 May 14 13:12 app/styles/service-outlet-detail/confirmations.tss\r\n-rw-r--r-- 1 matt staff 0 May 14 13:12 app/styles/service-outlet-detail/detailsMenu.tss\r\n-rwxr-xr-x 1 matt staff 0 May 14 13:12 app/styles/service-outlet-detail/detailsView.tss\r\n-rw-r--r-- 1 matt staff 0 May 14 13:12 app/styles/service-outlet-detail/documentDetail.tss\r\n-rwxr-xr-x 1 matt staff 0 May 14 13:12 app/styles/service-outlet-detail/documents.tss\r\n-rwxr-xr-x 1 matt staff 0 May 14 13:12 app/styles/service-outlet-detail/expenses.tss\r\n-rw-r--r-- 1 matt staff 0 May 14 13:12 app/styles/service-outlet-detail/expensesDetail.tss\r\n-rw-r--r-- 1 matt staff 0 May 14 13:12 app/styles/service-outlet-detail/itemHeader.tss\r\n-rw-r--r-- 1 matt staff 0 May 14 13:12 app/styles/service-outlet-detail/productDetail.tss\r\n-rwxr-xr-x 1 matt staff 0 May 14 13:12 app/styles/service-outlet-detail/products.tss\r\n-rw-r--r-- 1 matt staff 0 May 14 13:12 app/styles/service-outlet-detail/productsList.tss\r\n-rwxr-xr-x 1 matt staff 0 May 14 13:12 app/styles/service-outlet-detail/summary.tss\r\n-rw-r--r-- 1 matt staff 0 May 14 13:12 app/styles/service-outlet-detail/taskDetail.tss\r\n-rw-r--r-- 1 matt staff 0 May 14 13:12 app/styles/service-outlet-detail/taskRow.tss\r\n-rwxr-xr-x 1 matt staff 0 May 14 13:12 app/styles/service-outlet-detail/tasks.tss\r\n{noformat}\r\n\r\nSteps to reproduce:\r\n\r\n1. Verify no files are 0-bytes in FSA 1.0 with this command:\r\n\r\ngit status | grep modified: | awk '{print $3}' | xargs ls -la\r\n\r\n2. Enable Live View for FSA 1.0 + iPad Simultor.\r\n\r\n3. Edit line /Field-Service-App/app/lib/fieldServiceApi.js \r\n\r\n4. Save file from within Studio.\r\n\r\n5. Live View will trigger 70+ node processes.\r\n\r\n6. Verify that 49 files were truncated to 0-bytes with this command:\r\n\r\ngit status | grep modified: | awk '{print $3}' | xargs ls -la\r\n", "updateAuthor": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-14T20:27:56.000+0000", "updated": "2013-05-14T20:28:18.000+0000" }, { "id": "251930", "author": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I have confirmed that Live View can truncate several different types of source files, including .js, .tss and .xml files. An easy way to restore them from the FSA 1.0 branch is with this command:\n\ngit status | grep modified: | awk '{print $3}' | xargs git checkout", "updateAuthor": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-14T22:21:41.000+0000", "updated": "2013-05-14T22:21:41.000+0000" }, { "id": "251961", "author": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I have confirmed that this bug is still present in Studio 3.1.1.201305141618 with Christian's latest Live View changes v0.1.20.", "updateAuthor": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-15T01:59:00.000+0000", "updated": "2013-05-15T01:59:00.000+0000" }, { "id": "252631", "author": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I have confirmed this bug is still present in Live View 0.1.21 in Studio 3.1.1.201305172432 (Date: 17 May 2013, 00:36:02). This time 55 files were deleted (see file list below). This bug is not ready for QE.\r\n\r\n{noformat}\r\n-rw-r--r-- 1 matt staff 0 May 17 12:30 app/controllers/common/mapAnnotation.js\r\n-rw-r--r-- 1 matt staff 0 May 17 12:30 app/controllers/common/mapView.js\r\n-rw-r--r-- 1 matt staff 0 May 17 12:30 app/controllers/common/optionDialog.js\r\n-rw-r--r-- 1 matt staff 0 May 17 12:30 app/controllers/common/popover.js\r\n-rw-r--r-- 1 matt staff 0 May 17 12:30 app/controllers/common/topNav.js\r\n-rwxr-xr-x 1 matt staff 0 May 17 12:30 app/controllers/index.js\r\n-rwxr-xr-x 1 matt staff 0 May 17 12:30 app/controllers/my-service-outlets/activeOutlet.js\r\n-rw-r--r-- 1 matt staff 0 May 17 12:30 app/controllers/my-service-outlets/myServiceOutlets.js\r\n-rwxr-xr-x 1 matt staff 0 May 17 12:30 app/controllers/my-service-outlets/placard.js\r\n-rwxr-xr-x 1 matt staff 0 May 17 12:30 app/controllers/service-outlet-detail/confirmations.js\r\n-rw-r--r-- 1 matt staff 0 May 17 12:30 app/controllers/service-outlet-detail/detailsMenu.js\r\n-rwxr-xr-x 1 matt staff 0 May 17 12:30 app/controllers/service-outlet-detail/detailsView.js\r\n-rw-r--r-- 1 matt staff 0 May 17 12:30 app/controllers/service-outlet-detail/documentDetail.js\r\n-rwxr-xr-x 1 matt staff 0 May 17 12:30 app/controllers/service-outlet-detail/documents.js\r\n-rwxr-xr-x 1 matt staff 0 May 17 12:30 app/controllers/service-outlet-detail/expenses.js\r\n-rw-r--r-- 1 matt staff 0 May 17 12:30 app/controllers/service-outlet-detail/expensesDetail.js\r\n-rw-r--r-- 1 matt staff 0 May 17 12:30 app/controllers/service-outlet-detail/itemHeader.js\r\n-rw-r--r-- 1 matt staff 0 May 17 12:30 app/controllers/service-outlet-detail/productDetail.js\r\n-rwxr-xr-x 1 matt staff 0 May 17 12:30 app/controllers/service-outlet-detail/products.js\r\n-rw-r--r-- 1 matt staff 0 May 17 12:30 app/controllers/service-outlet-detail/productsList.js\r\n-rwxr-xr-x 1 matt staff 0 May 17 12:30 app/controllers/service-outlet-detail/summary.js\r\n-rw-r--r-- 1 matt staff 0 May 17 12:30 app/controllers/service-outlet-detail/taskDetail.js\r\n-rw-r--r-- 1 matt staff 0 May 17 12:30 app/controllers/service-outlet-detail/taskRow.js\r\n-rwxr-xr-x 1 matt staff 0 May 17 12:30 app/controllers/service-outlet-detail/tasks.js\r\n-rw-r--r-- 1 matt staff 0 May 17 12:30 app/lib/fieldServiceApi.js\r\n-rwxr-xr-x 1 matt staff 0 May 17 12:30 app/lib/http.js\r\n-rwxr-xr-x 1 matt staff 0 May 17 12:30 app/lib/salesforce.js\r\n-rwxr-xr-x 1 matt staff 0 May 17 12:30 app/models/assignments.js\r\n-rwxr-xr-x 1 matt staff 0 May 17 12:30 app/models/items.js\r\n-rwxr-xr-x 1 matt staff 0 May 17 12:30 app/models/outlets.js\r\n-rwxr-xr-x 1 matt staff 0 May 17 12:30 app/styles/app.tss\r\n-rw-r--r-- 1 matt staff 0 May 17 12:30 app/styles/common/mapAnnotation.tss\r\n-rw-r--r-- 1 matt staff 0 May 17 12:30 app/styles/common/mapView.tss\r\n-rw-r--r-- 1 matt staff 0 May 17 12:30 app/styles/common/optionDialog.tss\r\n-rw-r--r-- 1 matt staff 0 May 17 12:30 app/styles/common/popover.tss\r\n-rw-r--r-- 1 matt staff 0 May 17 12:30 app/styles/common/topNav.tss\r\n-rwxr-xr-x 1 matt staff 0 May 17 12:30 app/styles/index.tss\r\n-rwxr-xr-x 1 matt staff 0 May 17 12:30 app/styles/my-service-outlets/activeOutlet.tss\r\n-rw-r--r-- 1 matt staff 0 May 17 12:30 app/styles/my-service-outlets/myServiceOutlets.tss\r\n-rwxr-xr-x 1 matt staff 0 May 17 12:30 app/styles/my-service-outlets/placard.tss\r\n-rwxr-xr-x 1 matt staff 0 May 17 12:30 app/styles/service-outlet-detail/confirmations.tss\r\n-rw-r--r-- 1 matt staff 0 May 17 12:30 app/styles/service-outlet-detail/detailsMenu.tss\r\n-rwxr-xr-x 1 matt staff 0 May 17 12:30 app/styles/service-outlet-detail/detailsView.tss\r\n-rw-r--r-- 1 matt staff 0 May 17 12:30 app/styles/service-outlet-detail/documentDetail.tss\r\n-rwxr-xr-x 1 matt staff 0 May 17 12:30 app/styles/service-outlet-detail/documents.tss\r\n-rwxr-xr-x 1 matt staff 0 May 17 12:30 app/styles/service-outlet-detail/expenses.tss\r\n-rw-r--r-- 1 matt staff 0 May 17 12:30 app/styles/service-outlet-detail/expensesDetail.tss\r\n-rw-r--r-- 1 matt staff 0 May 17 12:30 app/styles/service-outlet-detail/itemHeader.tss\r\n-rw-r--r-- 1 matt staff 0 May 17 12:30 app/styles/service-outlet-detail/productDetail.tss\r\n-rwxr-xr-x 1 matt staff 0 May 17 12:30 app/styles/service-outlet-detail/products.tss\r\n-rw-r--r-- 1 matt staff 0 May 17 12:30 app/styles/service-outlet-detail/productsList.tss\r\n-rwxr-xr-x 1 matt staff 0 May 17 12:30 app/styles/service-outlet-detail/summary.tss\r\n-rw-r--r-- 1 matt staff 0 May 17 12:30 app/styles/service-outlet-detail/taskDetail.tss\r\n-rw-r--r-- 1 matt staff 0 May 17 12:30 app/styles/service-outlet-detail/taskRow.tss\r\n-rwxr-xr-x 1 matt staff 0 May 17 12:30 app/styles/service-outlet-detail/tasks.tss\r\n{noformat}", "updateAuthor": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-17T19:41:22.000+0000", "updated": "2013-05-17T19:42:58.000+0000" }, { "id": "253198", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~mlangston] Can you see if you can reproduce this once you have _disabled_ the JMK beautification process?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-21T19:55:16.000+0000", "updated": "2013-05-21T19:55:16.000+0000" }, { "id": "253199", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "To disable it, simply rename or delete the \"app/alloy.jmk\" file.", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-21T19:56:24.000+0000", "updated": "2013-05-21T19:56:24.000+0000" }, { "id": "253230", "author": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I cannot reproduce the error when I \"mv app/alloy.jmk app/alloy.jmk.save\".\n\nHowever, this bug is so catastrophic (since it deletes most of the developer's source files under the app/ directory) that this bug should be fixed whether or not the user has an app/alloy.jmk file.\n", "updateAuthor": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-21T20:50:25.000+0000", "updated": "2013-05-21T20:50:25.000+0000" }, { "id": "253232", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Yes, but whose responsibility is that to fix? The beautifier is purposely overwriting files. My feeling is that it should be responsible for not overwriting its own files. It's making an assumption that the code won't be called by multiple processes at the same time. That's a faulty assumption. If removing the JMK file fixes it, then I don't think it's our bug.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-21T20:54:47.000+0000", "updated": "2013-05-21T20:54:47.000+0000" }, { "id": "253238", "author": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I agree that the root cause may indeed be in the beautifier. However, the fact remains that our software triggers this catastrophic bug, and it is not unreasonable that Alloy developers would want their code automatically beautified, since one of our own internal developers thought this was ok.\n\nI wouldn't want Appcelerator to get a black eye because of this.\n\n\nFYI I still don't know what a .jmk is and what beautification software is associated with it. All I know is that .jmk + Alloy + Live View deletes my source files.", "updateAuthor": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-21T21:09:34.000+0000", "updated": "2013-05-21T21:09:34.000+0000" }, { "id": "253239", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~ingo] I would side with [~mlangston] on this one. The beautifier is doing nothing fundamentally wrong here. I don't think it's the best use of the alloy.jmk, but it is a totally valid one. And there are undoubtedly similar use cases that would be even more valid and useful that would run into the same issue. While the developer should take measures to ensure that they are safely performing file operations, I think it is a reasonable expectation that liveview will not be going crazy and launching the same process 100 times. I'm not even entirely certain if the developer is aware of this issue if they could even reasonably defend their code against it. And as Matt stated, this one is pretty catastrophic in terms of the damage that could be done, particularly since none of these issues would occur in the absence of liveview. ", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-21T21:10:23.000+0000", "updated": "2013-05-21T21:10:23.000+0000" }, { "id": "253241", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~mlangston] the alloy.jmk is simply a generic, optional container file that allows you to put pre and post compile hooks into the alloy process. They can be used for anything you want, and in this particular case, they are used to beautify the source files post compile. So there's nothing about alloy.jmk itself that is problematic, only what is actually be done in this case within it. It does shine a light on the fact that \"touching\" the source files during compile process though causes problems for liveview, which is a fairly common use case for the alloy.jmk when it is in fact used.", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-21T21:13:59.000+0000", "updated": "2013-05-21T21:13:59.000+0000" }, { "id": "253244", "author": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Than you Tony.\r\n\r\nFYI the source files are deleted serially (i.e. the file deletion bug isn't due to the node-party problem which Christian already fixed).\r\n\r\nThe high-level solution to this problem is that a state machine should act as a governor for our workflow.\r\n", "updateAuthor": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-21T21:15:57.000+0000", "updated": "2013-05-21T21:20:55.000+0000" }, { "id": "253246", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "But what is the reasonable expectation? One node process? Two node processes? Is the fix that LiveView shouldn't be creating many node processes, or that Alloy shouldn't allow JMK file to run in parallel?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-21T21:18:17.000+0000", "updated": "2013-05-21T21:18:17.000+0000" }, { "id": "253249", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Matt, how are you getting that many node processes without a node party?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-21T21:24:19.000+0000", "updated": "2013-05-21T21:24:19.000+0000" }, { "id": "253251", "author": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Ingo, I suggest you task someone with creating a simple state transition document or diagram for how our software interacts with each other and the user's files. If you think this is valuable I could do that after tomorrow.", "updateAuthor": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-21T21:25:15.000+0000", "updated": "2013-05-21T21:25:15.000+0000" }, { "id": "253253", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The reasonable expectation should be that liveview will launch a single instance of node per save. Though, given an adequately long enough compile time (exacerbated by the beautifier) that may not even be enough to stop it. I think at that point, the developer would be responsible for managing their own operations. Alloy couldn't really manage the jmk usage as they would all be contained in separate processes.\n\nI wonder too if this is specific to this particular beautification code, as it turns out it is not uglify-js and is instead jsbeautify, which I don't use. ", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-21T21:27:51.000+0000", "updated": "2013-05-21T21:27:51.000+0000" }, { "id": "253259", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "My guess is that this is not a blocker for 3.1.1. Basically, \"don't do this\" right now.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-21T21:36:21.000+0000", "updated": "2013-05-21T21:36:21.000+0000" }, { "id": "253262", "author": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Ingo, I don't know how the source files are being deleted without the node-party bug. I just measure that they are. Here is a plot of the number of node processes vs. time during which 49 source files were deleted from FSA 1.0 with app/Alloy.jmk file present.\r\n\r\n!ps_grep_node_output_ipad_simulator_3.1.2.201305212422.txt_annotated.png!", "updateAuthor": { "name": "mlangston", "key": "mlangston", "displayName": "Matt Langston", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-21T21:43:20.000+0000", "updated": "2013-05-21T21:49:58.000+0000" }, { "id": "258557", "author": { "name": "csullivan", "key": "csullivan", "displayName": "Christian Sullivan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This should be resolved please re open if this is not true.", "updateAuthor": { "name": "csullivan", "key": "csullivan", "displayName": "Christian Sullivan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-19T17:22:22.000+0000", "updated": "2013-06-19T17:22:22.000+0000" }, { "id": "302007", "author": { "name": "dpandey", "key": "dpandey", "displayName": "Deepti Pandey", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Verified as FIXED using :\r\nOSX: 10.9.2\r\nXcode:5.1.1\r\nacs@1.0.14\r\nalloy@1.3.1\r\nnpm@1.3.2\r\ntitanium@3.2.3-beta2\r\ntitanium-code-processor@1.1.1-beta1\r\nMobileSDK :3.2.3.v20140418101718 \r\nAppcelerator Studio, build: 3.2.3.201404162038\r\nLiveView Version: 1.0.4\r\n\r\nFile contents is available and no content loss has been noticed.Hence closing this ticket.", "updateAuthor": { "name": "dpandey", "key": "dpandey", "displayName": "Deepti Pandey", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-04-22T10:07:58.000+0000", "updated": "2014-04-22T10:07:58.000+0000" } ], "maxResults": 21, "total": 21, "startAt": 0 } } }