Author Message
DiegoChacón2
Joined: Nov 10, 2016
Messages: 8
Offline
Hello,


I'm creating a Windows client that requires basic telephony functions. Video support is mandatory.

In this application, MainWindow is used for parameter configuration and SDK initialization. In another window (CallServiceWin) the call events and video rendering are displayed.

The problem I'm having is that after 3 or more video calls the following error shows up during a call:



System.InvalidOperationException occurred
HResult=0x80131509
Message=The calling thread cannot access this object because a different thread owns it.
Source=WindowsBase
StackTrace:
at System.Windows.Threading.Dispatcher.VerifyAccess()
at System.Windows.Freezable.WritePreamble()
at System.Windows.Interop.D3DImage.Lock()
at Avaya.ClientServices.Media.VideoRenderer2.!VideoRenderer2()
at Avaya.ClientServices.Media.VideoRenderer2.Dispose(Boolean A_0)
at Avaya.ClientServices.Media.VideoRenderer2.Finalize()


The following screenshot also displays the error:
image


How should I manage thread-safe video call events and UI handling? Is there any set of best practices or recomendations regarding thread-safe CallManager event processing?

Thanks in advance.

Nastya
Joined: Dec 20, 2016
Messages: 4
Offline
Hi DiegoChacón2,
Our technical team is currently investigating your problem.
Nastya
Joined: Dec 20, 2016
Messages: 4
Offline
Hi DiegoChacón2,
Could you attach logs for you app for this scenario please?
If you don't have such opportunity in your app you can try to reproduce it with SampleApp. If it's reproducible with SampleApp you need to turn on debug settings to collect logs using the following instruction:


To enable logging in Windows SampleApp please make following changes in SDKManager.cs:

1) Set debug level
[Line 119] Client.LogLevel = Avaya.ClientServices.LogLevel.Debug;
2) Set log callback (uncomment line)
[Line 120] Client.LogMessage += LogMessage;
3) Enable writing to console with timestamps (uncomment line)
[Line 334] Console.WriteLine("\n" + DateTime.Now.ToString(("MM-dd-yyyy hh:mm:ss")) + ": " + Level + " : " + Tag + " : " + Message);
4) Disable writing to console without timestamps (comment line)
[Line 335] //Console.WriteLine("\n"+ Level + " : " + Tag + " : " + Message);
5) Rebuild SampleApp

Then we can collect logs:
1) run following command in shell:
CommunicationSampleApp.exe >SampleApp.log
2) Reproduce issue then close SampleApp
3) Send SampleApp.log file to our team
Go to:   
Mobile view