microsoft / microsoft/microsoft-ui-xaml
`CompositionScopedBatch` does not support `IWeakReferenceSource`
- Dominant language
- C++
- Stars
- 8.4k
- Forks
- 942
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 105
Description
### Describe the bug
This documented usage will cause a crash
### Why is this important?
Because we need `Completed` event with an auto revoker to work.
### Steps to reproduce the bug
```cpp
auto batch = compositor.CreateScopedBatch(winrt::Microsoft::UI::Composition::CompositionBatchTypes::Animation);
auto revoker = batch.Completed(winrt::auto_revoke, ...);
```
### Actual behavior
Crash
### Expected behavior
_No response_
### Screenshots
_No response_
### NuGet package version
WinUI 3 - Windows App SDK 1.8.3: 1.8.251106002
### Windows version
Windows 11 (24H2): Build 26100
### Additional context
_No response_
Contributor guide
Research direction
No source file or test is identified. Start by reproducing the documented C++ snippet with CompositionScopedBatch, IWeakReferenceSource, and the Completed auto revoker; done means the snippet no longer crashes and the Completed event works with an auto revoker.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- api, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100