Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15936] Android: Unable to compile APK: RangeError: Maximum call stack size exceeded

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2013-12-11T00:58:45.000+0000
Affected Version/sn/a
Fix Version/s2013 Sprint 25, 2013 Sprint 25 Core, Release 3.2.0, Release 3.3.0
ComponentsAndroid
Labelsmodule_build, qe-testadded, triage
ReporterIngo Muschenetz
AssigneeChris Barber
Created2013-12-10T01:45:04.000+0000
Updated2014-07-29T18:30:24.000+0000

Description

While compiling for Android with a project that has 1000+ plus files in the resource folder, them build will fail with the following error:
[INFO]  Writing unsigned apk: /Volumes/Work/clients/tobias_group_time/TEAMWIRE/gt/build/android/bin/app-unsigned.apk
 
/usr/local/lib/node_modules/titanium/node_modules/longjohn/dist/longjohn.js:184
        throw e;
              ^
RangeError: Maximum call stack size exceeded

Comments

  1. Chris Barber 2013-12-10

    I was able to reproduce the problem using a project that had 1000 Apache licenses, 1000 Asus video card rebate PDFs, 1000 DJ Shadow MP3s, 2000 Appcelerator logo PNG images, and 1 jquery.js file.
  2. Chris Barber 2013-12-10

    I'm also able to reproduce this on iOS.
       path.js:358
           return exports.normalize(paths.filter(function(p, index) {
                                          ^
       RangeError: Maximum call stack size exceeded
       
    Mobile Web is fine. Haven't check Blackberry or Tizen.
  3. Chris Barber 2013-12-10

    Master pull request: https://github.com/appcelerator/titanium_mobile/pull/5110 3.2.x pull request: https://github.com/appcelerator/titanium_mobile/pull/5111
  4. Dan Tamas 2013-12-11

    Seems to work fine with the 3.2.0.v20131210191510 build. Thank you :)
  5. Lokesh Choudhary 2013-12-17

    @Chris - I do not see any test instructions in this ticket. Can you please provide with some test steps or test app with large amount of files in it.
  6. Chris Barber 2013-12-17

    To test: 1) create an Android app 2) add lots of png images and lots of text files spread out across directories in the Resources dir (at least 5 levels deep) 3) build the app @Lokesh, I no longer have the test app. [~ayeung] still has the files, so you can get it from him. It's 700MB zipped.
  7. Lokesh Choudhary 2013-12-18

    Got it from Allen. Thanks guys.
  8. Lokesh Choudhary 2013-12-18

    Ran the test app from Allen. The app builds & launches successfully with out any errors. Closing. Environment: Appcel Studio : 3.2.0.201312162210 Ti SDK : 3.2.0.v20131216191854 Mac OSX : 10.8.5 Alloy : 1.3.0-cr2 CLI - 3.2.0-cr3 Nexus 5 - android 4.4

JSON Source