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
  • Hi

    Try running nrfutil install device=2.6.0 --force to force upgrade the nrfutil device version to 2.6.0 and see if that helps at all.

    Best regards,

    Simon

  • can the developers reproduce the error?  Any idea if it's actively being looked into yet?  Thanks!

  • - 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.

  • Another update, after playing around some more... The environment variable hacks may help with nRF Connect for Windows but don't always work for VS Code and the nRF Connect Extension. This is why I was looking for a fix in the first place. If your boards are showing up in nRF Connect for Windows but aren't reliably showing up in the VS Code Extension, you can try another route.

    Install the latest version of the nRF Connect Command Line Tools, and then change a setting in the nRF Connect VS Code Extension to use the command line tools connection manager.

    File -> Preferences -> Settings -> Search for `nrf-connect device provider` and change the setting to `nrfjprog`

Reply
  • Another update, after playing around some more... The environment variable hacks may help with nRF Connect for Windows but don't always work for VS Code and the nRF Connect Extension. This is why I was looking for a fix in the first place. If your boards are showing up in nRF Connect for Windows but aren't reliably showing up in the VS Code Extension, you can try another route.

    Install the latest version of the nRF Connect Command Line Tools, and then change a setting in the nRF Connect VS Code Extension to use the command line tools connection manager.

    File -> Preferences -> Settings -> Search for `nrf-connect device provider` and change the setting to `nrfjprog`

Children
No Data
Related