"Aborting launch due to failed build. " Message

Hi,

When I try and launch the simulator, I get the message "Aborting launch due to failed build." The project successfully builds (I get the "BUILD: Complete" message), but running generates this error.

The bizarre thing, is that I have 6 projects are they all give the same message. Even more bizarre, is all 6 projects on other PC's work perfectly.

I've tried running the build in the command-line and no warnings or errors also appear.

I am really keen to get my main PC running and testing, anybody any ideas?

Cheers
Chris
  • I've been running into this occasionally but have always been able to get it working again just by changing some text or location of constants in my code. I am currently having the issue with a project I don't seem to be able to get around. I've rebooted. Updated Java. Nothing seems to work. It seems to be looking for Java in the correct location, so not SJWGATOR's issue.

    Has any progress been made on this in the last almost year?



    2.1.2 sdk
    Windows 10
    jre1.8.0_101
  • Same problme

    I'm having the exact same problem. Each time for me, it has started when i re-named a file or deleted a file. The only fix I've found is to make a new project and copy the files back into the new project.

    Has anyone figured this out yet?
  • I have been hitting this recently with the latest CIQ version.

    It first happened when I added a comment block to the start of my code. By backtracking I was able to work out what caused the problem. Strangely, when I added the same comment block a little lower in the code after my globals and constants the problem went away. But then came back when I added another constant. It went away when I simply removed a blank line near the top of the file.

    In my project I can re-produce at will right now by simply adding a few blank lines near the top of the file. It works again when I remove them. Here is the console output demonstrating this:

    [FONT=Courier New]======================================================
    BUILD: C:\Program Files\Java\jre1.8.0_121\bin\java -Dfile.encoding=UTF-8 -Dapple.awt.UIElement=true -jar D:\connectiq\connectiq-sdk-win-2.2.3\bin\monkeybrains.jar -o D:\Users\jbigg\Workspaces\connectiq\SunTimes\bin\SunTimes.prg -w -y D:\connectiq\security\developer_key.der -z D:\Users\jbigg\Workspaces\connectiq\SunTimes\resources\resources.xml -m D:\Users\jbigg\Workspaces\connectiq\SunTimes\manifest.xml D:\Users\jbigg\Workspaces\connectiq\SunTimes\source\SunTimesApp.mc D:\Users\jbigg\Workspaces\connectiq\SunTimes\source\SunCalc.mc -d fenix3_sim -s 1.4.0
    BUILD: WARNING: No supported languages are defined. It's a good idea to indicate which languages you are supporting.
    BUILD: Complete
    Attempt 1 to connect to simulator...
    Attempt 1 to connect to simulator...
    Attempt 1 to connect to simulator...
    Attempt 1 to connect to simulator...
    Attempt 2 to connect to simulator...
    ======================================================
    BUILD: C:\Program Files\Java\jre1.8.0_121\bin\java -Dfile.encoding=UTF-8 -Dapple.awt.UIElement=true -jar D:\connectiq\connectiq-sdk-win-2.2.3\bin\monkeybrains.jar -o D:\Users\jbigg\Workspaces\connectiq\SunTimes\bin\SunTimes.prg -w -y D:\connectiq\security\developer_key.der -z D:\Users\jbigg\Workspaces\connectiq\SunTimes\resources\resources.xml -m D:\Users\jbigg\Workspaces\connectiq\SunTimes\manifest.xml D:\Users\jbigg\Workspaces\connectiq\SunTimes\source\SunTimesApp.mc D:\Users\jbigg\Workspaces\connectiq\SunTimes\source\SunCalc.mc
    BUILD: Complete
    ======================================================
    BUILD: C:\Program Files\Java\jre1.8.0_121\bin\java -Dfile.encoding=UTF-8 -Dapple.awt.UIElement=true -jar D:\connectiq\connectiq-sdk-win-2.2.3\bin\monkeybrains.jar -o D:\Users\jbigg\Workspaces\connectiq\SunTimes\bin\SunTimes.prg -w -y D:\connectiq\security\developer_key.der -z D:\Users\jbigg\Workspaces\connectiq\SunTimes\resources\resources.xml -m D:\Users\jbigg\Workspaces\connectiq\SunTimes\manifest.xml D:\Users\jbigg\Workspaces\connectiq\SunTimes\source\SunTimesApp.mc D:\Users\jbigg\Workspaces\connectiq\SunTimes\source\SunCalc.mc -d fenix3_sim -s 1.4.0
    BUILD: Complete
    Aborting launch due to failed build.
    ======================================================
    BUILD: C:\Program Files\Java\jre1.8.0_121\bin\java -Dfile.encoding=UTF-8 -Dapple.awt.UIElement=true -jar D:\connectiq\connectiq-sdk-win-2.2.3\bin\monkeybrains.jar -o D:\Users\jbigg\Workspaces\connectiq\SunTimes\bin\SunTimes.prg -w -y D:\connectiq\security\developer_key.der -z D:\Users\jbigg\Workspaces\connectiq\SunTimes\resources\resources.xml -m D:\Users\jbigg\Workspaces\connectiq\SunTimes\manifest.xml D:\Users\jbigg\Workspaces\connectiq\SunTimes\source\SunTimesApp.mc D:\Users\jbigg\Workspaces\connectiq\SunTimes\source\SunCalc.mc
    BUILD: WARNING: No supported languages are defined. It's a good idea to indicate which languages you are supporting.
    BUILD: Complete[/FONT]

    I hope I do not get to a point when I cannot avoid it by removing comments and blank lines!
  • Compiling this from the command line generates errors which are not displayed by eclipse. e.g.

    ERROR: ERROR:stdin:8632: Redefinition of label (code) D_Users_jbigg_Workspaces_connectiq_SunTimes_source_SunTimesApp_mc_45_0
    ERROR: ERROR:stdin:8647: Redefinition of label (code) D_Users_jbigg_Workspaces_connectiq_SunTimes_source_SunTimesApp_mc_48_0
    ERROR: ERROR:stdin:8652: Redefinition of label (code) D_Users_jbigg_Workspaces_connectiq_SunTimes_source_SunTimesApp_mc_49_0

    I replied to your pm Coleman, sorry, I did not notice this until today.
  • I have created a very simple test case demonstrating the problem. I can send this in so you can get to the bottom of this if you let me know where to send it. You will need 4 files. Two source modules and two xml files. Compiling this I get:

    [FONT=Courier New]C:\Users\jbigg>java -Dfile.encoding=UTF-8 -Dapple.awt.UIElement=true -jar D:\connectiq\connectiq-sdk-win-2.2.4\bin\monkeybrains.jar -o D:\Users\jbigg\Workspaces\connectiq\Test\bin\Test.prg -w -y D:\connectiq\security\developer_key.der -z D:\Users\jbigg\Workspaces\connectiq\Test\resources\resources.xml -m D:\Users\jbigg\Workspaces\connectiq\Test\manifest.xml D:\Users\jbigg\Workspaces\connectiq\Test\source\test1.mc D:\Users\jbigg\Workspaces\connectiq\Test\source\test2.mc
    ERROR: ERROR:stdin:314: Redefinition of label (code) D_Users_jbigg_Workspaces_connectiq_Test_source_test1_mc_44_0[/FONT]

    The problem seems somehow dependent on the variable declarations and white space in the source files. There is no code to speak off, just an empty App.AppBase and UI.View class. I'd love to know what is causing the problem.
  • [FONT=Courier New]ERROR: ERROR:stdin:314: Redefinition of label (code) D_Users_jbigg_Workspaces_connectiq_Test_source_test1_mc_44_0[/FONT]


    Your problem is not the same as the ones reported above previously.

    Have a look at this bug report. The short version... You have global variables that are dynamically initialized on line 44 of more than one file. The workaround is pretty simple; you can either move all of your globals to a single file or you can throw them into a module.

    Travis
  • Thank you Travis, this is my problem. I had distilled it down to a simple test case but had not determined this was due to a clash of initialising globals. Only that it was dependent on global variables and positioning. I had informed Coleman I would log a bug this morning, but you have saved me the work. Had I known about the --debug option I might have been able to go further.

    My case is slightly different as I have global variables in my main program file, but I have another library module which contains constants. It seems that constants are handled in the same way as variables so the same problem exists.

    It is also interesting to note that the problem only occurs if the variables are initialised using code. In one file, on line 44 I had:

    var p = false;

    and in another I had:

    const x = 1000/3;

    But if I change "1000/3" to "333" or "false" to "0", the problem does not occur. It's only when both variables on the same line require program code to initialise that the labels are created which have duplicate names. The --debug option makes this vary obvious.

    Thanks for your help, now I fully understand the problem is it very easy to avoid.
  • We've got this tracked in the bug reports forum. Closing this thread for now.

    Thanks,
    -Coleman