{ "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)

{html}", "attachment": [ { "id": "25229", "filename": "module_media.zip", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-20T11:55:20.000+0000", "size": 4873819, "mimeType": "application/zip" }, { "id": "25228", "filename": "module_media log.txt", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-20T11:55:20.000+0000", "size": 19193, "mimeType": "text/plain" }, { "id": "27425", "filename": "sample_cloud_log.txt", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-04-26T15:19:15.000+0000", "size": 13383, "mimeType": "text/plain" }, { "id": "27426", "filename": "sample_cloud.zip", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-04-26T15:19:15.000+0000", "size": 3197608, "mimeType": "application/zip" } ], "flagged": false, "summary": "Android: Too deep recursion", "creator": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "126726", "author": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

(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...

{html}", "updateAuthor": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:02:53.000+0000", "updated": "2011-04-15T03:02:53.000+0000" }, { "id": "126727", "author": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

(from [99989c74f5b83ad5fc6c45601d21e6ada78e16e1])\n16K, not 16M (good eye Bill) [#1805]\n\nhttp://github.com/appcelerator/titanium_mobile/commit/99989c74f5b83...

{html}", "updateAuthor": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:02:53.000+0000", "updated": "2011-04-15T03:02:53.000+0000" }, { "id": "126728", "author": { "name": "jicksteen", "key": "jicksteen", "displayName": "Jick Steen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

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.

{html}", "updateAuthor": { "name": "jicksteen", "key": "jicksteen", "displayName": "Jick Steen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:02:53.000+0000", "updated": "2011-04-15T03:02:53.000+0000" }, { "id": "126729", "author": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

(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...

{html}", "updateAuthor": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:02:53.000+0000", "updated": "2011-04-15T03:02:53.000+0000" }, { "id": "126730", "author": { "name": "jicksteen", "key": "jicksteen", "displayName": "Jick Steen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Hi Marshall,

\n

how can someone determine the best/correct/needed\nthreadstacksize?

\n

Best regards

{html}", "updateAuthor": { "name": "jicksteen", "key": "jicksteen", "displayName": "Jick Steen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:02:54.000+0000", "updated": "2011-04-15T03:02:54.000+0000" }, { "id": "126731", "author": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

@Jick

\n

Try 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)

{html}", "updateAuthor": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:02:54.000+0000", "updated": "2011-04-15T03:02:54.000+0000" }, { "id": "126732", "author": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

(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...

{html}", "updateAuthor": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:02:54.000+0000", "updated": "2011-04-15T03:02:54.000+0000" }, { "id": "126733", "author": { "name": "mschmulen", "key": "mschmulen", "displayName": "Matt Schmulen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

regression tested on 1.5.0 (11/22/10 20:42 19a59fd) Android sim\n2.1,

\n

function recurse(count) {

\n
\nreturn ( count > 0 ) ? recurse( count - 1) : count;\n
\n

};//end recurse

\n

recurse(1000000);

{html}", "updateAuthor": { "name": "mschmulen", "key": "mschmulen", "displayName": "Matt Schmulen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:02:55.000+0000", "updated": "2011-04-15T03:02:55.000+0000" }, { "id": "126734", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

resolved as per Matt

{html}", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:02:55.000+0000", "updated": "2011-04-15T03:02:55.000+0000" }, { "id": "180047", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening Issue.\r\nBug Still Valid.\r\n\r\nAttached new fail-case test project: module_media.zip\r\nAttached runtime error log: module_media log.txt\r\n\r\nError caused by: module_media/Resources/acceptance.js > tpl.at.timob_5900 = function (_window) {...}) (lines 248-332)\r\nThere is a syntax/semantic error in this function involving two extra curly braces (lines 248 and 328). Removing them will allow the app to run.\r\nNote: Studio does not recognize the error and there are no recursion errors in iOS/V8 (these platforms appear to behave correctly).\r\n\r\nSDK: 1.9.0.v20120119134634, 1.8.0.1.v20120119133134\r\nAndroid: Rhino\r\nStudio: 1.0.8.201201190907\r\nOS: Lion\r\nDevices Tested: Galaxy Nexus 4.0.2, Droid3 2.3.4\r\n\r\nSteps to Reproduce:\r\n\r\n1. Run project using Rhino.\r\n\r\nExpected Result:\r\n\r\nApp should run.\r\n\r\nActual Result:\r\n\r\nRuntime Error.\r\n", "updateAuthor": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-20T11:54:49.000+0000", "updated": "2012-01-20T15:13:07.000+0000" }, { "id": "192819", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Also getting too deep recursion error when running the cloud sample app.\r\n\r\nBug appears on:\r\nSDK build: 2.0.1.GA2\r\nRuntime: Rhino\r\nTitanium Studio, build: 2.0.2.201204252015\r\nDevice: Droid 3 2.3.4\r\n\r\nSteps to reproduce:\r\n1. Launch cloud_app in rhino", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-04-26T15:16:39.000+0000", "updated": "2012-04-26T15:16:39.000+0000" }, { "id": "264331", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Won't fix because Rhino is no longer supported.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2013-08-01T00:11:57.000+0000", "updated": "2013-08-01T00:11:57.000+0000" }, { "id": "413846", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as Rhino is no longer supported.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-20T17:53:34.000+0000", "updated": "2017-03-20T17:53:34.000+0000" } ], "maxResults": 13, "total": 13, "startAt": 0 } } }