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
  • Thank you! But it still does not work. Below is the error message I get after increasing to 256 MB. It says it's full, but there is a lot of free cache left. (The numbers are different probably because I built the project for a different device so the full error message would show up. Otherwise it shows an abbreviated error message with less details.)

    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: venu2: The launcher icon (30x30) isn't compatible with the specified launcher icon size of the device 'venu2' (70x70). Image will be scaled to the target size.
    ERROR: venu2: 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=262144Kb used=13592Kb max_used=13592Kb free=248551Kb
                                                                         bounds [0x000000010a9f8000, 0x000000010b758000, 0x000000011a9f8000]
                                                                                                                                             total_blobs=3768 nmethods=3242 adapters=440
                                                                                                                                                                                         compilation: disabled (not enough contiguous free space left)
    
     *  The terminal process terminated with exit code: 100.

    I installed jre-8u431-macosx-aarch64.dmg from the link on the main java downloads page: https://www.java.com/en/download/

    I actually tried installing the Intel version first, and after the Monkey C verification failed, I uninstalled it and installed the ARM64 java version above. The java installation prompts appeared to work, so I assume it is installed correctly. (And I proceeded to uninstall the Monkey C extension and re-install it.)

    Any other ideas?

Comment
  • Thank you! But it still does not work. Below is the error message I get after increasing to 256 MB. It says it's full, but there is a lot of free cache left. (The numbers are different probably because I built the project for a different device so the full error message would show up. Otherwise it shows an abbreviated error message with less details.)

    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: venu2: The launcher icon (30x30) isn't compatible with the specified launcher icon size of the device 'venu2' (70x70). Image will be scaled to the target size.
    ERROR: venu2: 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=262144Kb used=13592Kb max_used=13592Kb free=248551Kb
                                                                         bounds [0x000000010a9f8000, 0x000000010b758000, 0x000000011a9f8000]
                                                                                                                                             total_blobs=3768 nmethods=3242 adapters=440
                                                                                                                                                                                         compilation: disabled (not enough contiguous free space left)
    
     *  The terminal process terminated with exit code: 100.

    I installed jre-8u431-macosx-aarch64.dmg from the link on the main java downloads page: https://www.java.com/en/download/

    I actually tried installing the Intel version first, and after the Monkey C verification failed, I uninstalled it and installed the ARM64 java version above. The java installation prompts appeared to work, so I assume it is installed correctly. (And I proceeded to uninstall the Monkey C extension and re-install it.)

    Any other ideas?

Children
No Data