BackgroundTask sample crash
See original GitHub issueHello, I have noticed some crashes in the BackgroundTask sample. It seems that with scenario 3 & 5 if you register, unregister, and then re-register, the app will crash with the following details:
System.Exception was unhandled by user code HResult=-2147023080 Message=Not enough quota is available to process this command. (Exception from HRESULT: 0x80070718) Source=Windows StackTrace: at Windows.ApplicationModel.Background.BackgroundTaskBuilder.Register() at BackgroundTask.BackgroundTaskSample.<RegisterBackgroundTask>d__18.MoveNext() — End of stack trace from previous location where exception was thrown — at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at BackgroundTask.ServicingCompleteTask.<RegisterBackgroundTask>d__3.MoveNext() InnerException:
Issue Analytics
- State:
- Created 8 years ago
- Comments:6
Top GitHub Comments
In case you want to re-register the task, don’t forget to unregister previously registered instances first. You can check if a task was previously registered by checking
var isAlreadyRegistered = Windows.ApplicationModel.Background.BackgroundTaskRegistration.AllTasks.Any(t => t.Value?.Name == yourtaskname);
This issue started reproduce again on Windows 1903 build 18362.175