nRF Connect for Desktop v5.0.2, programmer v4.4.1, rust-panic on startup

I recently purchased an nrf52840 dongle.

In nRF Connect for Desktop (v5.0.2) and with or without the device attached, Programmer (v4.4.1) starts with a rust-panic error:

10:09:46.533	thread '<unnamed>' panicked at src\usb-lister-rs\src\windows.rs:1160:5: assertion `left == right` failed left: 14 right: 68 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
10:09:46.533	thread '<unnamed>' panicked at library\panic_unwind\src\seh.rs:290:8: Rust panics cannot be copied stack backtrace:
10:09:46.536	0: 0x7ffd4a7ddbfd - <unknown> 1: 0x7ffd4a7d3e29 - <unknown> 2: 0x7ffd4a7dc361 - <unknown> 3: 0x7ffd4a7dd9d6 - <unknown> 4: 0x7ffd4a7df3c8 - <unknown> 5: 0x7ffd4a7df076 - <unknown> 6: 0x7ffd4a7df8f8 - <unknown>
10:09:46.537	7: 0x7ffd4a7df779 - <unknown> 8: 0x7ffd4a7de2ef - <unknown> 9: 0x7ffd4a7df468 - <unknown> 10: 0x7ffd4a94a874 - nrfdl_wait_timed_async_task_complete 11: 0x7ffd4a7fae6c - <unknown>
10:09:46.542	12: 0x7ffdbfe422b1 - <unknown> 13:
10:09:46.542	0x7ffdbfe42008 - <unknown> 14: 0x7ffdbfe42529 - __ExceptionPtrCurrentException 15: 0x7ffd4a952e6f - nrfdl_wait_timed_async_task_complete
10:09:46.543	16: 0x7ffdbfed4160 - _CxxFrameHandler4 17
10:09:46.544	: 0x7ffdbfed2572 - <unknown>
10:09:46.548	18: 0x7ffde57f4a26 - RtlCaptureContext2 19: 0x7ffd4a90c6cf - <unknown>
10:09:46.548	20: 0x7ffd4a8ea1c3 - <unknown> 21: 0x7ffd4a90d382 - <unknown> 22: 0x7ffd4a910953 - <unknown> 23: 0x7ffd4a8eaad4 - <unknown> 24: 0x7ffd4a8e9588 - <unknown> 25: 0x7ffdbfe52ab9 - Concurrency::details::_Schedule_chore
10:09:46.548	26: 0x7ffde57b289a - RtlHashUnicodeString 27: 0x7ffde5785e66 - RtlClearThreadWorkOnBehalfTicket
10:09:46.550	28: 0x7ffde435257d - BaseThreadInitThunk 29: 0x7ffde57aaf28 - RtlUserThreadStart
10:09:46.551	thread '<unnamed>' panicked at library\panic_unwind\src\seh.rs:290:8: Rust panics cannot be copied stack backtrace: 0: 0x7ffd4a7ddbfd - <unknown> 1: 0x7ffd4a7d3e29 - <unknown> 2: 0x7ffd4a7dc361 - <unknown> 3: 0x7ffd4a7dd9d6 - <unknown> 4: 0x7ffd4a7df3c8 - <unknown> 5: 0x7ffd4a7df076 - <unknown> 6: 0x7ffd4a7df8f8 - <unknown> 7: 0x7ffd4a7df779 -
10:09:46.551	<unknown> 8: 0x7ffd4a7de2ef - <unknown> 9: 0x7ffd4a7df468 - <unknown> 10: 0x7ffd4a94a874 - nrfdl_wait_timed_async_task_complete 11: 0x7ffd4a7fae6c - <unknown> 12: 0x7ffdbfe422b1 - <unknown> 13: 0x7ffdbfe92add - std::basic_ostream<unsigned short,std::char_traits<unsigned short> >::write 14:
10:09:46.551	0x7ffdbfed4160 - _CxxFrameHandler4 15: 0x7ffdbfed2572 - <unknown> 16: 0x7ffde57f4a26 - RtlCaptureContext2 17: 0x7ffdbfe42008 - <unknown> 18: 0x7ffdbfe42529 - __ExceptionPtrCurrentException 19: 0x7ffd4a952e6f - nrfdl_wait_timed_async_task_complete 20: 0x7ffdbfed4160 - _CxxFrameHandler4 21: 0x7ffdbfed2572 - <unknown> 22: 0x7ffde57f4a26 - RtlCaptureContext2 23: 0x7ffd4a90c6cf - <unknown>
10:09:46.551	24: 0x7ffd4a8ea1c3 - <unknown> 25: 0x7ffd4a90d382 - <unknown> 26: 0x7ffd4a910953 - <unknown> 27: 0x7ffd4a8eaad4 - <unknown> 28: 0x7ffd4a8e9588 - <unknown> 29: 0x7ffdbfe52ab9 - Concurrency::details::_Schedule_chore 30: 0x7ffde57b289a - RtlHashUnicodeString 31: 0x
10:09:46.551	7ffde5785e66 - RtlClearThreadWorkOnBehalfTicket 32: 0x7ffde435257d - BaseThreadInitThunk 33: 0x7ffde57aaf28 - RtlUserThreadStart fatal runtime error: Rust panics must be rethrown
10:09:46.701	Error: Subprocess C:\Users\by_co\AppData\Roaming\nrfconnect\nrfutil-sandboxes\device\2.5.0\bin\nrfutil-device.exe failed with unexpected exit code Some(-1073740791)
10:09:46.706	Using nrfutil-device version: 2.5.0
10:09:46.706	Using nrf-device-lib version: 0.17.26

