Blazor Server InputFile crashes process (0xffffffff) when debugging with VS 2026 Insiders + SDK 10.0.301
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 281
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Describe the bug
When debugging a Blazor Server app (.NET 10, InteractiveServer render mode) in Visual Studio 2026 Insiders, selecting a file via `` causes the entire process to crash with exit code `0xffffffff` (4294967295), with **no managed exception thrown and no error logged**.
The crash occurs specifically during the JS interop file-streaming sequence:
- `Blazor._internal.InputFile.readFileData` is invoked successfully
- `Blazor._internal.sendJSDataStream` begins
- Several `ReceiveJSDataChunk` hub invocations are received successfully
- The process exits with `0xffffffff` mid-stream, with no exception, no stack trace, and no `AppDomain.UnhandledException` / `TaskScheduler.UnobservedTaskException` handler firing
**Running the exact same app with "Start Without Debugging" (Ctrl+F5) works perfectly** — the file uploads and processes correctly every time. The crash only occurs when a debugger is attached (F5), even with "Enable JavaScript debugging for ASP.NET (Chrome, Edge, and IE)" already disabled in Tools > Options > Debugging > General.
### Expected Behavior
`InputFile.OnChange` should complete normally and the file stream should be readable via `OpenReadStream()` + `CopyToAsync()` regardless of whether a debugger is attached.
### Steps To Reproduce
```razor
@page "/test-upload"
@rendermode InteractiveServer
Test
@status
@code {
private string status = "waiting";
private async Task OnChange(InputFileChangeEventArgs e)
{
status = $"Got file: {e.File.Name}, {e.File.Size} bytes";
StateHasChanged();
using var stream = e.File.OpenReadStream(maxAllowedSize: 10 * 1024 * 1024);
using var ms = new MemoryStream();
await stream.CopyToAsync(ms);
status += $" — buffered {ms.Length} bytes";
StateHasChanged();
}
}
```
**Steps:**
1. Run the app with F5 (debugger attached)
2. Navigate to `/test-upload`
3. Select any file ~750KB (e.g. a `.gpx` file)
4. Process exits with code `0xffffffff` mid-stream — no exception logged
5. Repeat with Ctrl+F5 (no debugger) — works correctly every time
### Exceptions (if any)
`-1 (0xffffffff)` — `AppTest.exe (process XXXXX) exited with code -1 (0xffffffff)`
Output Window (last lines before crash, F5)
dbug: Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher[1]
Received hub invocation: InvocationMessage { InvocationId: "", Target: "ReceiveJSDataChunk", Arguments: [ 0, 9, System.Byte[], ], StreamIds: [ ] }.
[DEBUG] Read chunk: 17920 bytes, total read: 456192 bytes
C:...\AppTest.exe (process XXXXX) exited with code -1 (0xffffffff).
### .NET Version
10.0.301
### Anything else?
### Anything else?
**Environment:**
- Visual Studio 2026 Insiders
- .NET SDK 10.0.301 (released June 9, 2026)
- ASP.NET Core 10.0.9
- Project type: Blazor Web App, Interactive Server render mode
- "Enable JavaScript debugging for ASP.NET (Chrome, Edge, and IE)" — already **disabled**
- `AppDomain.CurrentDomain.UnhandledException` and `TaskScheduler.UnobservedTaskException` handlers registered in `Program.cs` — neither fires
- `SignalR` `MaximumReceiveMessageSize` set to 10MB — not a contributing factor (crash occurs at ~456KB on a 750KB file)
- Tried multiple alternative file-reading approaches (`IJSStreamReference`, base64 chunking via custom JS interop, JS-push via `[JSInvokable]`) — **all crash identically when debugging**, all work fine with Ctrl+F5. This strongly suggests the issue is in the debugger's interaction with the JS interop data-streaming pipeline (`Blazor._internal.sendJSDataStream`), not in application code.
**Workaround:** Use "Start Without Debugging" (Ctrl+F5) during development/testing of file upload features.
Contributor guide
Assessment
This issue has not been assessed yet.