Skip to content
This repository has been archived by the owner on Mar 22, 2022. It is now read-only.

Cannot stop a call and start a new call #375

Closed
astaikos316 opened this issue May 24, 2020 · 9 comments · Fixed by #430
Closed

Cannot stop a call and start a new call #375

astaikos316 opened this issue May 24, 2020 · 9 comments · Fixed by #430
Assignees

Comments

@astaikos316
Copy link

astaikos316 commented May 24, 2020

Describe the bug
Have built an application in unity using the master branch where i start a call between 2 peers and everything works fine. I then end the call and try to start a new call and I get the following error when trying to start the new call and no video or audio starts to pass but connection is established:

ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <437ba245d8404784b9fbab9b439ac908>:0)
System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <437ba245d8404784b9fbab9b439ac908>:0)
System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <437ba245d8404784b9fbab9b439ac908>:0)
Microsoft.MixedReality.WebRTC.Unity.PeerConnection.StartConnection () (at Assets/Microsoft.MixedReality.WebRTC.Unity/Scripts/PeerConnection.cs:912)

In my project I call PeerConnection.StartConnection() to start the call and PeerConnection.Uninitialize() and PeerConnection.Close() to stop the connection.

To Reproduce
Start a Peer to Peer call. End a Peer to Peer call and then try to start a new peer to peer call.

Expected behavior
Should be able to start and stop calls without having to fully quit application

Environment

  • Platform: Unity Editor to WIndows Standalone build
  • Architecture: Unity Editor is x64 on Windows and build is x64
  • Unity version (if applicable): 2019.3.9f1
  • Target device: Windows Desktop
@astaikos316
Copy link
Author

@djee-ms @fibann just wondering if anyone has had a change to dig into this issue a little deeper. I have not be able to come to any conclusions through my attempts of troubleshooting.

@fibann
Copy link
Member

fibann commented Jun 10, 2020

@astaikos316 no updates for the moment, but this is on the backlog for 2.0 so we should have a look at this soon.

@fibann
Copy link
Member

fibann commented Jul 21, 2020

@astaikos316 in reply to #343 (comment): this should be done now, the relevant code has been refactored (you now start/stop a connection by enabling/disabling the PeerConnection component).

@astaikos316
Copy link
Author

@fibann I have updated to the recent 2.0 preview release and trying this out. I am having an issue between a Hololens 2 and a PC build. When I start a call from the PC to Hololens, everything works well. However when I start a calls from the Hololens 2, I get an "cannot apply remote description object not initialized" error on the Hololens and then subsequent calls fail and the Hololens 2 app crashes. I am getting the log message from an In-Game Debug Console window on the Hololens so I cannot get much detail about what "object" is not initializing. Any ideas of where I should look?

@fibann
Copy link
Member

fibann commented Aug 4, 2020

@astaikos316 could you open a new issue filling in platform details, SDP messages, etc.?

@astaikos316
Copy link
Author

@fibann Just opened new issue #498

@astaikos316
Copy link
Author

@fibann @djee-ms I have been working with 2.0 release and have found that starting/stopping a connection by enabling/disabling the PeerConnection component starts a new call, however the video is not sent from either endpoint but the audio is sent between them.

@fibann
Copy link
Member

fibann commented Aug 17, 2020

@astaikos316 could you open a new issue filling in platform details, SDP messages, etc.? Things that would be useful:

  • comparing SDP messages from the first connection attempt to the ones from the second attempt and search for differences among the video lines
  • put a breakpoint in the (I420A|Argb32)VideoFrameReady handlers on the receiving side and checking if frames are being received or no
  • run a debug build of MR-WebRTC on both hosts, get the WebRTC debug logs and look for something suspicious

FWIW I did a quick test with the VideoChatDemo Unity sample and TestAppUWP and everything worked fine.

@astaikos316
Copy link
Author

@fibann I just opened Issue #535. Provided a little more detail after running some experiments this morning.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants