Skip to content

Renderer.DispatchEventAsync throws null reference exception if event handler throws synchronously #11847

@SteveSandersonMS

Description

@SteveSandersonMS

From #11791

If an event handler throws synchronously, there's a bug in Renderer.DispatchEventAsync. The task variable is left with a null value, which then throws a nullref exception in GetErrorHandledTask.

The correct behavior would be to still treat this as a circuit-terminating exception, but report the real exception and don't have the nullref. Currently I believe it logs both the real exception and the subsequent nullref.

Metadata

Metadata

Assignees

Labels

DoneThis issue has been fixedarea-blazorIncludes: Blazor, Razor ComponentsbugThis issue describes a behavior which is not expected - a bug.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions