Skip to content

Exception when disconnecting interaction (crashing the client) #20

@MatthiasKohl

Description

@MatthiasKohl

I have an issue that whenever a Vidyo interaction is disconnected, the client crashes.
This is due to the following:
The InteractionViewModel._participantCheckerTimer will still be running when the interaction disconnects.
Next time the timer times out, the VidyoServiceClient.GetParticipants function is called and will generate an exception in the integration service as well as in the client.
The function then returns null and then this line here will generate a NullReferenceException:
Context.Send(s => Participants.AddRange(participants, true), null);
Since the NullReferenceException is generated inside the synchronization context, Client/Desktop doesn't know what to do with it and crashes.
I quick-fixed that second exception by throwing an exception when VidyoServiceClient.GetParticipants returns null (which then gets handled normally), but that's really not the way to solve this.

Instead, the timer should be stopped inside a lock when the interaction disconnects and the ParticipantCheckerTimerOnElapsed function should have that same lock.

Also, the timer has 'AutoReset=true' but then gets stopped and started manually, that's a bit confusing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions