Skip to content

Exception on player disconnect/crash when a Dialog window is active #433

Description

@plsegott
[SampSharp:ERROR] Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.InvalidOperationException: An attempt was made to transition a task to a final state when it had already completed.
   at System.Threading.Tasks.TaskCompletionSource`1.SetResult(TResult result)
   at SampSharp.Entities.SAMP.DialogService.<>c__DisplayClass4_0`1.<Show>g__Handler|0(DialogResult result)
   at SampSharp.Entities.SAMP.DialogSystem.OnPlayerDisconnect(VisibleDialog player, DisconnectReason _)
   at lambda_method59(Closure, Object, Object[], IServiceProvider, IEntityManager)
   at SampSharp.Entities.EventService.<>c__DisplayClass11_0.<CreateInvoker>b__0(Object instance, EventContext eventContext)
   at SampSharp.Entities.EventService.Invoke(EventContext context)
   at SampSharp.Entities.SAMP.PlayerDisconnectMiddleware.Invoke(EventContext context, IEntityManager entityManager)
   at lambda_method68(Closure, Object, EventContext, IServiceProvider)
   at SampSharp.Entities.EcsBuilderUseMiddlewareExtensions.<>c__DisplayClass3_1.<UseMiddleware>b__2(EventContext context)
   at SampSharp.Entities.EventService.<>c__DisplayClass12_0.<BuildInvoke>b__0(Object[] args)
   at InvokeStub_<>c__DisplayClass12_0.<BuildInvoke>b__0(Object, Object, IntPtr*)
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
   --- End of inner exception stack trace ---
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at SampSharp.Core.Callbacks.Callback.Invoke(Byte[] buffer, Int32 startIndex)
   at SampSharp.Core.HostedGameModeClient.PublicCall(String name, IntPtr data, Int32 length)
  

Activity

  1. changed the title [-]Exception when a player disconnects/crashes when a Dialog window is active.[/-] [+]Exception on player disconnect/crash when a Dialog window is active[/+] on Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions