Share via

Recently more exceptions throw from winrt

Leon Xu 0 Reputation points
2026-04-30T02:24:05.6833333+00:00

Recently more exceptions throw from winrt, but it's ok earlier, does any change in this class?

os Windows 10.0.16299 build 1087

enter image description here

 # Child-SP          RetAddr               Call Site
00 00000042`e0afa448 00007ffc`11e0d6fa     ntdll!NtDelayExecution+0x14
01 00000042`e0afa450 00007ffb`cf1c724e     KERNELBASE!SleepEx+0x9a
02 00000042`e0afa4f0 00007ffc`11e99650     sentry!sentry_span_set_data+0x443b8
03 00000042`e0afa640 00007ffc`15081fc1     KERNELBASE!UnhandledExceptionFilter+0x190
04 00000042`e0afa750 00007ffc`15053d10     ntdll!LdrpLogFatalUserCallbackException+0x51
05 00000042`e0afa870 00007ffc`15054ecd     ntdll!KiUserCallbackDispatcherHandler+0x20
06 00000042`e0afa8b0 00007ffc`14fd6058     ntdll!RtlpExecuteHandlerForException+0xd
07 00000042`e0afa8e0 00007ffc`14fd4593     ntdll!RtlDispatchException+0x358
08 00000042`e0afaff0 00007ffc`11df5518     ntdll!RtlRaiseException+0x303
09 00000042`e0afb850 00007ffb`fa735267     KERNELBASE!RaiseException+0x68
0a 00000042`e0afb930 00007ffb`89fd1c23     VCRUNTIME140!_CxxThrowException+0x97 [D:\a\_work\1\s\src\vctools\crt\vcruntime\src\eh\throw.cpp @ 82] 
0b 00000042`e0afb990 00007ffb`8a024532     RingCentralVideoClient!winrt::throw_hresult+0x283 [C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\cppwinrt\winrt\base.h @ 5045] 
0c (Inline Function) --------`--------     RingCentralVideoClient!winrt::check_hresult+0x43 [C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\cppwinrt\winrt\base.h @ 5115] 
0d (Inline Function) --------`--------     RingCentralVideoClient!winrt::impl::consume_Windows_Devices_Enumeration_IDeviceAccessInformationStatics<winrt::Windows::Devices::Enumeration::IDeviceAccessInformationStatics>::CreateFromDeviceClass+0x6c [C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\cppwinrt\winrt\Windows.Devices.Enumeration.h @ 201] 
0e (Inline Function) --------`--------     RingCentralVideoClient!winrt::Windows::Devices::Enumeration::DeviceAccessInformation::CreateFromDeviceClass::__l2::<lambda_1>::operator()+0x6f [C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\cppwinrt\winrt\Windows.Devices.Enumeration.h @ 3601] 
0f 00000042`e0afb9f0 00007ffb`8a0249b0     RingCentralVideoClient!winrt::impl::factory_cache_entry<winrt::Windows::Devices::Enumeration::DeviceAccessInformation,winrt::Windows::Devices::Enumeration::IDeviceAccessInformationStatics>::call<`winrt::Windows::Devices::Enumeration::DeviceAccessInformation::CreateFromDeviceClass'::`2'::<lambda_1> &>+0x1b2 [C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\cppwinrt\winrt\base.h @ 6431] 
10 (Inline Function) --------`--------     RingCentralVideoClient!winrt::impl::call_factory+0x84 [C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\cppwinrt\winrt\base.h @ 6467] 
11 (Inline Function) --------`--------     RingCentralVideoClient!winrt::Windows::Devices::Enumeration::DeviceAccessInformation::CreateFromDeviceClass+0x8e [C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\cppwinrt\winrt\Windows.Devices.Enumeration.h @ 3601] 
12 00000042`e0afbaa0 00007ffb`8a024f2b     RingCentralVideoClient!rcvnc::DevicePermissionManager::DevicePermissionManager+0x3e0 [D:\jenkins\workspace\RPM-RCV-NC\src\ui\win\app\src\device\device_permission_manager.cpp @ 13] 
13 (Inline Function) --------`--------     RingCentralVideoClient!std::make_shared+0x3e [C:\Program Files\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.42.34433\include\memory @ 2906] 
14 00000042`e0afbdf0 00007ffb`8a1f38f5     RingCentralVideoClient!rcvnc::CreateDevicePermissionManager+0x5b [D:\jenkins\workspace\RPM-RCV-NC\src\ui\win\app\src\device\device_permission_manager.h @ 31] 
15 00000042`e0afbe30 00007ffb`8a16e194     RingCentralVideoClient!rcvnc::DeviceController::DeviceController+0x6a5 [D:\jenkins\workspace\RPM-RCV-NC\src\ui\commons\src\rcv_device_controller\device_controller.cpp @ 151] 
16 (Inline Function) --------`--------     RingCentralVideoClient!std::_Construct_in_place+0x19b [C:\Program Files\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.42.34433\include\xutility @ 406] 
17 (Inline Function) --------`--------     RingCentralVideoClient!std::_Ref_count_obj2<rcvnc::DeviceController>::{ctor}+0x1c0 [C:\Program Files\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.42.34433\include\memory @ 2095] 
18 00000042`e0afc240 00007ffb`8a18ee3a     RingCentralVideoClient!std::make_shared<rcvnc::DeviceController,std::shared_ptr<rcvnc::IRCVSDKControllerCallback> &,std::shared_ptr<rcvnc::RCVSDKSettings> &,`rcvnc::RCVSDKControllerImpl::initControllers'::`2'::<lambda_3> &,std::_Binder<std::_Unforced,bool (__cdecl rcvnc::RCVSDKControllerImpl::*)(void),rcvnc::RCVSDKControllerImpl *>,`rcvnc::RCVSDKControllerImpl::initControllers'::`2'::<lambda_2> &,std::_Binder<std::_Unforced,void (__cdecl rcvnc::LocalParticipant::*)(bool,std::basic_string<char,std::char_traits<char>,std::allocator<char> > const &,__int64),rcvnc::LocalParticipant *,std::_Ph<1> const &,std::_Ph<2> const &,std::_Ph<3> const &>,std::_Binder<std::_Unforced,void (__cdecl rcvnc::LocalParticipant::*)(bool,std::basic_string<char,std::char_traits<char>,std::allocator<char> > const &,__int64),rcvnc::LocalParticipant *,std::_Ph<1> const &,std::_Ph<2> const &,std::_Ph<3> const &>,std::shared_ptr<rcvnc::RCVSDKControllerImpl> >+0x214 [C:\Program Files\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.42.34433\include\memory @ 2906] 
19 00000042`e0afc440 00007ffb`8a0f0608     RingCentralVideoClient!rcvnc::RCVSDKControllerImpl::initControllers+0x134a [D:\jenkins\workspace\RPM-RCV-NC\src\ui\commons\src\rcv_sdk_controller\rcv_sdk_controller_impl.cpp @ 704] 
1a 00000042`e0afc970 00007ffb`8a0862e1     RingCentralVideoClient!rcvnc::WebAdapter::init+0x7b8 [D:\jenkins\workspace\RPM-RCV-NC\src\ui\commons\src\web_adapter\web_adapter.cpp @ 646] 
1b 00000042`e0afcae0 00007ffb`89fec339     RingCentralVideoClient!rcvnc::WebAdapterWin::init+0x1301 [D:\jenkins\workspace\RPM-RCV-NC\src\ui\win\app\src\web_adapter_win\web_adapter_win.cpp @ 190] 
1c 00000042`e0afd150 00007ffb`8a02f663     RingCentralVideoClient!rcvnc::AppController::createWebAdapter+0x2f9 [D:\jenkins\workspace\RPM-RCV-NC\src\ui\win\app\src\app_controller\app_controller.cpp @ 2305] 
1d 00000042`e0afd240 00007ffb`8a02dc02     RingCentralVideoClient!CMainView::OnCreate+0x193 [D:\jenkins\workspace\RPM-RCV-NC\src\ui\win\app\src\dui\MainView.cpp @ 192] 
1e 00000042`e0afd5e0 00007ffb`8a02923a     RingCentralVideoClient!CMainView::HandleMessage+0x82 [D:\jenkins\workspace\RPM-RCV-NC\src\ui\win\app\src\dui\MainView.cpp @ 124] 
1f 00000042`e0afd610 00007ffb`c8324bac     RingCentralVideoClient!MainMeetingView::HandleMessage+0xca [D:\jenkins\workspace\RPM-RCV-NC\src\ui\win\app\src\dui\MainMeetingView.cpp @ 64] 
20 00000042`e0afd640 00007ffc`12f2b85d     duilib!DuiLib::CWindowWnd::__WndProc+0x5c [D:\jenkins\workspace\RPM-RCV-NC\build\x64\Release\src\third_party\duilib\duilib\Core\UIBase.cpp @ 438] 
21 00000042`e0afd680 00000000`00000000     USER32!UserCallWinProcCheckWow+0x2ad
Windows development | Windows API - Win32
0 comments No comments

