Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camera view with .NET 9 crashes on Android #2438

Open
2 tasks done
jacobilsoe opened this issue Jan 13, 2025 · 0 comments
Open
2 tasks done

Camera view with .NET 9 crashes on Android #2438

jacobilsoe opened this issue Jan 13, 2025 · 0 comments
Labels
bug Something isn't working unverified

Comments

@jacobilsoe
Copy link

jacobilsoe commented Jan 13, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Did you read the "Reporting a bug" section on Contributing file?

Current Behavior

There is an existing bug for this but it was closed and is now locked for updating: #2377

I have the exact same issue as described in that bug so I suspect it might not have been properly fixed.

My stacktrace:

01-13 13:49:15.312 F/mono-rt ( 5558): [ERROR] FATAL UNHANDLED EXCEPTION: System.MissingMethodException: Method not found: void AndroidX.Camera.Core.Preview.SetSurfaceProvider(AndroidX.Camera.Core.Preview/ISurfaceProvider)
01-13 13:49:15.312 F/mono-rt ( 5558): at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[d__14](d__14& stateMachine)
01-13 13:49:15.312 F/mono-rt ( 5558): at CommunityToolkit.Maui.Core.CameraManager.StartUseCase(CancellationToken token)
01-13 13:49:15.312 F/mono-rt ( 5558): at CommunityToolkit.Maui.Core.CameraManager.<>c__DisplayClass41_0.<b__0>d.MoveNext() in /_/src/CommunityToolkit.Maui.Camera/CameraManager.android.cs:line 164
01-13 13:49:15.312 F/mono-rt ( 5558): --- End of stack trace from previous location ---
01-13 13:49:15.312 F/mono-rt ( 5558): at System.Threading.Tasks.Task.<>c.b__128_0(Object state)
01-13 13:49:15.312 F/mono-rt ( 5558): at Android.App.SyncContext.<>c__DisplayClass2_0.b__0() in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.App/SyncContext.cs:line 36
01-13 13:49:15.312 F/mono-rt ( 5558): at Java.Lang.Thread.RunnableImplementor.Run() in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Java.Lang/Thread.cs:line 37
01-13 13:49:15.312 F/mono-rt ( 5558): at Java.Lang.IRunnableInvoker.n_Run(IntPtr jnienv, IntPtr native__this) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/obj/Release/net9.0/android-35/mcw/Java.Lang.IRunnable.cs:line 59
01-13 13:49:15.312 F/mono-rt ( 5558): at Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PP_V(_JniMarshal_PP_V callback, IntPtr jnienv, IntPtr klazz) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:line 22

Expected Behavior

No crash

Steps To Reproduce

See Current Behavior

Link to public reproduction project repository

https://github.com/MarianHristov92/MauiCameraViewNet9

Environment

- .NET MAUI CommunityToolkit:10.0.0
- .NET MAUI CommunityToolkit.Maui.Camera: 2.0.0
- OS: ANDROID 15
- .NET MAUI: 9.0.22

Anything else?

No response

@jacobilsoe jacobilsoe added bug Something isn't working unverified labels Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unverified
Projects
None yet
Development

No branches or pull requests

1 participant