Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14518] DEMANDWARE TRIAL - Code Analyzer failed on Endless Aisle app - "node.js maximum call stack size exceeded. Increasing the stack size may allow the project to be fully analyzed"

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionDuplicate
Resolution Date2013-07-11T01:05:29.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsCode Processor
Labelsn/a
ReporterLeor Brenman
AssigneeBryan Hughes
Created2013-07-10T22:09:15.000+0000
Updated2014-06-19T12:44:05.000+0000

Description

DEMANDWARE - Code Analyzer failed on Endless Aisle app - "node.js maximum call stack size exceeded. Increasing the stack size may allow the project to be fully analyzed" They just installed Appc Studio today (7/10/13) as part of a Trial of Platform and Code Analyzer is working fine for a hello world app but not for their imported production iPad app. We searched Google but could not see how to increase the stack size. I am waiting for diagnostics and log form the client and will attach when received.

Attachments

FileDateSize
diag_and_log_20130711.rtf2013-07-11T13:23:48.000+000018330

Comments

  1. Bryan Hughes 2013-07-11

    Duplicate of TISTUD-4848
  2. Bryan Hughes 2013-07-11

    FWIW there currently is no way to increase the stack size if you are calling it from Studio. I believe that there are plans to add the ability to increase the stack size from studio sometime in the future (hence why this is a duplicate of a Studio bug).
  3. Leor Brenman 2013-07-11

    In TISTUD-4848 Nam suggests the following workaround: To work-around this issue: Find the Code Analyzer preferences under Studio > Code Analyzer Uncheck the option 'Process Unvisited Code' Save the changes Demandware tried this and it did not work :(
  4. Leor Brenman 2013-07-11

    Studio Diag and Log after attempting the workaround
  5. Bryan Hughes 2013-07-11

    You'll have to increase the stack size for node from the command line then, which requires running the code analyzer from the command line. Assuming they are running on OS X or Linux, the command should look something like: "node --stack-size=10000 /usr/local/bin/titanium analyze -p -A -R " This command says to increase the stack size to 10000 (it typically defaults to 1000). Finding the correct size is a bit of an art. Too low and you get this exception, but too high and node.js itself will segfault. Note that a correct value may not exist for this app, meaning that it is possible that this app cannot be analyzed using the code analyzer. The results that are normally displayed inside of studio are just HTML files and will be put in the directory specified. Open the index.html file inside that directory to see the results.
  6. Michael Xia 2013-07-11

    Hi Leor, Could you have the customer try enabling one option at a time in the Code Analyzer preference page to see if code analyzer could complete?
  7. Leor Brenman 2013-07-12

    Nam, Michael and Bryan - thanks so much for the detailed instructions. With your help, the customer is now able to run Code Analyzer from the command line and they have their results. From Studio, they had success if they turned off all options, but the results are less than useful. When they turned on just Invoke Methods, they got an error: "Code Analaysis process exited with error code: 1". I think we can say that for Demandware the issue is closed. Thanks again!

JSON Source