Uploaded image for project: 'Appcelerator - INBOX'
  1. Appcelerator - INBOX
  2. AC-2683

Parsing Bug in Building for iOS Distribution



      This was a real head scratcher.
      Posted on Q&A as

      This happens ONLY when you build for "Distribute - Apple iTunes Store"
      The same code runs on iPhone emulator, Android emulator, and build for Distribution on Android.

      When you build for Distribution for Apple - you get this error on console:

      [INFO] Performing clean build
      [INFO] Compiling localization files
      [DEBUG] compiled ios file: /Users/jrf/Workspace/iPumpkin/build/iphone/build/Release-iphoneos/iPumpkin.app/en.lproj/Localizable.strings
      [ERROR] Error: Traceback (most recent call last):
      File "/Library/Application Support/Titanium/mobilesdk/osx/2.1.3.v20120927181611/iphone/builder.py", line 1551, in main
      execute_xcode("iphoneos%s" % iphone_version,args,False)
      File "/Library/Application Support/Titanium/mobilesdk/osx/2.1.3.v20120927181611/iphone/builder.py", line 1231, in execute_xcode
      output = run.run(args,False,False,o)
      File "/Library/Application Support/Titanium/mobilesdk/osx/2.1.3.v20120927181611/iphone/run.py", line 41, in run
      SystemExit: 65

      This was in an App with over 20,000 lines of JS so once we had determined that this error was specific to this App, we removed files from the App until we found the one that caused the error. Then we removed suspect statements until we found the one. And you won't believe, but it is true.

      a = b
      / c;

      That's it. a = b on one line, and / c; on the second line.

      The actual statement was more complex, but the gist is that the parser accepts
      a = b
      as a valid statement and the croaks on
      / c;
      as a malformed comment or statement.

      This arose because the formatter had split the statement on to separate lines with the division operator at the beginning of the second line.

      a = ( b
      / c );
      also doesn't work.




            • Assignee:
              mpmiranda Mauro Parra-Miranda
              jfalcone Joe Falcone
            • Watchers:
              3 Start watching this issue


              • Created:

                Git Integration