Acknowledged

Critical Error for Monkey C Compiler with Mac OS Apple M Series and Java ARM64 JRE

I just set up Monkey C on the new MacBook Pro with the Apple M4 Pro chip (Nov 2024), which requires the ARM64 JRE version of Java.

The Monkey C installation verification was successful, but when I tried to run my app, I received a critical error referring to the Java CodeCache (see below).

When I run Build Current Project for the same device again, the error message is shorter. If I run it for a different device, I get the longer error message again.

It was also strange that I was prompted to select a debugger even though I selected "Run Without Debugging". The same error occurs with "Start Debugging".

The error message says to re-run the Monkey C Compiler with logging enabled, but I do not know how to do that.

This error is preventing me from running any code at all.

How can this be fixed?

Here's my setup:
Model: MacBook Pro 14 inch Nov 2024
Chip: Apple M4 Pro
OS: Sequoia 15.1.1

Here's what I did:

Download and install ConnectIQ SDK Manager
Download and install VS Code
Download and install Java ARM64 JRE (for Mac M series system)
Install Monkey C extension in VS Code
Run: Monkey C: Verify Installation - received message saying installation was verified
Run: Run Without Debugging - prompted to specify debugger (is this supposed to happen?)
Select Monkey C as debugger
Select device (arbitrary, e.g., vivoactive5)
Received error below:

Java HotSpot(TM) 64-Bit Server VM warning: CodeCache is full. Compiler has been disabled.
Java HotSpot(TM) 64-Bit Server VM warning: Try increasing the code cache size using -XX:ReservedCodeCacheSize=
WARNING: vivoactive5: The launcher icon (30x30) isn't compatible with the specified launcher icon size of the device 'vivoactive5' (70x70). Image will be scaled to the target size.
ERROR: vivoactive5: A critical error has occurred. Please re-run the Monkey C Compiler with logging enabled and file a report with the Connect IQ support team.
CodeCache: size=131072Kb used=10901Kb max_used=10901Kb free=120170Kb
bounds [0x000000010a1f8000, 0x000000010acb8000, 0x00000001121f8000]
total_blobs=3357 nmethods=2858 adapters=412
compilation: disabled (not enough contiguous free space left)

* The terminal process terminated with exit code: 100.

Run: Monkey C: Build Current Project
Select vivoactive5 as device (same as before)
Received shorter error below:

WARNING: vivoactive5: The launcher icon (30x30) isn't compatible with the specified launcher icon size of the device 'vivoactive5' (70x70). Image will be scaled to the target size.
ERROR: vivoactive5: A critical error has occurred. Please re-run the Monkey C Compiler with logging enabled and file a report with the Connect IQ support team.

* The terminal process terminated with exit code: 100.

Run: Monkey C: Build Current Project
Select a different device
Received initial error again (except for newly selected device)

Parents
  • Still no luck.

    I uninstalled Java according to their instructions: https://www.java.com/en/download/help/mac_uninstall_java.html.

    Then I installed the Temurin aarch64 JRE: https://adoptium.net/temurin/releases/?os=mac

    Then I uninstalled and re-installed the Monkey C extension in VS Code.

    Now I'm only getting the abbreviated error and not the full error message. So I don't know for certain if it's the same error, but I assume it is.

    I bumped up the cache to 1024m, and it didn't help.

    The error says to "re-run the Monkey C compiler with logging enabled". How do I do that?

    Picked up _JAVA_OPTIONS: -XX:ReservedCodeCacheSize=1024m
    WARNING: d2air: The launcher icon (30x30) isn't compatible with the specified launcher icon size of the device 'd2air' (60x60). Image will be scaled to the target size.
    ERROR: d2air: A critical error has occurred. Please re-run the Monkey C Compiler with logging enabled and file a report with the Connect IQ support team.

Comment
  • Still no luck.

    I uninstalled Java according to their instructions: https://www.java.com/en/download/help/mac_uninstall_java.html.

    Then I installed the Temurin aarch64 JRE: https://adoptium.net/temurin/releases/?os=mac

    Then I uninstalled and re-installed the Monkey C extension in VS Code.

    Now I'm only getting the abbreviated error and not the full error message. So I don't know for certain if it's the same error, but I assume it is.

    I bumped up the cache to 1024m, and it didn't help.

    The error says to "re-run the Monkey C compiler with logging enabled". How do I do that?

    Picked up _JAVA_OPTIONS: -XX:ReservedCodeCacheSize=1024m
    WARNING: d2air: The launcher icon (30x30) isn't compatible with the specified launcher icon size of the device 'd2air' (60x60). Image will be scaled to the target size.
    ERROR: d2air: A critical error has occurred. Please re-run the Monkey C Compiler with logging enabled and file a report with the Connect IQ support team.

Children
No Data