You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello everyone, and thank you in advance for taking the time to read my question.
I have a situation I can’t seem to resolve with the MAUI Toolkit CameraView package, so I’m hoping someone from this community might be able to help me.
Here’s the issue: I’m using the CommunityToolkit.Maui.Camera package to have a constant camera feed and take pictures. I’ve set everything up correctly, and this part of the app works perfectly in Debug mode, both on iOS and Android. However, when running the app in Release mode on either platform, trying to access the page where the CameraView starts does nothing. The app doesn’t crash, no error appears—simply, when pressing the button that in Debug opens the CameraView page, nothing happens.
Given this, and after searching for information about the problem, I tried several configuration changes in the .csproj file, such as disabling the linker, changing the AOT mode, disabling R8 in Android, etc., but none of them worked.
I also created a test project where the only thing I added was the CommunityToolkit.Maui.Camera package in the main page, just to rule out issues in my full project (like incompatibilities that could be breaking the CameraView). But with this “blank” project the same thing happens: in Debug the app runs without issues and the CameraView is shown as soon as the app starts, but in Release mode, after the splash screen, the app closes automatically.
I’m linking that test project here so the issue can be reproduced.
As a last attempt to figure out what’s happening, I ran an adb logcat analysis at the moment of the crash, but the only relevant info I found was:
AndroidRuntime: Process: com.mycompany.TestCameraView, PID: 1082
AndroidRuntime: at TestCameraView.MainPage.InitializeComponent + 0x182(Unknown Source)
AndroidRuntime: at TestCameraView.MainPage..ctor + 0x6(Unknown Source)
I wasn’t able to interpret whether this points to the root cause.
According to ChatGPT (since I don't have the knowledge to interpret this information), the crash happens before my C# code executes, so it's not permissions or initialization: it's that the linker/AOT has removed or modified something that the XAML expects to find.
If anyone has experienced this issue (or something similar), I’d really appreciate any help or guidance.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone, and thank you in advance for taking the time to read my question.
I have a situation I can’t seem to resolve with the MAUI Toolkit CameraView package, so I’m hoping someone from this community might be able to help me.
Here’s the issue: I’m using the CommunityToolkit.Maui.Camera package to have a constant camera feed and take pictures. I’ve set everything up correctly, and this part of the app works perfectly in Debug mode, both on iOS and Android. However, when running the app in Release mode on either platform, trying to access the page where the CameraView starts does nothing. The app doesn’t crash, no error appears—simply, when pressing the button that in Debug opens the CameraView page, nothing happens.
Given this, and after searching for information about the problem, I tried several configuration changes in the .csproj file, such as disabling the linker, changing the AOT mode, disabling R8 in Android, etc., but none of them worked.
I also created a test project where the only thing I added was the CommunityToolkit.Maui.Camera package in the main page, just to rule out issues in my full project (like incompatibilities that could be breaking the CameraView). But with this “blank” project the same thing happens: in Debug the app runs without issues and the CameraView is shown as soon as the app starts, but in Release mode, after the splash screen, the app closes automatically.
I’m linking that test project here so the issue can be reproduced.
As a last attempt to figure out what’s happening, I ran an
adb logcat
analysis at the moment of the crash, but the only relevant info I found was:I wasn’t able to interpret whether this points to the root cause.
According to ChatGPT (since I don't have the knowledge to interpret this information), the crash happens before my C# code executes, so it's not permissions or initialization: it's that the linker/AOT has removed or modified something that the XAML expects to find.
If anyone has experienced this issue (or something similar), I’d really appreciate any help or guidance.
Thanks again!
Beta Was this translation helpful? Give feedback.
All reactions