This is on a w11 system.  j-link j-tag-load, rtt client, remote server, etc with v7.98b are installed. I'm not seeing python errors, but for what it's worth, v3.11 is installed. Any ideas what I have missed installing or what paths need to be updated?

Thank you!

Parents Reply
  • Yes, it is actively being looked into. We know about it and is looking into fixing it by releasing new app versions running on this new CLI version. They've provided a workaround that will work as well here (in case force updating nrfutil didn't work):

    • Close nRF Connect for Desktop
    • Set these environment variables:
      export NRF_OVERRIDE_NRFUTIL_SETTINGS=true
      export NRF_OVERRIDE_VERSION_DEVICE=2.6.1
    • When updating to v2.6.1 of nRFUTIL device, you also need at least v7.94i of the J-Link drivers.
    • Start nRF Connect for Desktop from the terminal having these environment variable

    All apps will now use nrfutil device v2.6.1 and should work as expected.

    Best regards,

    Simon

Children
  • - hey, baby steps, things are moving in the right direction!

    1) no rust-panic and desktop is detecting nrfutil-device version 2.6.1.  woohoo!

    2) The dongle is attached and in bootloader mode (1hz red led), but is not detected.  I tried programmer, quick-start, board-configurator, and bluetooth-low-energy all with no luck.

    3) desktop seems to have an issue with jlink_v8.10a installed and it is expecting jlink_v7.94i

    Question:  how to set the jlink version that desktop is expecting?

    Here is summary from the terminal session:

    // forced install:
    C:\Users\me\Downloads\nrf-dongle>nrfutil.exe install device=2.6.0 --force
    nrfutil-device already installed
    Uninstalled nrfutil-device
    [00:00:06] ###### 100% [Install packages] Install packages
    C:\Users\me\Downloads\nrf-dongle>
    
    // set the required environment variables:
    C:\Users\me\Downloads\nrf-dongle>set NRF_OVERRIDE_NRFUTIL_SETTINGS=true
    C:\Users\me\Downloads\nrf-dongle>set NRF_OVERRIDE_VERSION_DEVICE=2.6.1
    
    // move to the .exe location
    C:\Users\me\Downloads\nrf-dongle>cd "C:\Users\Gary\AppData\Local\Programs\nrfconnect\"
    C:\Users\me\AppData\Local\Programs\nrfconnect>"nRF Connect for Desktop.exe"
    
    //Programmer:
    16:29:12.112	Initialising nrfutil module: device
    16:29:13.993	Using nrfutil-device core version: 7.13.0
    16:29:14.806	Using nrfutil-device version: 2.6.1
    16:29:14.806	Using nrf-device-lib version: 0.17.33
    16:29:14.806	Using nrfjprog DLL version: 10.24.2
    16:29:14.806	Using JLink version: JLink_V8.10a
    16:29:14.807	Installed JLink version does not match the expected version (JLink_V7.94i)

    Here is the programmer output:

    16:35:32.558	Initialising nrfutil module: device
    16:35:34.526	Using nrfutil-device core version: 7.13.0
    16:35:35.344	Using nrfutil-device version: 2.6.1    <<<<==== woohoo!
    16:35:35.345	Using nrf-device-lib version: 0.17.33
    16:35:35.345	Using nrfjprog DLL version: 10.24.2
    16:35:35.345	Using JLink version: JLink_V8.10a
    16:35:35.345	Installed JLink version does not match the expected version (JLink_V7.94i)

    I setup for dual boot with linux on this box and installed Debian 12.  Debian 12 also does not see the device, it does not have a rust-panic, and it also complains about the jlink version mismatch.  I -think- this will be a good testing setup because same hardware approaching from different OS.  Note this is not a linux VM, it is a whole dual boot setup.

    Thank you for the help!  Now let's figure out why the device is not being detected.  I picked up parts and I think I can add a jtag header to this dongle if that would be helpful.

    Gary

  • - an important update!  I didn't check the Saturday mail until this afternoon (Sunday) and a my second nrf52840 dongle arrived.  It -is- (woohoo!) seen by Nordic programmers on both w11 and Debian. 

    So, I think the questions become:

    1) how to recover from a clobbered bootloader that is in bootloader-mode (1hz red led), but that the programmer does not recognize?

    2) how to tell nrf desktop to expect jlink v8 instead of v7?  Same message on both Linux and w11.

    Thank you!

  • This worked for me (generally) but I needed to expand on it. Just getting nRF Connect for Desktop isn't enough - I need to be able to program and debug my application from the nRF Connect Extension for VS Code. Setting the two environment variables mentioned globally for my user in Windows (reboot after adding them!) is ultimately what I needed to do.

    Of course, changing from version 2.5.0 -> 2.6.1 means that my J-Link driver needed to be upgraded from V7.94e to V7.94i also!

    This took me a very painful two days to figure out, and I needed to reset everything related to nRF Connect and VS Code in the process. I do believe that I am back on track again.

    @Nordic, please fast track a fix for this, as I expect that other users will also have problems, even with first-time installs. Fundamentally, it seems that the 2.5.0 version can't find its own DLLs in the lib folder. Running the tool manually would crash every time with this error:

  • Hi

    I have forwarded your request and we are currently working on a fix, but I do not have a timeline unfortunately. Thank you for your thorough report. I've also updated my last reply with the workaround to reflect that the J-Link must also be upgraded.

    Best regards,

    Simon

  • I was not having this issue, but without changing anything on my end (except perhaps automatic updates to nRF Connect for VS Code) this issue began to happen.

    I followed your steps and adding the environment variables fixed the issue in nRF Connect for Desktop but did not fix the issue in nRF Connect for VS Code.

    The only solution that worked for me was downloading nRF Command Line tools and changing my Nrf-connect: Device Provider setting in the VSCode extension from nrfutil to nrfjprog

    Something in nrfutil seems broken. I concur that this issue needs to be fast tracked as other users will probably have the same issues that are very difficult to track down when occurring in a fundamental piece of the toolchain.

Related