Why does Native Only debugging cause Windows dlls to report errors?

oregonduckman 6 Reputation points
2022-03-09T22:16:00.147+00:00

Why does enabling Native Only debugging cause Windows dlls report errors as shown in the following?

Windows.UI.Xaml.dll!00007FFBCA9D820B: (caller: 00007FFBCA9E60E2) ReturnHr(1) tid(281c) 80070057 The parameter is incorrect.
Windows.UI.Xaml.dll!00007FFBCA9D98C8: (caller: 00007FFB6B5E4D0F) ReturnHr(2) tid(281c) 80070057 The parameter is incorrect.
Windows.UI.Xaml.dll!00007FFBCA9D820B: (caller: 00007FFBCA9E60E2) ReturnHr(3) tid(281c) 80070057 The parameter is incorrect.
Windows.UI.Xaml.dll!00007FFBCA9D98C8: (caller: 00007FFB6B5E4D0F) ReturnHr(4) tid(281c) 80070057 The parameter is incorrect.
Windows.UI.Xaml.dll!00007FFBCA9D820B: (caller: 00007FFBCA9E60E2) ReturnHr(5) tid(281c) 80070057 The parameter is incorrect.
Windows.UI.Xaml.dll!00007FFBCA9D98C8: (caller: 00007FFB6B5E4D0F) ReturnHr(6) tid(281c) 80070057 The parameter is incorrect.

onecoreuap\drivers\wdm\bluetooth\user\winrt\common\devquerydevpropprovider.cpp(297)\Windows.Devices.Bluetooth.dll!00007FFBBE120C10: (caller: 00007FFBBE120698) ReturnHr(5) tid(d1c) 80070490 Element not found.
onecoreuap\drivers\wdm\bluetooth\user\winrt\common\devquerydevpropprovider.cpp(131)\Windows.Devices.Bluetooth.dll!00007FFBBE1206EC: (caller: 00007FFBBE135B5A) ReturnHr(6) tid(d1c) 80070490 Element not found.
onecoreuap\drivers\wdm\bluetooth\user\winrt\device\bluetoothledevice.cpp(1597)\Windows.Devices.Bluetooth.dll!00007FFBBE135B72: (caller: 00007FFBBE130BC0) LogHr(2) tid(d1c) 80070490 Element not found.

Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
950 questions
{count} vote

2 answers

Sort by: Most helpful
  1. oregonduckman 6 Reputation points
    2022-03-10T14:54:16.087+00:00

    Very simple UWP Bluetooth LE app. I can share the code if you like.

    Microsoft Visual Studio Community 2022 (64-bit) - Current Version 17.1.1
    Microsoft.NETCore.UniversalWindowsPlatform Version 6.2.12
    Microsoft.UI.Xaml.Markup WindowsRuntime 1.4;CLR v4.0.30319
    Universal Windows UAP,Version=10.0.19041.0


  2. RLWA32 40,946 Reputation points
    2022-04-05T10:15:01.257+00:00

    While looking into a different problem I noticed that the error handling code in a system dll provided additional reporting after it determined that a debugger was attached to the process. That behavior could explain what you are seeing.

    For example, the call stack I was looking at -
    190095-checkfordebugger.png

    0 comments No comments