Severe crashing bug in nRF Connect for VS Code on macOS Monterey

I have been attempting to install nRF Connect SDK on macOS for several months without complete success.  You can check my prior tickets for details. Nonetheless, I have recently made progress by ensuring that all traces of the SDK and, in particular, west, are removed before attempting a new installation. (I'll update my last ticket with more details on this.) -- enough progress to allow me to encounter the following problem with the VS Code IDE:

  • When following Video 3 of the getting started series: nRF Connect for VS Code, 3: Building an application & Exploring windows. at 2:30, an application build has been completed.  The lecturer has dragged up from the bottom bar of the VS Code window to open a terminal pane, which shows the output from the build process.
  • At the bottom of the pane, a note is attached: "Terminal will be reused by tasks, press any key to close it."
  • If I then click in the pane to give it focus and type a key (e.g., "m" or "l"), my applications will immediately crash.
  • And I mean, my "applications', not only the VS Code app, but also all other open apps( e.g., nRF Connect, Safari, Mail, etc., background apps like Parallels Toolbox, even Finder).  It's almost the same as a reboot (except the system isn't reloaded).  Hence my description of the bug as severe.
  • This bug is repeatable; also occurs later when following the video sequence to add and build a second app.
  • I have never seen anything like this in VS Code before installing the nRF Connect package.

I'm actually impressed by this bug.  Seems interesting that it can have effect beyond the VS Code app itself, without a total system crash.

Will be interesting to see if your engineers can reproduce this behavior.  I should note that I'm not running an entirely stock macOS Monterey (Version12.1 Beta, Build 21C5039b, the latest developer release).  I'm running on a MacBook Pro 10,1 (early 2013). which is not directly supported by Apple for Monterey.  I'm using OCLP (OpenCore Legacy Patcher) to fool macOS into thinking I have a slightly more modern machine.  Hard to see how this could be the root of this bug.  In the case of my machine, the only patches used are for graphics acceleration.  I've never seen any similar problem with OCLP before.  Will be happy to run additional diagnostics with your engineers if there's any indication that my specific configuration is at fault.

Mike (making slow, but incremental progress with configuring SES and VS Code IDEs for nRF Connect)

  • Hi Mike

    Thank you for the report!

    Could you also append the contents of VS Code support rapport here, so we can get some more information on your system?
    Feel free to edit out parts you are not comfortable sharing, end it to me as a Private Message, or ask if I can make this case Private.

    You generate this using the VS Code command (cmd+shift+p) "> nRF Connect: Generate Support Information"

    Regards,
    Sigurd Hellesvik

  • Sigurd,

    Thanks for the quick response. I've generated a VS Code support report for you (right after a build, approximately where I hit the error before).  Will append here -- doesn't look like there' any critical private info in it.

    I should mention that I still think there's an issue with my west setup, specifically with my "west workspace".  One symptom is that during application creation, I cannot specify a storage folder for it on my system disk under my home folder (~).  I have to store it on another (external) volume.

    HTH,

    Mike

    [01:05:36] west build --build-dir /Volumes/Archive2/foo/foobar/build /Volumes/Archive2/foo/foobar
    [01:05:38] Success.
    [01:05:55] west build --build-dir /Volumes/Archive2/foo/foobar/build /Volumes/Archive2/foo/foobar --pristine --board nrf52dk_nrf52832 -- -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=On -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DCONF_FILE:STRING="/Volumes/Archive2/foo/foobar/prj.conf"
    [01:06:40] Success.
    IMPORTANT: The data below could contain sensitive or confidential information about your environment.
    If you do not wish this to be seen by others, please make sure to remove it before sharing.
    
    For help and support, visit the Nordic DevZone at https://devzone.nordicsemi.com/.
    
    {
      "platform": {
        "os": "darwin",
        "osVersion": "Darwin Kernel Version 21.2.0: Thu Nov 11 00:10:13 PST 2021; root:xnu-8019.60.69~7/RELEASE_X86_64",
        "osKernel": "21.2.0",
        "vscode": "1.62.3",
        "electron": "13.5.2",
        "node": "v14.16.0"
      },
      "system": {
        "date": "2021-11-29T09:07:08.677Z",
        "vscodeRoot": "/Applications/Visual Studio Code.app/Contents/Resources/app",
        "nrfConnectForDesktopInstalled": true,
        "vscodeUptime": "00:02:19",
        "osUptime": "261:27:34",
        "cpu": {
          "model": "Intel(R) Core(TM) i7-3740QM CPU @ 2.70GHz",
          "speed": "2700 MHz",
          "count": 4
        },
        "memory": {
          "total": "8.00 GB",
          "free": "0.10 GB"
        }
      },
      "workspace": {
        "name": "Untitled (Workspace)",
        "workspaceFile": "1638075243539",
        "folders": [
          "/Volumes/Archive2/foo/foobar",
          "/Volumes/Archive2/foo/foobar2"
        ]
      },
      "extensions": {
        "internal": {
          "nordic-semiconductor.nrf-connect": {
            "version": "2021.11.221",
            "path": "/Users/mike/.vscode/extensions/nordic-semiconductor.nrf-connect-2021.11.221",
            "isActive": true
          },
          "nordic-semiconductor.nrf-terminal": {
            "version": "2021.11.7",
            "path": "/Users/mike/.vscode/extensions/nordic-semiconductor.nrf-terminal-2021.11.7",
            "isActive": true
          },
          "nordic-semiconductor.devicetree": null,
          "nordic-semiconductor.kconfig": null
        },
        "external": {
          "marus25.cortex-debug": "0.4.10",
          "ms-vscode.cpptools": "1.7.1",
          "ms-vscode.js-debug": "1.62.0",
          "ms-vscode.js-debug-companion": "1.0.15",
          "ms-vscode.references-view": "0.0.81",
          "ms-vscode.vscode-js-profile-table": "0.0.18",
          "dbaeumer.vscode-eslint": "2.2.2",
          "espressif.esp-idf-extension": "1.2.0",
          "intel-corporation.oneapi-samples": "0.0.37",
          "ms-python.python": "2021.11.1422169775",
          "ms-python.vscode-pylance": "2021.11.2",
          "ms-toolsai.jupyter": "2021.10.1101450599",
          "ms-toolsai.jupyter-keymap": "1.0.0",
          "ms-toolsai.jupyter-renderers": "1.0.3",
          "ms-vscode-remote.remote-containers": "0.205.2",
          "ms-vscode.cmake-tools": "1.9.1",
          "ms-vsliveshare.vsliveshare": "1.0.5090",
          "platformio.platformio-ide": "2.4.0",
          "trond-snekvik.gnu-mapfiles": "1.1.0",
          "twxs.cmake": "0.0.17",
          "yzane.markdown-pdf": "1.4.4",
          "yzhang.markdown-all-in-one": "3.4.0"
        }
      },
      "tools": {
        "/Applications/SEGGER/JLink/JLinkExe": "7.58b",
        "/usr/local/bin/nrfjprog": "10.15.1",
        "/opt/nordic/ncs/v1.7.1/toolchain/bin/cmake": "3.21.1",
        "/opt/nordic/ncs/v1.7.1/toolchain/bin/west": "0.11.1",
        "/Users/mike/.asdf/shims/python": "3.9.6",
        "/opt/nordic/ncs/v1.7.1/toolchain/bin/ninja": "1.10.2",
        "/opt/nordic/ncs/v1.7.1/toolchain/bin/gperf": "3.1",
        "/opt/nordic/ncs/v1.7.1/toolchain/bin/dtc": "1.6.1",
        "/opt/nordic/ncs/v1.7.1/toolchain/bin/arm-none-eabi-gcc": "9-2019-q4-major",
        "/opt/nordic/ncs/v1.7.1/toolchain/bin/gn": "1940"
      },
      "connectedDevices": [],
      "config": {
        "nordic-semiconductor.nrf-connect": {
          "topdir": "${nrf-connect.sdk:1.7.1}",
          "toolchain": {
            "path": "${nrf-connect.toolchain:1.7.1}"
          },
          "ozonePath": "",
          "applications": [
            "/Volumes/Archive2/foo/foobar",
            "${workspaceFolder}2"
          ],
          "jlink": {
            "rtosPlugin": ""
          },
          "kconfig": {
            "interface": null
          },
          "welcome": {
            "showOnStartup": true
          },
          "west": {
            "env": {
              "$base": "terminal"
            }
          },
          "boardRoots": [],
          "enableTelemetry": true
        },
        "nordic-semiconductor.nrf-terminal": {
          "terminalMode": "character"
        },
        "nordic-semiconductor.devicetree": {
          "modules": [
            "${zephyrBase}",
            "${zephyrBase}/../nrf",
            "."
          ],
          "zephyr": "",
          "ctxFile": "",
          "defaultBoard": ""
        },
        "nordic-semiconductor.kconfig": {
          "root": "",
          "env": {},
          "cfiles": true,
          "disable": false,
          "zephyr": {
            "base": ""
          }
        },
        "marus25.cortex-debug": {
          "armToolchainPath": null,
          "armToolchainPrefix": "arm-none-eabi",
          "gdbPath": null,
          "JLinkGDBServerPath": null,
          "openocdPath": null,
          "pyocdPath": null,
          "PEGDBServerPath": null,
          "stutilPath": null,
          "stlinkPath": null,
          "stm32cubeprogrammer": null,
          "enableTelemetry": true,
          "flattenAnonymous": false,
          "registerUseNaturalFormat": true,
          "variableUseNaturalFormat": true,
          "dbgServerLogfile": null
        }
      },
      "environment": {
        "westExe": "/opt/nordic/ncs/v1.7.1/toolchain/bin/west",
        "westEnv": {
          "ELECTRON_RUN_AS_NODE": "1",
          "GIT_EXEC_PATH": "/opt/nordic/ncs/v1.7.1/toolchain/Cellar/git/2.32.0_1/libexec/git-core",
          "HOME": "/Users/mike",
          "PATH": "/opt/nordic/ncs/v1.7.1/toolchain/bin:/Users/mike/.asdf/shims:/usr/local/Cellar/asdf/0.8.1_1/libexec/bin:/usr/local/sbin:/Users/mike/Projects/moddable/build/bin/mac/release:/Library/Frameworks/Python.framework/Versions/3.6/bin:/Library/Frameworks/Python.framework/Versions/3.9/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/Library/Apple/usr/bin:/Applications/Wireshark.app/Contents/MacOS:/Applications/Visual Studio Code.app/Contents/Resources/app/bin:/Users/mike/esp/esp-idf/tools:/Applications/Visual Studio Code.app/Contents/Resources/app/bin:/Users/mike/gn",
          "ZEPHYR_BASE": "/opt/nordic/ncs/v1.7.1/zephyr",
          "GNUARMEMB_TOOLCHAIN_PATH": "/opt/nordic/ncs/v1.7.1/toolchain",
          "ZEPHYR_TOOLCHAIN_VARIANT": "gnuarmemb",
          "USER": "mike"
        },
        "toolchainPath": "/opt/nordic/ncs/v1.7.1/toolchain",
        "toolchainBinPath": "/opt/nordic/ncs/v1.7.1/toolchain/bin",
        "toolchainVersion": "1.7.1"
      },
      "terminal": {
        "shell": null,
        "defaultProfile": null
      }
    }
    
    

  • Hi,

    You mentions that you cannot create an app in the home folder. The reason might very well be some earlier installation of nRF Connect SDK where you possibly have a .west/config  that prevents creating any app. In case it's not intentional, that needs to be removed.
    Does that fix anything?
    Regards,
    Sigurd Hellesvik
  • Yes, with regard to earlier .west/config. That caused me some problems before; see my report here.  But I made sure I had a clean system before doing the installation discussed above.

    Mike

  • Hi Mike,

    Unfortunately, we are not able to reproduce your issue.
    Since you have a very unique setup, it is reason to believe that this error is unique to your setup as well.
    We will of course give the issue more attention if others start reporting the same bug.

    So in short, you are on your own for this one.
    Thank you for the thorough report, and good luck.

    Regards,
    Sigurd Hellesvik

Related