A Little Help on Visual Studio Code Monkey C

Hi All,

I have a big curiosity about making my own watch face. I installed all necessary programs such as Visual Studio Code, SDKs, Java. I tried to run sample code, but terminal keeps giving this error:

The terminal process "C:\Program Files (x86)\Common Files\Oracle\Java\javapath\java.exe '-Xms1g', '-Dfile.encoding=UTF-8', '-Dapple.awt.UIElement=true', '-jar', 'c:\Users\***\AppData\Roaming\Garmin\ConnectIQ\Sdks\connectiq-sdk-win-4.0.9-2022-01-24-2154651d3\bin\monkeybrains.jar', '-o', 'bin\crystal-face-master.prg', '-f', 'c:\Garmin_Develope\crystal-face-master\monkey.jungle', '-y', 'e:\Downloads\Garmin_EKYA\developer_key', '-w', '-d', 'venu2_sim'" terminated with exit code: 100.

I don't know if this is really error, but when I run the code (run without debugging), it is not giving any output. 

Is there any big heart people on here, who can connect my PC with teamviewer and help me about this?

It will be really enlighten my way to being a developer :)

By the way, I'm a M.Sc. Engineer, I'm not far from programming, I'm working as an Automation Engineer right now. I'm just new on this platform. 

Any help will be much appreciated Slight smile

  • Can you share me with your code? My environment is completely configured.

  • Hi, of course. It was a ready-to-use code from github. Here is the link;

    https://github.com/warmsound/crystal-face

    I also tried another almost empty project, but took the same error. I think I have missed something during installation. Maybe java version is too high, I don't know.

  • The "exit code: 100" thing is, as you have discovered, not very helpful because it essentially just says "could not compile for some reason"...

    But...

    If you scroll up in the terminal, you will see all of the good information about what went wrong.

    Typically, I find I have a typo in my code that breaks the compiler when this happens, but there are other reasons and you should at the very least get a clue as to what from the lines immediately preceding the line you actually shared!

  • Okay, here you can find all terminal message after run;

    Executing task: C:\Program Files (x86)\Common Files\Oracle\Java\javapath\java.exe -Xms1g -Dfile.encoding=UTF-8 -Dapple.awt.UIElement=true -jar c:\Users\***\AppData\Roaming\Garmin\ConnectIQ\Sdks\connectiq-sdk-win-4.0.9-2022-01-24-2154651d3\bin\monkeybrains.jar -o bin\crystal-face-master.prg -f c:\Garmin_Develope\crystal-face-master\monkey.jungle -y e:\Downloads\Garmin_EKYA\developer_key -w -d venu2_sim <

    ERROR: null
    java.lang.NullPointerException
    at com.garmin.connectiq.common.devices.DevicesJsonReader.parseResolution(DevicesJsonReader.java:584)
    at com.garmin.connectiq.common.devices.DevicesJsonReader.loadDeviceFromElement(DevicesJsonReader.java:398)
    at com.garmin.connectiq.common.devices.DevicesJsonReader.read(DevicesJsonReader.java:321)
    at com.garmin.connectiq.common.devices.DevicesJsonReader.read(DevicesJsonReader.java:304)
    at com.garmin.connectiq.common.devices.DevicesJsonReader.read(DevicesJsonReader.java:302)
    at com.garmin.monkeybrains.devices.DeviceManager.readStreamIntoDevicesJsonReader(DeviceManager.java:48)
    at com.garmin.monkeybrains.devices.DeviceManager.<init>(DeviceManager.java:71)
    at com.garmin.monkeybrains.Monkeybrains.loadDeviceManager(Monkeybrains.java:438)
    at com.garmin.monkeybrains.Monkeybrains.run(Monkeybrains.java:2490)
    at com.garmin.monkeybrains.Monkeybrains.simpleMain(Monkeybrains.java:339)
    at com.garmin.monkeybrains.Monkeybrains.main(Monkeybrains.java:368)
    usage: monkeyc [-a <arg>] [-b <arg>] [-c <arg>] [-d <arg>] [-e]
    [--Eno-invalid-symbol] [-f <arg>] [-g] [-h] [-i <arg>] [-l <arg>] [-m
    <arg>] [-o <arg>] [-p <arg>] [-r] [-s <arg>] [-t] [-u <arg>] [-v] [-w]
    [-x <arg>] [-y <arg>] [-z <arg>]
    -a,--apidb <arg> API import file
    -b,--apimir <arg> API MIR file
    -c,--api-level <arg> API Level to target
    -d,--device <arg> Target device
    -e,--package-app Create an application package.
    --Eno-invalid-symbolDo not error when a symbol is found to be invalid
    -f,--jungles <arg> Jungle files
    -g,--debug Print debug output
    -h,--help Prints help information
    -i,--import-dbg <arg> Import api.debug.xml
    -l,--typecheck <arg> Type check [0=off, 1=gradual, 2=informative, 3=strict]
    -m,--manifest <arg> Manifest file (deprecated)
    -o,--output <arg> Output file to create
    -p,--project-info <arg>projectInfo.xml file to use when compiling
    -r,--release Strip debug information
    -s,--sdk-version <arg> SDK version to target (deprecated, use -c
    -t,--unit-test Enables compilation of unit tests
    -u,--devices <arg> devices.xml file to use when compiling (deprecated)
    -v,--version Prints the compiler version
    -w,--warn Show compiler warnings
    -x,--excludes <arg> Add annotations to the exclude list (deprecated)
    -y,--private-key <arg> Private key to sign builds with
    -z,--rez <arg> Resource files (deprecated)
    The terminal process "C:\Program Files (x86)\Common Files\Oracle\Java\javapath\java.exe '-Xms1g', '-Dfile.encoding=UTF-8', '-Dapple.awt.UIElement=true', '-jar', 'c:\Users\***\AppData\Roaming\Garmin\ConnectIQ\Sdks\connectiq-sdk-win-4.0.9-2022-01-24-2154651d3\bin\monkeybrains.jar', '-o', 'bin\crystal-face-master.prg', '-f', 'c:\Garmin_Develope\crystal-face-master\monkey.jungle', '-y', 'e:\Downloads\Garmin_EKYA\developer_key', '-w', '-d', 'venu2_sim'" terminated with exit code: 100.

    Terminal will be reused by tasks, press any key to close it.

    I didn't see any meaningful explanation.

  • I'm not entirely sure, but it seems that for the venu2 the compiler.json isn't available. So have a look to

    c:\Users\***\AppData\Roaming\Garmin\ConnectIQ\Devices\venu2\compiler.json

    If this file isn't available, you've to download the device venu2 spec using the CIQ SDK Manger.

  • Hello, thank  you for the reply.

    I checked that location and compiler.json is present on there.

  • ERROR: null
    java.lang.NullPointerException
    at com.garmin.connectiq.common.devices.DevicesJsonReader.parseResolution(DevicesJsonReader.java:584)
    at

    Obviously the compiler crashes by parsing the compiler.json for the resolution of the venu2, i.e. the resolution can't be found. So open the compiler.json using a text editor and look if the label resolution is available like this

    ...
        ],
        "resolution": {
            "height": 416,
            "width": 416
        },
    ...

  • Hi Subra,

    Yes resolution information is present in the compiler.json of venu2 exactly like you wrote. 

  • During the installation of SDK files of Garmin,  I took this error message, but installation successfully completed on that time. Today I removed SDKs and install them again. But I received same error today. Maybe compiler problem is related with this?

  • After you get an update to devices with the SDK Manager, you may want to restart VS Code.

    And if the sim is open, close that too.