{ "id": "173913", "key": "AC-6315", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "10000", "description": "", "name": "Done" }, "resolutiondate": "2019-11-03T21:18:44.000+0000", "created": "2019-07-20T21:43:55.000+0000", "labels": [ "titanium" ], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2019-11-03T21:18:44.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "I am running the following command to compile an app for Android:\r\n\r\n{code}\r\nti build -p android -T device\r\n{code}\r\n\r\nThe build process runs a bunch of commands. On the bit it builds the java files, on v7.5.1.GA and older, it run a command like so:\r\n\r\n{code}\r\njavac -J-Xmx1024M -encoding utf8 -bootclasspath ...\r\n{code}\r\n\r\nBut on v7.5.1.GA and greater (tested on v7.5.2 and v8.0.0), the build command used more memory like so, ignoring the default values of 1GB as mentioned on the docs:\r\n\r\n{code}\r\njavac -J-Xmx3072M -encoding utf8 -bootclasspath ...\r\n{code}\r\n\r\nThis meant when building my app, I get the following unuseful error message (regardless of log-level):\r\n\r\n{code}\r\n[ERROR] Failed to compile Java source files:\r\n[ERROR]\r\n[ERROR]\r\n{code}\r\n\r\n(Side note: It would be good to get more information than just this).\r\n\r\nWhen I tried the javac command manually, I found the error:\r\n\r\n{code}\r\nError occurred during initialization of VM\r\nCould not reserve enough space for object heap\r\nError: Could not create the Java Virtual Machine.\r\nError: A fatal exception has occurred. Program will exit.\r\n{code}\r\n\r\nI tried adjusting the the amount of memory used like so:\r\n\r\n{code}\r\nti config android.javac.maxmemory 1024M\r\n{code}\r\n\r\nbut it's just ignored it, and still uses 3GB instead.\r\n\r\nI solved this issue by adding the following properties to tiapp.xml\r\n\r\n{code}\r\n1G\r\n1G\r\n{code}\r\n\r\nand the javac command changed correctly.\r\n\r\nSo the issues are:\r\n\r\n 1. Titanium v7.5.2 and greater does not use the correct memory for javac and dexter\r\n 2. When adjusting the config, the memory used in the build does not change\r\n 3. Un-useful error message in console output when build fails (this could be a separate issue)\r\n", "attachment": [], "flagged": false, "summary": "Titanium using wrong javac & dx max memory", "creator": { "name": "yahya12", "key": "yahya12", "displayName": "Yahya Uddin", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "yahya12", "key": "yahya12", "displayName": "Yahya Uddin", "active": true, "timeZone": "Europe/London" }, "environment": "Windows 10, Titanium >=v7.5.2.GA , Titanium CLI v5.2.1", "comment": { "comments": [ { "id": "449970", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Hello,\r\nThanks for sharing with us. Can you please create a new app, run this on 8.0.2.GA and let us know how it goes.", "updateAuthor": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-07-22T09:20:40.000+0000", "updated": "2019-07-22T09:20:40.000+0000" }, { "id": "449983", "author": { "name": "yahya12", "key": "yahya12", "displayName": "Yahya Uddin", "active": true, "timeZone": "Europe/London" }, "body": "Yes this occurred on v8.0.2.GA on an hello world app.", "updateAuthor": { "name": "yahya12", "key": "yahya12", "displayName": "Yahya Uddin", "active": true, "timeZone": "Europe/London" }, "created": "2019-07-22T10:54:33.000+0000", "updated": "2019-07-22T10:54:33.000+0000" }, { "id": "449987", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "This was a known change made in TIMOB-26898, however the docs should have been updated to reflect that.\r\n\r\nAs for the ti config setting not working, it looks like the tiapp and config have different names, with the tiapp being {{android.javac.maxmemory}} and the config being {{android.javac.maxMemory}}, I believe that's why it failed to work as a config setting for you.", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2019-07-22T13:00:24.000+0000", "updated": "2019-07-22T13:00:24.000+0000" }, { "id": "450338", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Hello [~yahya12],\r\n\r\nHope you are doing fine today.Would you please reply us regarding previous reviews? We are looking forward to your response.\r\n\r\n", "updateAuthor": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-08-08T09:03:24.000+0000", "updated": "2019-08-08T09:03:24.000+0000" }, { "id": "450785", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello [~eharris], can you please share the docs link where we should update the relevant information. I believe [~bimmel], can get on making the change. Thanks. ", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2019-08-23T16:52:28.000+0000", "updated": "2019-08-23T16:52:28.000+0000" }, { "id": "450790", "author": { "name": "bimmel", "key": "bimmel2", "displayName": "Brian Immel", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Is this the document you're looking for?\r\n\r\nhttps://wiki.appcelerator.org/display/guides2/Titanium+CLI+Options#TitaniumCLIOptions-android.javac.maxmemory", "updateAuthor": { "name": "bimmel", "key": "bimmel2", "displayName": "Brian Immel", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-08-23T20:26:37.000+0000", "updated": "2019-08-23T20:26:37.000+0000" }, { "id": "450811", "author": { "name": "yahya12", "key": "yahya12", "displayName": "Yahya Uddin", "active": true, "timeZone": "Europe/London" }, "body": "@Rakhi Mitro Sorry for the very late reply. What did you want me to reply to exactly?", "updateAuthor": { "name": "yahya12", "key": "yahya12", "displayName": "Yahya Uddin", "active": true, "timeZone": "Europe/London" }, "created": "2019-08-25T20:13:50.000+0000", "updated": "2019-08-25T20:13:50.000+0000" }, { "id": "450816", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~yahya12],\r\nDid you manage to check Ewan's comment? Is it helpful for you?", "updateAuthor": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-08-26T06:49:45.000+0000", "updated": "2019-08-27T03:46:22.000+0000" }, { "id": "450818", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "[~sdarda], the docs are already up to date for the change that was made. Looking at the wiki page it was made prior to this ticket being filed also so the change should have been live.\r\n?\r\n[~yahya12], I believe Rahki is referring to my previous comment. Have you managed to fix this error?", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2019-08-26T11:42:58.000+0000", "updated": "2019-08-26T11:42:58.000+0000" }, { "id": "450877", "author": { "name": "yahya12", "key": "yahya12", "displayName": "Yahya Uddin", "active": true, "timeZone": "Europe/London" }, "body": "@Ewan Harris @Sharif AbuDarda Yes sorry. I actually mentioned this inconsistency on the GitHub issue: https://github.com/appcelerator/titanium_mobile/issues/11068 . Sorry for the confusion.\r\n\r\n", "updateAuthor": { "name": "yahya12", "key": "yahya12", "displayName": "Yahya Uddin", "active": true, "timeZone": "Europe/London" }, "created": "2019-08-27T21:19:50.000+0000", "updated": "2019-08-27T21:19:50.000+0000" }, { "id": "452441", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Looking into the https://wiki.appcelerator.org/display/guides2/Titanium+CLI+Options#TitaniumCLIOptions-android.javac.maxmemory the docs has been updated. Closing this. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2019-11-03T21:18:19.000+0000", "updated": "2019-11-03T21:18:19.000+0000" } ], "maxResults": 12, "total": 12, "startAt": 0 } } }