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

Intermittent errors when resolving game sessions #24

Open
jmderuty opened this issue Nov 10, 2024 · 0 comments
Open

Intermittent errors when resolving game sessions #24

jmderuty opened this issue Nov 10, 2024 · 0 comments
Labels
bug Something isn't working Gamefinder work items related to Stormancer.Server.Plugins.Gamefinder

Comments

@jmderuty
Copy link
Member

jmderuty commented Nov 10, 2024

Intermittently, an error occurs in the default game finder resolver. This is probably a concurrency issue.

  {
    "message": "An unhandled async exception occurred : 'System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (Instances cannot be resolved and nested lifetimes cannot be created from this LifetimeScope as it (or one of its parent scopes) has already been disposed.)\n ---> System.ObjectDisposedException: Instances cannot be resolved and nested lifetimes cannot be created from this LifetimeScope as it (or one of its parent scopes) has already been disposed.\n   at Autofac.Core.Lifetime.LifetimeScope.ThrowDisposedException()\n   at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(ResolveRequest& request)\n   at Autofac.Features.LazyDependencies.LazyRegistrationSource.<>c__DisplayClass3_0`1.<ResolveInstance>b__0()\n   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)\n   at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)\n   at System.Lazy`1.CreateValue()\n   at Stormancer.Server.Plugins.GameSession.GameSessions.Create(String template, String id, GameSessionConfiguration config, CancellationToken cancellationToken) in /_/src/Stormancer.Plugins/GameSession/Stormancer.Server.Plugins.GameSession/IGameSessions.cs:line 140\n   at Stormancer.Server.Plugins.GameFinder.PartyGameFinderResolver.ResolveGame(IGameResolverContext gameCtx) in /_/src/Stormancer.Plugins/GameFinder/Stormancer.Server.Plugins.GameFinder/PartyGameFinder/PartyGameFinderResolver.cs:line 104\n   at Stormancer.Server.Plugins.GameFinder.GameFinderService.ResolveGameFound(IGameCandidate gameCandidate, Dictionary`2 waitingParties, IGameFinderResolver resolver, CancellationToken cancellationToken) in /_/src/Stormancer.Plugins/GameFinder/Stormancer.Server.Plugins.GameFinder/GameFinderService.cs:line 483\n   at Stormancer.Server.Plugins.GameFinder.GameFinderService.ResolveGameFound(IGameCandidate gameCandidate, Dictionary`2 waitingParties, IGameFinderResolver resolver, CancellationToken cancellationToken) in /_/src/Stormancer.Plugins/GameFinder/Stormancer.Server.Plugins.GameFinder/GameFinderService.cs:line 615\n   --- End of inner exception stack trace ---'",
    "data": {
      "content": {
        "Type": "AggregateException",
        "Message": "A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (Instances cannot be resolved and nested lifetimes cannot be created from this LifetimeScope as it (or one of its parent scopes) has already been disposed.)",
        "Frames": [],
        "InnerExceptions": [
          {
            "Type": "ObjectDisposedException",
            "Message": "Instances cannot be resolved and nested lifetimes cannot be created from this LifetimeScope as it (or one of its parent scopes) has already been disposed.",
            "Frames": [ "   at Autofac.Core.Lifetime.LifetimeScope.ThrowDisposedException()", "   at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(ResolveRequest& request)", "   at Autofac.Features.LazyDependencies.LazyRegistrationSource.<>c__DisplayClass3_0`1.<ResolveInstance>b__0()", "   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)", "   at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)", "   at System.Lazy`1.CreateValue()", "   at Stormancer.Server.Plugins.GameSession.GameSessions.Create(String template, String id, GameSessionConfiguration config, CancellationToken cancellationToken) in /_/src/Stormancer.Plugins/GameSession/Stormancer.Server.Plugins.GameSession/IGameSessions.cs:line 140", "   at Stormancer.Server.Plugins.GameFinder.PartyGameFinderResolver.ResolveGame(IGameResolverContext gameCtx) in /_/src/Stormancer.Plugins/GameFinder/Stormancer.Server.Plugins.GameFinder/PartyGameFinder/PartyGameFinderResolver.cs:line 104", "   at Stormancer.Server.Plugins.GameFinder.GameFinderService.ResolveGameFound(IGameCandidate gameCandidate, Dictionary`2 waitingParties, IGameFinderResolver resolver, CancellationToken cancellationToken) in /_/src/Stormancer.Plugins/GameFinder/Stormancer.Server.Plugins.GameFinder/GameFinderService.cs:line 483", "   at Stormancer.Server.Plugins.GameFinder.GameFinderService.ResolveGameFound(IGameCandidate gameCandidate, Dictionary`2 waitingParties, IGameFinderResolver resolver, CancellationToken cancellationToken) in /_/src/Stormancer.Plugins/GameFinder/Stormancer.Server.Plugins.GameFinder/GameFinderService.cs:line 615" ],
            "InnerExceptions": []
          }
        ]
      },
      "app": "/darktales/live-1-00-04/7308ada5-50fb-4b86-8ab6-f32a7b5ea0e4/4?"
    }
  }
@jmderuty jmderuty added bug Something isn't working Gamefinder work items related to Stormancer.Server.Plugins.Gamefinder labels Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Gamefinder work items related to Stormancer.Server.Plugins.Gamefinder
Projects
None yet
Development

No branches or pull requests

1 participant