Comments (8)
@JEnrightDev Could you check out my source code and run against that instead of the DLLs?
I'd like you to change the code like so
- In DisposableCallback's constructor create an instance of StackTrace
- Store it in a private member.
3: In the ~DisposableCallback finalizer could you add ThatStackTrace.ToString() into the exception description, and then send me the call stack?
That would help a lot!
from fluxor.
The Disposable callback is being created from here: https://github.com/mrpmorris/Fluxor/blob/master/Source/Fluxor.Blazor.Web/Components/FluxorComponent.cs#L29
Stack trace is as follows:
at Fluxor.DisposableCallback..ctor(Action action) in D:\source\repos\Fluxor\Source\Fluxor\DisposableCallback.cs:line 24
at Fluxor.Blazor.Web.Components.StateSubscriber.Subscribe(Object subject, Action`1 callback) in D:\source\repos\Fluxor\Source\Fluxor.Blazor.Web\Components\StateSubscriber.cs:line 37
at Fluxor.Blazor.Web.Components.FluxorComponent.OnInitialized() in D:\source\repos\Fluxor\Source\Fluxor.Blazor.Web\Components\FluxorComponent.cs:line 29
at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
at Microsoft.AspNetCore.Components.ComponentBase.SetParametersAsync(ParameterView parameters)
at Microsoft.AspNetCore.Components.Rendering.ComponentState.SetDirectParameters(ParameterView parameters)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewComponentFrame(DiffContext& diffContext, Int32 frameIndex)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewSubtree(DiffContext& diffContext, Int32 frameIndex)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InsertNewFrame(DiffContext& diffContext, Int32 newFrameIndex)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndexExcl, Int32 newStartIndex, Int32 newEndIndexExcl)
at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.ComputeDiff(Renderer renderer, RenderBatchBuilder batchBuilder, Int32 componentId, ArrayRange`1 oldTree, ArrayRange`1 newTree)
at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderInExistingBatch(RenderQueueEntry renderQueueEntry)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()
at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessPendingRender()
at Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer.ProcessPendingRender()
at Microsoft.AspNetCore.Components.RenderTree.Renderer.AddToRenderQueue(Int32 componentId, RenderFragment renderFragment)
at Microsoft.AspNetCore.Components.ComponentBase.StateHasChanged()
at Microsoft.AspNetCore.Components.ComponentBase.CallOnParametersSetAsync()
at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
at Microsoft.AspNetCore.Components.ComponentBase.SetParametersAsync(ParameterView parameters)
at Microsoft.AspNetCore.Components.Rendering.ComponentState.SetDirectParameters(ParameterView parameters)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderRootComponentAsync(Int32 componentId, ParameterView initialParameters)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderRootComponentAsync(Int32 componentId, ParameterView initialParameters)
at Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer.AddComponentAsync(Type componentType, ParameterView parameters, String domElementSelector)
at Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost.<>c__DisplayClass35_0.<<InitializeAsync>b__0>d.MoveNext()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost.<>c__DisplayClass35_0.<InitializeAsync>b__0()
at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.<>c.<<InvokeAsync>b__9_0>d.MoveNext()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.<>c.<InvokeAsync>b__9_0(Object state)
at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteSynchronously(TaskCompletionSource`1 completion, SendOrPostCallback d, Object state)
at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteSynchronouslyIfPossible(SendOrPostCallback d, Object state)
at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.InvokeAsync(Func`1 asyncAction)
at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContextDispatcher.InvokeAsync(Func`1 workItem)
at Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost.InitializeAsync(CancellationToken cancellationToken)
at Microsoft.AspNetCore.Components.Server.ComponentHub.StartCircuit(String baseUri, String uri, String serializedComponentRecords)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.AspNetCore.Components.Server.ComponentHub.StartCircuit(String baseUri, String uri, String serializedComponentRecords)
at lambda_method(Closure , Object , Object[] )
at Microsoft.Extensions.Internal.ObjectMethodExecutor.ExecuteAsync(Object target, Object[] parameters)
at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher`1.ExecuteHubMethod(ObjectMethodExecutor methodExecutor, THub hub, Object[] arguments)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher`1.ExecuteHubMethod(ObjectMethodExecutor methodExecutor, THub hub, Object[] arguments)
at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher`1.<>c__DisplayClass13_0.<<Invoke>g__ExecuteInvocation|0>d.MoveNext()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher`1.<>c__DisplayClass13_0.<Invoke>g__ExecuteInvocation|0()
at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher`1.Invoke(HubMethodDescriptor descriptor, HubConnectionContext connection, HubMethodInvocationMessage hubMethodInvocationMessage, Boolean isStreamResponse, Boolean isStreamCall)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher`1.Invoke(HubMethodDescriptor descriptor, HubConnectionContext connection, HubMethodInvocationMessage hubMethodInvocationMessage, Boolean isStreamResponse, Boolean isStreamCall)
at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher`1.ProcessInvocation(HubConnectionContext connection, HubMethodInvocationMessage hubMethodInvocationMessage, Boolean isStreamResponse)
at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher`1.DispatchMessageAsync(HubConnectionContext connection, HubMessage hubMessage)
at Microsoft.AspNetCore.SignalR.HubConnectionHandler`1.DispatchMessagesAsync(HubConnectionContext connection)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.ExecutionContextCallback(Object s)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.ExecuteFromThreadPool(Thread threadPoolThread)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
from fluxor.
After further digging, this is 100% a PEBKAC issue.
In my "Index", I was overriding the OnIntitializedAsync method, but calling base.OnInitialized() instead of OnInitializedAsync, which skips the component initialization.
I only managed to catch this by looking through the source and slowly piecing it together. Maybe a mechanism should be added to make this obvious, or a change in documentation?
from fluxor.
Ah, well done!
What improvements do you have in mind?
from fluxor.
I'm not quite sure. But maybe passing along something like a "tag" or something to the DisposableCallback so that the exception message can be made clearer about where the "owner" of the callback is. That, plus a little extra documentation about that exception in particular would probably help quite a bit.
from fluxor.
It's really just a helper class that I didn't expect anyone to use. Your tag idea is pretty good though. Shame I can't have it create a StackTrace only when compiling in Debug.
from fluxor.
Well, that idea works if you're willing to compile from source to debug.
#if DEBUG
_stackTrace = new StackTrace();
#endif
from fluxor.
Yeah, but I don't release debug binaries. That's why it's a shame :)
from fluxor.
Related Issues (20)
- StoreInitializer not working in Balzor .net 8 HOT 4
- Fluxor.Blazor.Web.Components.FluxorComponent does not work in .NET 8 HOT 2
- Fluxor dont work with new template .Net 8 and InteractiveServerRenderMode HOT 2
- Fluxor breaks ErrorBoundary in Blazor Wasm HOT 2
- Fluxor Redux Dev Tools eating ram HOT 5
- Fluxor.Blazor.Web.ReduxDevTools requires script-src 'unsafe-eval' on CSP HOT 1
- Subscribing external events HOT 2
- Blazor server app in used Redux(Fluxor) in asp .net core error Unable to resolve service for type 'Fluxor.IFeature` while attempting to activate 'Fluxor.State` HOT 2
- Dispatch from Polly HOT 4
- Dispatching action in effect - running orders HOT 1
- Fluxor does not seem to work with the new .NET 8 Blazor Web App template HOT 2
- Deadlock when dispatching from store/feature events HOT 3
- Reducer not getting invoked in .NET 8 Blazor HOT 4
- Test case for dispatcher failure in .NET8 with new render modes HOT 6
- 🤑 Add a sponsor button
- Fluxor not updating UI after state change HOT 4
- Getting DisposableCallback after app has been running for a while HOT 5
- .NET MAUI Hybrid App Demo HOT 2
- Enabling Fluxor for lazy-loaded assemblies HOT 3
- Blazor dot net 8 server interactive component does not re-render when state changes via redux tools time travel HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fluxor.