[TIMOB-14098] Code Processor: Catch node stack exceeded exceptions and print a friendly message
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-06-07T17:13:58.000+0000 |
Affected Version/s | Release 3.1.0 |
Fix Version/s | 2013 Sprint 12 JS, 2013 Sprint 12, Release 3.1.1, Release 3.2.0 |
Components | Code Processor |
Labels | code-analyzer, qe-closed-3.1.1, qe-testadded |
Reporter | Bryan Hughes |
Assignee | Bryan Hughes |
Created | 2013-06-04T01:10:29.000+0000 |
Updated | 2013-09-24T11:13:37.000+0000 |
Description
The code processor is prone to exceeding the node.js V8 stack size. In order to facilitate easier debugging, this should be conveyed via an easy to understand error.
PR: https://github.com/appcelerator/titanium-code-processor/pull/210 1_0_X PR: https://github.com/appcelerator/titanium-code-processor/pull/211
Doesn't quite work on node 0.8 ("foo instanceof RangeError" doesn't work?), and there are some other output issues.
PR: https://github.com/appcelerator/titanium-code-processor/pull/212 1_0_X PR: https://github.com/appcelerator/titanium-code-processor/pull/213
To test (easily), run on an Alloy app: node --stack-size=100 /path/to/titanium/bin/titanium analyze -p iphone -A --process-unvisited-code
Verified as fixed. Environment: Titanium SDK 3.1.1.v20130604110432 CLI 3.1.1-cr Alloy 1.1.3-cr Titanium-Code-Processor 1.1.3-cr The message displayed is "node.js maximum call stack size exceeded. Increasing the stack size may allow the project to be fully analyzed". The message is currently visible only when running the Code Analyzer from CLI.
Forgot to add a non-zero return code to exceptions, which means that studio doesn't display the error.
PR: https://github.com/appcelerator/titanium-code-processor/pull/216 1_0_X PR: https://github.com/appcelerator/titanium-code-processor/pull/217