-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
Milestone
Description
When I attempt to test my project end-to-end from the UI down to the SQL database and back out, I see two NullReferenceException entries in the Output window, and the Visual Studio Debug Console, and RAM usage shoots up to 25GB.
To Reproduce
Steps to reproduce the behavior:
- Running 3.0.0-preview5.19227.x on all components and packages
- Pull the code in this branch
- Setup a database and apply the
Vxxx__Blogs.sqlscript. Insert a blog entry with keytitle-1. - Fulfill
appsettings.jsonconfig for connection string. - Run app, click on "Blogs" nav button and then on "Title 1" entry.
- Check Output window and diagnostics pane.
The output I see is
System.NullReferenceException: Object reference not set to an instance of an object.
at helloserve.com.Pages.Blog.BuildRenderTree(RenderTreeBuilder builder)
at Microsoft.AspNetCore.Components.ComponentBase.<.ctor>b__5_0(RenderTreeBuilder builder)
at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment)
at Microsoft.AspNetCore.Components.Rendering.Renderer.RenderInExistingBatch(RenderQueueEntry renderQueueEntry)
at Microsoft.AspNetCore.Components.Rendering.Renderer.ProcessRenderQueue()
Microsoft.AspNetCore.Components.Server.ComponentHub: Warning: Unhandled Server-Side exception
System.NullReferenceException: Object reference not set to an instance of an object.
at helloserve.com.Pages.Blog.BuildRenderTree(RenderTreeBuilder builder)
at Microsoft.AspNetCore.Components.ComponentBase.<.ctor>b__5_0(RenderTreeBuilder builder)
at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment)
at Microsoft.AspNetCore.Components.Rendering.Renderer.RenderInExistingBatch(RenderQueueEntry renderQueueEntry)
at Microsoft.AspNetCore.Components.Rendering.Renderer.ProcessRenderQueue()
Microsoft.AspNetCore.Routing.EndpointMiddleware: Information: Executed endpoint '/_blazor'
Microsoft.AspNetCore.Hosting.Diagnostics: Information: Request finished in 4799.7255000000005ms 101
'helloserve.com.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\3.0.0-preview5-27626-15\System.Diagnostics.Process.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The thread 0x33a4 has exited with code 0 (0x0).
The thread 0x22c4 has exited with code 0 (0x0).
The program '[20408] helloserve.com.exe' has exited with code -1 (0xffffffff).
Expected behavior
When you switch the solution configuration to UITest, a compiler directive in Startup.cs swaps out a mock service for the page. This hard coded blog post entry is loaded and rendered correctly by the Blazor component.
I might be doing something wrong elsewhere in my stack, but I find it strange that I would see it manifest in the page and not earlier. The memory usage is a big concern though...