Azure-Samples / communication-services-ui-library-maui

UI sample library on how to create .NET MAUI bindings
MIT License
13 stars 5 forks source link

Java.Lang.NullPointerException on call disconnect #42

Closed vovanb closed 5 days ago

vovanb commented 3 weeks ago

Periodically receive exception on Video call disconnect: `[gralloc4] @set_metadata: update dataspace from GM (0x00000000 -> 0x08010000) [SensorManager] unregisterListener [TelecomFramework] TelecomConnectionService: onAvailableCallEndpointsChanged TC@27_1: (CSW.sDc->CARSM.pM_UPDATE_SYSTEM_AUDIO_ROUTE)->CS.oACEC->H.CS.cASC(cMT/cast)@E-LGU [TelecomFramework] TelecomConnectionService: onAvailableCallEndpointsChanged - Cannot find conference TC@27_1: (CSW.sDc->CARSM.pM_UPDATE_SYSTEM_AUDIO_ROUTE)->CS.oACEC->H.CS.cASC(cMT/cast)@E-LGU

[TelecomFramework] TelecomConnectionService: onCallEndpointChanged - Cannot find conference TC@27_1: (CSW.sDc->CARSM.pM_UPDATE_SYSTEM_AUDIO_ROUTE)->CS.oCEC->H.CS.cASC(cMT/cast)@E-LGU [TelecomFramework] TelecomConnectionService: onMuteStateChanged TC@27_1 false: (CSW.sDc->CARSM.pM_UPDATE_SYSTEM_AUDIO_ROUTE)->CS.oMSC->H.CS.cASC(cMT/cast)@E-LGU [TelecomFramework] TelecomConnectionService: onMuteStateChanged - Cannot find conference TC@27_1: (CSW.sDc->CARSM.pM_UPDATE_SYSTEM_AUDIO_ROUTE)->CS.oMSC->H.CS.cASC(cMT/cast)@E-LGU

[TelecomFramework] TelecomConnectionService: onCallAudioStateChanged - Cannot find conference TC@27_1: (CSW.sDc->CARSM.pM_UPDATE_SYSTEM_AUDIO_ROUTE)->CS.cASC->H.CS.cASC(cMT/cast)@E-LGU [AndroidRuntime] Shutting down VM [AndroidRuntime] FATAL EXCEPTION: main [AndroidRuntime] Process: com..., PID: 12200 [AndroidRuntime] java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.TextureView.setTransform(android.graphics.Matrix)' on a null object reference [AndroidRuntime] at com.azure.android.communication.calling.VideoStreamView.lambda$ScaleTextureView$0$com-azure-android-communication-calling-VideoStreamView(VideoStreamView.java:135) [AndroidRuntime] at com.azure.android.communication.calling.VideoStreamView$$ExternalSyntheticLambda2.run(Unknown Source:4) [AndroidRuntime] at android.os.Handler.handleCallback(Handler.java:958) [AndroidRuntime] at android.os.Handler.dispatchMessage(Handler.java:99) [AndroidRuntime] at android.os.Looper.loopOnce(Looper.java:230) [AndroidRuntime] at android.os.Looper.loop(Looper.java:319) [AndroidRuntime] at android.app.ActivityThread.main(ActivityThread.java:8919) [AndroidRuntime] at java.lang.reflect.Method.invoke(Native Method) [AndroidRuntime] at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:578) [AndroidRuntime] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103) Java.Lang.NullPointerException: 'Attempt to invoke virtual method 'void android.view.TextureView.setTransform(android.graphics.Matrix)' on a null object reference'

Android 14-API 34 `

vovanb commented 2 weeks ago

@iaulakh can you please check that issue - please note that it happen if I press hangup very fast, right after call started

iaulakh commented 2 weeks ago

Hi @vovanb, We already fixed this issue in native SDK. I will let you know once SDK version is released, either this or next week. Then you can update SDK version. Thank you.

iaulakh commented 2 weeks ago

Please update to https://mvnrepository.com/artifact/com.azure.android/azure-communication-calling/2.11.0-beta.1.

vovanb commented 2 weeks ago

sorry @iaulakh how I can update SDK in existing project?

iaulakh commented 2 weeks ago

Please use implementation 'com.azure.android:azure-communication-calling:2.11.0-beta.1'.

vovanb commented 2 weeks ago

@iaulakh well, I modified attached downloadJarScript .txt to use azure-communication-calling-2.11.0-beta.1.aar then in CommunicationCallingSampleMauiApp.csproj and in AndroidMauiBindings\Android.CallingUI.Bindings\Android.CallingUI.Bindings.csproj changed to use azure-communication-calling-2.11.0-beta.1.aar

