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

ObjectDisposedException in AppBuilderExtensions #273

Closed
OracPrime opened this issue Feb 1, 2021 · 3 comments
Closed

ObjectDisposedException in AppBuilderExtensions #273

OracPrime opened this issue Feb 1, 2021 · 3 comments

Comments

@OracPrime
Copy link

There is a catch clause in AppBuilderExtensions.cs:

            catch (ObjectDisposedException)
            {
               // There's a chance the scoped service provider is already disposed when we get to here, so fall back to global provider.
               return ActivatorUtilities.CreateInstance(provider, type, args ?? new object[] { });
            }

This seems to be happening all the time for me - which clearly I can ignore, but I wonder if it is a symptom of something else. In particular it seems to go off when a Reactive property Subscribe target is called. The property is set up in the constructor

AddProperty<IReadOnlyCollection<long>>("CpuHistory", Array.Empty<long>()).SubscribeTo(cluster.CpuHistoryStream).Subscribe(_ => PushUpdates());

And within the PushUpdates the error occurs.
Am I doing something wrong, or is this an area where the code needs to be improved, or is it a "live with it" scenario?

Thanks.

@dsuryd
Copy link
Owner

dsuryd commented Feb 2, 2021

The exception typically happens when the view is closed on the client while the server is in the process of pushing updates. Does this describe your situation? In any case, it's indeed an area where the code can be improved.

@OracPrime
Copy link
Author

No - I don't believe I have any view closures. This is one browser, one app, clean start to stable.

@dsuryd
Copy link
Owner

dsuryd commented Mar 19, 2021

Fixed in v5.0.

@dsuryd dsuryd closed this as completed Mar 19, 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

2 participants