{ "id": "62437", "key": "TIMOB-1805", "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": "11225", "name": "Release 1.5.0", "archived": true, "released": true, "releaseDate": "2010-12-14" } ], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2013-08-01T00:11:57.000+0000", "created": "2011-04-15T03:02:52.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "defect", "recursion", "rhino", "rplist", "stackoverflowerror" ], "versions": [], "issuelinks": [ { "id": "32263", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "89296", "key": "TIDOC-526", "fields": { "summary": "Android: Deprecate ti.android.threadstacksize", "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": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } } ], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-20T17:53:34.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "{html}
Some apps will cause Rhino / Dalvik to reach a\r\nStackOverflowError and show an error message \"Too deep recursion\r\nwhen parsing\". We need to either increase the stack size of the\r\nThread that parses the Javascript, or pre-compile the AST so the\r\nparsing doesn't happen on device (the latter might be good for\r\nspeed anyway)
(from [ef98bfab872f7a5b08398a809da37b5ffe67a550])\nuse a 16K stack for Javascript parsing, this seems to give more\nroom so some apps don't spit out the \"Too deep recursion\" error.\ncopied the android HandlerThread class in so we could expose the\nstack size constructor of Thread [#1805]\n\nhttp://github.com/appcelerator/titanium_mobile/commit/ef98bfab872f7...
(from [99989c74f5b83ad5fc6c45601d21e6ada78e16e1])\n16K, not 16M (good eye Bill) [#1805]\n\nhttp://github.com/appcelerator/titanium_mobile/commit/99989c74f5b83...
FYI: I ran into this issue after I minified my JS using \"google\nclosure\". I also merged all \"library\" files into one file before\nbuilding a release version to reduce stat calls. The result was a\nfile larger than 40k. Dont know whether the file size has something\nto do with the stack size.
(from [54629899a5631d2d2e1ef9ca4025c5831f640d1a])\ninitial implementation of Rhino JS->bytecode compiler for\nproduction apps, dramatically decreasing startup time and runtime\ncode execution in general. this falls back on dynamic/unoptimized\nevaluation when a compiled script isn't found, and each file is\ncompiled separately to avoid the arg size limit in windows. added a\n\"ti.android.threadstacksize\" property that allows each app to\ncontrol the stack size allocated for each JS thread (by default\nit's 16K, but this may not be big enough for some apps) [#1109]\n[#1805] \nhttp://github.com/appcelerator/titanium_mobile/commit/54629899a5631...
Hi Marshall,
\nhow can someone determine the best/correct/needed\nthreadstacksize?
\nBest regards
@Jick
\nTry the new default stack size, and if you're still seeing the\n\"Too deep recursion\" error, you might need to try specifying\nsomething larger (I'd recommend increasing by factors of 2)
(from [d8ba51d99dd0a067968102ad63b628aad4d8fc71])\nfixed a source code generation bug when a tiapp.xml property had an\nempty / bad value, turned on deploy type and a new\nti.android.compilejs property to control when/if JS gets compiled\nfor an application [#1805] \nhttp://github.com/appcelerator/titanium_mobile/commit/d8ba51d99dd0a...
regression tested on 1.5.0 (11/22/10 20:42 19a59fd) Android sim\n2.1,
\nfunction recurse(count) {
\nreturn ( count > 0 ) ? recurse( count - 1) : count;
\n
\n};//end recurse
\nrecurse(1000000);
resolved as per Matt