and then I got below errors on compile:

csuilib-maui\AndroidMauiBindings\Android.CallingUI.Bindings\obj\Debug\net8.0-android\generated\src\Com.Skype.Android.Video.HW.Extension.Decoder.VideoSampleDecoderExtension.cs(23,60,23,142): error CS0738: 'VideoSampleDecoderExtension.Factory' does not implement interface member 'IVideoDecoderExtensionFactory.Create(int)'. 'VideoSampleDecoderExtension.Factory.Create(int)' cannot implement 'IVideoDecoderExtensionFactory.Create(int)' because it does not have the matching return type of 'IVideoDecoderExtension'.
csuilib-maui\AndroidMauiBindings\Android.CallingUI.Bindings\obj\Debug\net8.0-android\generated\src\Com.Microsoft.DL.Video.Capture.Api.FpsRange.cs(20,60,20,89): error CS0535: 'FpsRange' does not implement interface member 'IComparable.CompareTo(Object)'
csuilib-maui\AndroidMauiBindings\Android.CallingUI.Bindings\obj\Debug\net8.0-android\generated\src\Com.Microsoft.DL.Video.Utils.Resolution.cs(20,93,20,122): error CS0535: 'Resolution' does not implement interface member 'IComparable.CompareTo(Object)'
csuilib-maui\AndroidMauiBindings\Android.CallingUI.Bindings\obj\Debug\net8.0-android\generated\src\Com.Skype.Android.Video.HW.Format.Resolution.cs(20,93,20,122): error CS0535: 'Resolution' does not implement interface member 'IComparable.CompareTo(Object)'
csuilib-maui\AndroidMauiBindings\Android.CallingUI.Bindings\obj\Debug\net8.0-android\generated\src\Com.Skype.Android.Video.HW.Extension.Encoder.VideoCameraEncoderExtension.cs(20,23,20,50): error CS0534: 'VideoCameraEncoderExtension' does not implement inherited abstract member 'AbstractVideoEncoderExtension.DoCreateEncoder(string?)'
csuilib-maui\AndroidMauiBindings\Android.CallingUI.Bindings\obj\Debug\net8.0-android\generated\src\Com.Skype.Android.Video.HW.Extension.Encoder.VideoSampleEncoderExtension.cs(20,23,20,50): error CS0534: 'VideoSampleEncoderExtension' does not implement inherited abstract member 'AbstractVideoEncoderExtension.DoCreateEncoder(string?)'
csuilib-maui\AndroidMauiBindings\Android.CallingUI.Bindings\obj\Debug\net8.0-android\generated\src\Com.Skype.Android.Video.HW.Extension.Encoder.VideoSampleEncoderExtension.cs(23,60,23,142): error CS0738: 'VideoSampleEncoderExtension.Factory' does not implement interface member 'IVideoEncoderExtensionFactory.Create(int)'. 'VideoSampleEncoderExtension.Factory.Create(int)' cannot implement 'IVideoEncoderExtensionFactory.Create(int)' because it does not have the matching return type of 'IVideoEncoderExtension'.
csuilib-maui\AndroidMauiBindings\Android.CallingUI.Bindings\obj\Debug\net8.0-android\generated\src\Com.Skype.Android.Video.HW.Extension.Encoder.VideoTextureEncoderExtension.cs(20,23,20,51): error CS0534: 'VideoTextureEncoderExtension' does not implement inherited abstract member 'AbstractVideoEncoderExtension.DoCreateEncoder(string?)'

should I update all packages ?

iaulakh commented 2 weeks ago

Hi @vovanb , Thank you for trying the latest beta SDK. We will attempt to reproduce the issue on our side and will share our findings and resolution.

iaulakh commented 2 weeks ago

Hi @vovanb Please try Commit.

vovanb commented 1 week ago

Hi @iaulakh If I keep in Android.CallingUI.Bindings.csproj Jars\azure-communication-ui-calling-1.10.0-beta.1.aar it compiled correct but crashed in run-time But I can not found that it using new azure-communication-calling-2.11.0-beta.1.aar - where It should be referenced? can you please provide your CommunicationCallingSampleMauiApp.csproj?

iaulakh commented 1 week ago

Hi @vovanb , Please look at commit.

image

vovanb commented 6 days ago

compiled ok - no crash so far

vovanb commented 5 days ago

@iaulakh reopened case again - I found another problem (maybe not related to last commit, since it was in previous too) that speaker is not selected all the time - sometime it is, but sometime I need to change speaker-android->speaker and then it is working Could you please help?

iaulakh commented 5 days ago

Hi @vovanb, Please open new issue as this is not related to crash.