1 answer

Sort by: Most helpful
  1. Michael Le (WICLOUD CORPORATION) 11,325 Reputation points Microsoft External Staff Moderator
    2026-04-30T03:45:39.41+00:00

    Hello @Leon Xu ,

    I would not read this stack as WinRT “throwing more exceptions” by itself. You should check which HRESULT is being thrown. Right now the stack only shows where the failure surfaced, not why the API failed.

    From the stack, the only meaningful line is:

    DeviceAccessInformation::CreateFromDeviceClass(...)
    

    The rest are just the internal mechanics of how the exception is propagated through the layers.

    Since the machine is running on Windows 10.0.16299, which is quite old, it might be failing because of a mismatch between the SDK 10.0.26100.0 used to build the app and the Windows version it’s running on.

    Although it doesn't automatically mean the SDK is the cause, but it makes me want to verify runtime compatibility and the exact device class being passed. A newer SDK can expose APIs and behavior that still need to be handled correctly on older Windows builds.

    I would wrap this call and log the HRESULT:

    try
    {
        auto info =
            winrt::Windows::Devices::Enumeration::DeviceAccessInformation::CreateFromDeviceClass(deviceClass);
    
        // continue using info
    }
    catch (winrt::hresult_error const& ex)
    {
        auto hr = ex.code();
        auto message = ex.message();
    
        // log hr and message here
    }
    

    If this is running during app startup or window creation, I would also avoid letting this exception escape the constructor. Treat it as a permission/device-access initialization failure and fall back to an unknown or unavailable state instead of crashing the process.

    I hope this helps you identify the root cause of the exception. If you found this informative, please consider leaving a feedback through this guide.

    Thank you.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.