Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13348] iOS: Build for device: Build fails with CompileC ApplicationRouting

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-11-01T22:26:13.000+0000
Affected Version/sRelease 3.1.0
Fix Version/s2013 Sprint 22, 2013 Sprint 22 Core, Release 3.2.0
ComponentsiOS
Labelsn/a
ReporterSebastian Bejga
AssigneeChris Barber
Created2013-01-22T22:16:42.000+0000
Updated2013-11-12T10:49:05.000+0000

Description

Steps to reproduce

1. Drop into app.js snippet below 2. Select Studio option "Install to iOS Device" 3. Monitor console output e.g. https://gist.github.com/egomez99/bb0f950cdcbae6653401

Titanium Studio, build: 3.0.2.201302191606

(c) Copyright 2012-2013 by Appcelerator, Inc. All rights reserved. Build: jenkins-titanium-rcp-master-372 (origin/master) Date: 19 February 2013, 16:09:49

snippet

(function () {
    var abc = "abc123";

    var f1 = function () {
        // _wef4f43ffg6rb344n678678 is a known undefined global.
        // non-local reference, this always throws
        try {
            abc = _wef4f43ffg6rb344n678678;         
        }
        catch (err) {
            Ti.API.info("Threw non-local var: " + err);
        }
    };

    var f2 = function () {
        // this throws everywhere, except DOES NOT throw only on device, 3.1 CI.
        try {
            var b = _wef4f43ffg6rb344n678678;
            Ti.API.info("Hey it worked");
        }
        catch (err) {
            Ti.API.info("Threw local var: " + err);
        }
    };

    f1();
    f2();
}());
Build fails with: [ERROR] :  ** BUILD FAILED ** [ERROR] :  The following build commands failed: [ERROR] :   CompileC build/docqr.build/Debug-iphoneos/docqr-universal.build/Objects-normal/armv7/ApplicationRouting.o Classes/ApplicationRouting.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler [ERROR] :  (1 failure) seems similiar to TIMOB-11891 but I can reproduce! I am frustrated building my current project. Because yesterday it has build for device. App run on my iPhone. Today I continued coding, changed some files and created a new one. Then I does not build for device anymore. Simulator works. After rolling back in git step by step I found out the problem occured with the new file. But I does not use the file. After 2 hours, deleting the file, clean project and adding again another new file I found out, that Build will fail immediately if I add an additionally file to folders 'common', 'handheld' or 'tablet' in 'Resources/ui'. Really I tested it several times! Removing new file. Clean. Build and Deploy on iOS Device (iPhone). Succeed! Adding a file with arbitary name to Resources/ui/common. Write a dummy function as module.exports (return an empty red view). Clean. Build and Deploy on iOS Device (iPhone). Fails! But still not using the module, no call of it.

Attachments

FileDateSize
build.log.txt2013-01-22T22:16:42.000+000053597

Comments

  1. mike ory 2013-02-10

    I have the same issue: [ERROR] :  ** BUILD FAILED ** [ERROR] :  The following build commands failed: [ERROR] :   CompileC build/emojibet.build/Debug-iphoneos/emojibet.build/Objects-normal/armv7/ApplicationRouting.o Classes/ApplicationRouting.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler [ERROR] :  (1 failure) Confirmed that removing the file from Resources/ui/common lets me build. But obviously I NEED this file at that path. Is there a solution / workaround?? This is a nightmare! anyone? Titanium Command-Line Interface, CLI version 3.0.23, Titanium SDK version 3.0.0.GA OSX 10.8.2 Xcode 4.5.2(4G20008a) Titanium Studio, build: 3.0.2.201302041757
  2. mike ory 2013-02-10

    I have another computer which has: Titanium Studio . build 3.0.1.201212181159 OSX 10.8.2 Xcode 4.5.2 (4G2008a) i am able to import the project on this computer and build for device.
  3. mike ory 2013-02-10

    reverted the original machine (above) to: Titanium Studio, build: 3.0.1.201212181159 This did NOT solve the problem.
  4. Eduardo Gomez 2013-04-03

    - Have you tested it vs latest TiSDK yet? - Can you attach your Ti project in order to replicate quicker?
  5. Matt Mullens 2013-04-14

  6. Matt Mullens 2013-04-14

    Another piece of information: if I run it in debug mode, it works, it'll be staged in iTunes for a sync, post-sync all is good (except that it is in debug mode) on the iPhone. However, if I just use run, not debug, then the issue with ApplicationRouting comes up. Also, I think ApplicationRouting is being written out of _build.js it looks like, and I know the file is loaded as top-level console.log's show up in the Titanium console output, but the code specifically that generates the ApplicationRouting.m doesn't seem to ever be reached - but that might be my misunderstanding - I did try using the logger utility as well as straight console.log, can't see that the code is reached though it must be as the file gets generated - perhaps console.log & the logger utility log to some other stream somehow at that point, haven't investigated that yet.
  7. Eduardo Gomez 2013-04-18

    Additional details and test case were added. Currently reproducible on 3.1.0.GA.
  8. Lance Spellman 2013-08-07

  9. Chris Barber 2013-11-01

    Pull request: https://github.com/appcelerator/titanium_mobile/pull/4898
  10. Pragya Rastogi 2013-11-12

    Tested and Verified fix with: OSX: 10.8.5 Xcode:5.0 Appcelerator Studio: 3.2.0.201311120707 SDK: 3.2.0.v20131111174605 acs:1.0.7 alloy:1.3.0 npm:1.3.2 titanium:3.2.0 titanium-code-processo:1.0.3 Device: iOS7(v7.0.3)-iPodTouch1

JSON Source