microsoft / cppwinrt

C++/WinRT
MIT License
1.65k stars 238 forks source link

Bug: TryLookup and Cancel cause noise in debugger because they RoOriginate an error that is expected #1376

Closed antmor closed 9 months ago

antmor commented 9 months ago

Version

No response

Summary

When calling TryLookup, or when cancelling an Async exception, there are a lot of debug spew under a debugger, for example:

MyDll.dll!00007FFFC056E0E6: ReturnHr(201) tid(8f20) 8000000B The operation attempted to access data outside the valid range Msg:[winrt::hresult_error: The operation attempted to access data outside the valid range] (8d78.8f20): Windows Runtime Originate Error - code 40080201 (first chance) (8d78.8f20): Windows Runtime Originate Error - code 40080201 (first chance) (8d78.8f20): C++ EH exception - code e06d7363 (first chance) (8d78.8f20): C++ EH exception - code e06d7363 (first chance) path\to\file.cpp(825)\MyDll.dll!00007FFFC058C923: (caller: 00007FFFC03A4A39) LogHr(139) tid(8f20) 800704C7 The operation was canceled by the user. Msg:[winrt::hresult_error: The operation was canceled by the user.] (8d78.8f20): Windows Runtime Originate Error - code 40080201 (first chance) (8d78.8f20): Windows Runtime Originate Error - code 40080201 (first chance) (8d78.8f20): C++ EH exception - code e06d7363 (first chance) (8d78.8f20): C++ EH exception - code e06d7363 (first chance)

we should reserve the ability for developers to opt out of this noisy RoOriginate spew in these two scenarios.

github-actions[bot] commented 9 months ago

This issue is stale because it has been open 10 days with no activity. Remove stale label or comment or this will be closed in 5 days.