Skip to content

CYD PROBLEM #2455

@H4Z3-byte

Description

@H4Z3-byte

Problem: mQuickJS interpreter crashes (freeze/reboot) on CYD when launching any .js script from the JS interpreter menu. Trying to run a simple script like subghz.transmit("AAAA", 433920000, 174, 3) causes the device to hang or crash.

BRUCE Firmware Version: 1.14 — issue is in source code, reproducible on any recent build that includes mQuickJS.

Device Used:

Model: CYD (Cheap Yellow Display) — ESP32-2432S028R
Chip: ESP32-D0WDQ6 (dual-core, 240MHz)
PSRAM: Not present (520KB internal SRAM only)
Flash: 16MB
Since When the Problem Occurs:

Always — it's a RAM allocation bug, not a regression.
Steps to reproduce:
Flash Bruce to a CYD without PSRAM
Copy any .js file to SD card
Go to Apps → Tools → JS Interpreter → select the .js file
Device crashes or freezes immediately
Root cause (confirmed by reading source): In src/modules/bjs_interpreter/interpreter.cpp ~line 45, the memory allocated for mQuickJS (max_alloc - 8192) leaves only ~60KB of heap. JS_NewContext() can't initialize the runtime + precompiled stdlib (js_stdlib) in that space, causing a null-pointer crash.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions