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
  • Sorry, I should’ve made it clear that compiler options should be set in the Monkey C extension settings, in VS Code. There’s no need to run any compiler commands manually.

    - Open command palette (CMD-SHIFT-P)

    - In the command palette, search for “User Settings” and select it

    - In the user settings, search for “Monkey C”. This will open the Monkey C extension settings

    - In the Monkey C extension settings, modify the compiler options setting as necessary. It should be set to nothing (i.e. a blank string) by default.

    Don’t forget to change the compiler options setting back to a blank string when you’re done.

Comment
  • Sorry, I should’ve made it clear that compiler options should be set in the Monkey C extension settings, in VS Code. There’s no need to run any compiler commands manually.

    - Open command palette (CMD-SHIFT-P)

    - In the command palette, search for “User Settings” and select it

    - In the user settings, search for “Monkey C”. This will open the Monkey C extension settings

    - In the Monkey C extension settings, modify the compiler options setting as necessary. It should be set to nothing (i.e. a blank string) by default.

    Don’t forget to change the compiler options setting back to a blank string when you’re done.

Children
  • Thanks! I added -g and --debug-log-level 3, but now there is no error printing at all despite the terminal still exiting. I was thinking of uninstalling Temurin and installing the Java ARM64 back again, but I do not see uninstallation instructions on the Temurin website.