Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14098] Code Processor: Catch node stack exceeded exceptions and print a friendly message

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-06-07T17:13:58.000+0000
Affected Version/sRelease 3.1.0
Fix Version/s2013 Sprint 12 JS, 2013 Sprint 12, Release 3.1.1, Release 3.2.0
ComponentsCode Processor
Labelscode-analyzer, qe-closed-3.1.1, qe-testadded
ReporterBryan Hughes
AssigneeBryan Hughes
Created2013-06-04T01:10:29.000+0000
Updated2013-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.

Comments

  1. Bryan Hughes 2013-06-04

    PR: https://github.com/appcelerator/titanium-code-processor/pull/210 1_0_X PR: https://github.com/appcelerator/titanium-code-processor/pull/211
  2. Bryan Hughes 2013-06-05

    Doesn't quite work on node 0.8 ("foo instanceof RangeError" doesn't work?), and there are some other output issues.
  3. Bryan Hughes 2013-06-05

    PR: https://github.com/appcelerator/titanium-code-processor/pull/212 1_0_X PR: https://github.com/appcelerator/titanium-code-processor/pull/213
  4. Bryan Hughes 2013-06-05

    To test (easily), run on an Alloy app: node --stack-size=100 /path/to/titanium/bin/titanium analyze -p iphone -A --process-unvisited-code
  5. Federico Casali 2013-06-05

    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.
  6. Bryan Hughes 2013-06-05

    Forgot to add a non-zero return code to exceptions, which means that studio doesn't display the error.
  7. Bryan Hughes 2013-06-05

    PR: https://github.com/appcelerator/titanium-code-processor/pull/216 1_0_X PR: https://github.com/appcelerator/titanium-code-processor/pull/217
  8. Federico Casali 2013-06-07

JSON Source