armory3d / armory3d/armory

macOS Tahoe 26.5.2: Krom crashes on empty project with TypeError: Krom.getSamplesPerSecond is not a function

Open
#3,330 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
3.3k
Forks
353
Avg merge
3d 16h
Merged PRs (30d)
1

Description

**Description**
Krom crashes on empty project with TypeError: Krom.getSamplesPerSecond is not a function. Appears to be a runtime/API mismatch rather than a project issue.The issue occurs even with a brand-new empty project, so it doesn't appear to be related to project content.

**To Reproduce**
1. Install Blender 4.2 LTS
2. Install Armory from `armory.py`
3. Set SDK Path to the extracted Armory2602 SDK
4. Create a new Blender file (default cube only)
5. Press Play

**Expected behavior**
Krom starts and the default cube is shown.

**Actual**
The build completes successfully.

Krom launches but immediately exits with:

```text
TypeError: Krom.getSamplesPerSecond is not a function

at Function.init
at Function.start

Fatal error in v8::Function::Call
Function to be called is a null pointer

WARNING: Player exited code -5
```
The generated `krom.js` contains:

```javascript
kha_audio2_Audio.samplesPerSecond = Krom.getSamplesPerSecond();
kha_audio2_Audio1._init();
kha_audio2_Audio._init();
Krom.setAudioCallback(kha_SystemImpl.audioCallback);
```

The exception is thrown exactly on the call to:

```javascript
Krom.getSamplesPerSecond()
```

which seems to be unavailable in the macOS Krom runtime on my system. I'm not sure if this indicates a runtime/API mismatch or another issue.

**What I already verified**

- Fresh Blender install
- Fresh Armory 26.02 SDK
- Empty Blender scene
- `kraffiti` works
- `cmft` works
- `node-osx` works
- Build completes successfully
- Krom executable is a universal binary (x86_64 + arm64)

**System**

- macOS Tahoe 26.5.2
- Apple M2 Pro
- Blender 4.2 LTS
- Armory 26.02
- SDK downloaded from:
https://github.com/armory3d/armory/releases/download/26.02/Armory2602.zip

Can anyone reproduce this on macOS Tahoe 26.x? Is the Krom binary included in Armory 26.02 expected to expose Krom.getSamplesPerSecond()?

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the failure from the empty Blender project using the Armory2602 SDK, then inspect the generated krom.js call to Krom.getSamplesPerSecond and the bundled Krom executable. Compare the generated audio API usage with the runtime exposed on macOS Tahoe; done means the empty default-cube project launches without the TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
blender, cpp, macos
Domain
desktop-dev, game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.