cmajor-lang / cmajor

The Cmajor public repository
https://cmajor.dev
Other
534 stars 31 forks source link

CAN NOT Run with VSCode extension #72

Open Huang-Jin opened 3 months ago

Huang-Jin commented 3 months ago

Thanks for implementing such an interesting language! While I follow the guide to install vs code extension, I used one of the examples and try to run by using cmajor tools, but I got following errors. My Mac machine is M2 with OS version 13.5.2. Is there any other requirements?

ERROR DETAILS:

Starting server process at Fri Jul 12 17:09:37 2024 Cmajor Version: 1.0.2562 Build date: Jun 18 2024 22:15:57 OS: OSX

Cmajor server active: http://127.0.0.1:51020

Session created: HFABNSIGIE


Session Age URL
HFABNSIGIE 572 microseconds http://127.0.0.1:51020/session_HFABNSIGIE/cmaj-patch-chooser.html

Loading patch: /.vscode/extensions/cmajorsoftware.cmajor-tools-1.0.2562-darwin-arm64/examples/808/808.cmajorpatch Audio API: CoreAudio, Output device: Apple Inc.: xxx, Input device: Apple Inc.:xxx, Rate: 44100Hz, Block size: 128 frames, Latency: 118 frames, Output channels: 2, Input channels: 1 Total build time: 478.83 ms load: 54.97 ms, compile: 33.2 ms, link: 390.65 ms


libc++abi: terminating due to uncaught exception of type cmaj::AbortCompilationException

Huang-Jin commented 3 months ago

By the way, I can use cmajor command tools such as cmajor play to run patches successfully.

julianstorer commented 3 months ago

Hi there - that's very odd, we've not seen anything like that, and we test heavily on OSX. Does it happen with all of the examples, or just one in particular? Anything else unusual about your machine or setup..?

JamesHallowell commented 3 months ago

I'm seeing the same thing with v1.0.2562 (on macOS 14.5 / M2) with the default patch that gets generated when running "Create a new patch" from the extension.

JamesHallowell commented 3 months ago

Figured out that disabling Bluetooth on my mac fixes the problem for me.

I can reproduce the issue by turning Bluetooth back on, and then waking up my iPhone so that its microphone appears as an available audio input as part of the Continuity Camera feature.

image

If I then try to run the patch using the extension I see the same exception in the output again:

libc++abi: terminating due to uncaught exception of type cmaj::AbortCompilationException
Huang-Jin commented 3 months ago

Hi there - that's very odd, we've not seen anything like that, and we test heavily on OSX. Does it happen with all of the examples, or just one in particular? Anything else unusual about your machine or setup..?

I tried to change version of extension, but it didn't help. Also tried the bluetooth and input/output devices, the same issue. Could you imagine any configuration will cause such compile error? Or where could us find the detail error message?

Huang-Jin commented 3 months ago

Every cmajor patch will meet this problem when rendering using html with vs code extension and the local binary executor. Maybe the web html is the problem?

Huang-Jin commented 3 months ago

I checked it with some of my friends' Mac machines, also faced this problem when using latest vscode extension to render with web, both in x86 and arm64.

Huang-Jin commented 3 months ago

I found the key casue of this issue, the language of the system will affect serialization of json, the serialization of json wil fail if it faced non-ascii characters like chinese words. When I switch my system to English version, it works.

cesaref commented 3 weeks ago

We have updated to resolve some non-binary mode file logic, can you check whether you still have this problem with the latest version? We tried to recreate the issue but failed, so sorry if we've not managed to catch the exact place this happens

JamesHallowell commented 6 days ago

Using v1.0.2662 of the VSCode extension and still appear to be hitting the same issue. I can workaround it by renaming the iPhone to remove the ’ character, after which patches will run successfully.