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)

  • We should close this ticket.  I haven't seen this problem in SDK v2.1.0 or recent versions of VS code.

  • I still have the same problem, sdk v2.1.0, vscode 1.72.2, ubuntu 20 and 22. As soon as I compile a project or flash something to a board, the nrf-terminal opens. When closing that terminal (does not happen with an additional bash terminal) the crash happens. To prevent this from happening I always close vscode with a kill command.

  • Hello there.

    I know this ticket is old, but I've been fighting with this bug for months now.

    Today I tried to install the nordic plugin for vscode on a different machine running Ubuntu 22.10. After turning on the VSCode sync options, which synchronizes all extensions, configurations etc among Vscode instances, I found out that the issue was still there. Actually, in Ubuntu it is even worse because after everything crashes you need to manually login back again (i.e. typing in your account password).

    After discovering this, I tried to disable all other VSCode extensions one by one... After disabling the Espressif IDF extension, VSCode stopped crashing when closing the nRF terminal after a build/flash task. I've been working on it all day long and the bug never happened again.

    So, at least in my case, at 99% the bug is related to some kind of incompatibility between the Espressif IDF and the Nordic VSCode extensions (but there may be some other extensions causing the same issue as well). I have absolutely no idea why or how this happens. For now, I have selectively disabled the Espressif extension on my nordic projects' workspace and everything is working properly... I think i'm pretty much happy with it!

    Hope this can help anyone experiencing this awful, exhausting bug.

  • Marco,

    • Congratulations on your persistence in tracking down this bug for your system as configured. Many thanks.
    • Your cause sounds plausible as mine as well.  The bug disappeared when I was forced to reinstalling VS Code for nRF development from a bare system, without other device IDEs.
    • Having been in and managing development teams myself, I note that it's very easy for developers and official test teams to presume certain system configurations (that certainly don't include products from the competition).
    • With Nordic's increased emphasis on VS Code as a development platform, across multiple platforms, and increased exposure by more users, I suspect there'll be more "random collisions".  If these are properly chased down (not just ignored with "Cannot reproduce" responses.) the overall quality of the Nordic development environment will improve.

    Mike

Related