Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core - ConcurrentMethodRunnerQueue.Enqueue InvalidOperationException #3639

Closed
amaitland opened this issue Jun 25, 2021 · 0 comments
Closed
Assignees
Milestone

Comments

@amaitland
Copy link
Member

Hey
We see a crash from our end-users.
Wasn't able to reproduce this locally yet so no information other than the stack trace
CefSharp version - 90.6.50

System.InvalidOperationException: Start may not be called on a task that has completed.\r\n at System.Threading.Tasks.Task.Start(TaskScheduler scheduler)\r\n at CefSharp.Internals.ConcurrentMethodRunnerQueue.Enqueue(MethodInvocation methodInvocation)\r\n at CefSharp.Internals.ClientAdapter.OnProcessMessageReceived(ClientAdapter* , scoped_refptr* browser, scoped_refptr* frame, cef_process_id_t source_process, scoped_refptr* message)

Originally posted by @eadan-y in #3638

amaitland added a commit that referenced this issue Jun 25, 2021
…eption

When ConcurrentMethodRunnerQueue.Dispose is called from a different thread it appears that
the CancellationTokenSource is cancelled (via Dispose) inbetween creation of the Task
and calling Task.Start(TaskScheduler).

Switch from using Task constructor and Task.Start to the preferred Task.Run method.

Added additional unit tests.

Issue #3639
amaitland added a commit that referenced this issue Jun 27, 2021
…tion

Test to validate that MethodRunnerQueue doesn't have the same issues as #3639
amaitland added a commit that referenced this issue Jun 27, 2021
…eption

When ConcurrentMethodRunnerQueue.Dispose is called from a different thread it appears that
the CancellationTokenSource is cancelled (via Dispose) inbetween creation of the Task
and calling Task.Start(TaskScheduler).

Switch from using Task constructor and Task.Start to the preferred Task.Run method.

Added additional unit tests.

Issue #3639
amaitland added a commit that referenced this issue Jun 27, 2021
…tion

Test to validate that MethodRunnerQueue doesn't have the same issues as #3639
@amaitland amaitland added this to the 91.1.x milestone Jun 27, 2021
@amaitland amaitland self-assigned this Jun 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant