You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: winapp run can hang forever while launching a packaged app when several launches run at once #1035
winapp run --detach on a packaged app sometimes never returns. The package is registered, but the command stays stuck in app activation indefinitely, with no timeout and no output.
Every hang so far happened while two or more winapp run processes were launching packaged apps at the same time. The same projects launch fine when run one at a time.
A managed stack of a hung process (dotnet-stack report -p <pid>) shows it blocked in IApplicationActivationManager.ActivateApplication:
ActivateApplication is called with no timeout. It runs inline on the thread that completed the package deployment, a WinRT async completion callback. The main thread is waiting on the task. Killing the stuck process was the only way out; no app process was ever started.
To Reproduce
Create 3 or 4 packaged WinUI 3 projects with different package identities, e.g. with the generator in tests/project-arch/ (New-ProjectArchFixture).
Start winapp run <App.csproj> --detach --arch <host arch> for all of them at the same time, e.g. with ForEach-Object -Parallel -ThrottleLimit 4.
Some of the processes never exit. In one run, 3 of the first 4 hung for more than an hour; in another, 1 of 2 hung for 17 minutes before I killed it.
Expected behavior
winapp run launches the app and returns its PID. If activation can't complete, it should fail with a clear error after a reasonable timeout rather than waiting forever.
Screenshots
N/A
OS Version and details
Windows 11 Enterprise 10.0.28000 (ARM64). Seen with winapp 0.7.1-based builds and with the build from #1032. Launching one at a time works, which is why tests/project-arch runs its fixtures one after another with a per-fixture timeout.
Activity
Stop winapp run hanging when several packaged launches deploy at once (…