-
Notifications
You must be signed in to change notification settings - Fork 153
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
MAUI app crashes when scanner invoked on iPhone 15 Pro Max (iOS 17.2.1) #172
Comments
(* sigh *) And just like that, it stopped crashing. The scanner control isn't rendered, mind you, but at least it doesn't crash. The odd thing is, even though the control isn't rendering, it's there, because I have Hot Reload active and when I modify the XAML to add IsTorchOn="True" and hit save, the light on my phone comes on and goes off if I change the value to "False". But no control is visible on the UI, Things still work fine in the Android emulator, so I just need to figure out why the control won't render on the UI on my iPhone. So close. :) |
Oh but wait, there's more. Turns out that while the control appears to not be responsive to HorizontalOptions or VerticalOptions, it is responsive to WidthRequest and HeightRequest. While in the Android emulator, no such properties were needed, if you don't set those values, the control is not visible on the iPhone. So now I have a visible control that seems to scan ok. Still no idea why it stopped crashing, but progress. |
Have you tried using a |
For those who come here looking for help regarding using the scanner view on iOS:
I am almost 100% sure this is the cause of the crash. I managed to get the Xamarin version working as well after adding this. I would also suggest you set the "WidthRequest" and "HeightRequest" on the barcode reader control and give them some sane values (I used 360 and 480) to start. This should hopefully let you at least see something and verify the control is working.
I have not, but I may play around with that. I have things working now, so I'm content to leave things in a stack layout for now. |
Hello, I am facing same issue and this crash only occurs as soon as I install app on iOS and click on "Allow Camera access" and app crashes. if I uninstall app and then re-try to give permission it crashes. How to resolve this? my code is as below, in .xaml file
and in .cs file
I have given permissions in info.list file as mentioned here https://github.com/Redth/ZXing.Net.Maui |
This seems to be the same issue using the old library on my old phone. I have the generic MAUI app you get when creating a new MAUI app in Visual Studio. I added a button on the main page to create and display a new page that contains the scanner control, and that page sets the control options in the constructor and waits for a scan. Before adding the button and new page, I verified the app runs on the android emulator as well as my iPhone. Then I added the ZXing package, button and new page. I then re-verified the app compiles and runs on the android emulator. It scans my test QR code without issue. The app runs on the iPhone right up until I click the button to invoke the scanner, then it crashes. I see that others appear to have at least been able to invoke the scanner, so I'm not sure what's up. Perhaps a manifest provisioning issue? Particulars below:
==========================================================================
Windows 11 Home (x64)
Visual Studio 2022
iPhone 15 Pro Max
iOS v17.2.1
ZXing.Net.Maui.Controls 0.4.0
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
=================================================================
=================================================================
Native Crash Reporting
=================================================================
Native stacktrace:
=================================================================
0x10066d6e0 - /private/var/containers/Bundle/Application/73854A73-1F50-4120-9E6D-3EB1F63ADB41/SandboxMauiApp.app/Xamarin.PreBuilt.iOS : AppleCryptoNative_X509ImportCollection
0x1006585cc - /private/var/containers/Bundle/Application/73854A73-1F50-4120-9E6D-3EB1F63ADB41/SandboxMauiApp.app/Xamarin.PreBuilt.iOS : AppleCryptoNative_X509ImportCollection
0x1006ac174 - /private/var/containers/Bundle/Application/73854A73-1F50-4120-9E6D-3EB1F63ADB41/SandboxMauiApp.app/Xamarin.PreBuilt.iOS : AppleCryptoNative_X509ImportCollection
0x10066ced0 - /private/var/containers/Bundle/Application/73854A73-1F50-4120-9E6D-3EB1F63ADB41/SandboxMauiApp.app/Xamarin.PreBuilt.iOS : AppleCryptoNative_X509ImportCollection
0x1fa5b8888 - /usr/lib/system/libsystem_platform.dylib :
0x1d7dd2ed0 - /usr/lib/system/libsystem_kernel.dylib :
0x1d7dd2f04 - /usr/lib/system/libsystem_kernel.dylib :
0 d4 ......0A......
0x1d7dac358 03 01 00 54 7f 23 03 d5 fd 7b bf a9 fd 03 00 91 ...T.#...{......
0x1d7dac368 01 d5 ff 97 bf 03 00 91 fd 7b c1 a8 ff 0f 5f d6 .........{.....
0x1d7dac378 c0 03 5f d6 d0 03 80 d2 01 10 00 d4 03 01 00 54 ..............T
The app has been terminated.
0x1b0df98f8 - /System/Library/PrivateFrameworks/TCC.framework/TCC :
0x1b0df5814 - /System/Library/PrivateFrameworks/TCC.framework/TCC :
0x1b0dfd1f8 - /System/Library/PrivateFrameworks/TCC.framework/TCC :
0x1fa6bfb44 - /usr/lib/system/libxpc.dylib :
0x1fa6b24b8 - /usr/lib/system/libxpc.dylib :
0x198639380 - /usr/lib/system/libdispatch.dylib :
0x198656b04 - /usr/lib/system/libdispatch.dylib :
0x19864bd40 - /usr/lib/system/libdispatch.dylib :
0x19864b628 - /usr/lib/system/libdispatch.dylib :
0x1fa65f99c - /usr/lib/system/libsystem_pthread.dylib : _pthread_wqthread
0x1fa65fa04 - /usr/lib/system/libsystem_pthread.dylib : start_wqthread
=================================================================
Basic Fault Address Reporting
=================================================================
Memory around native instruction pointer (0x1d7dac358):0x1d7dac348 ff 0f 5f d6 c0 03 5f d6 30 41 80 d2 01 10 0
The text was updated successfully, but these errors were encountered: