xamarin / XamarinCommunityToolkit

The Xamarin Community Toolkit is a collection of Animations, Behaviors, Converters, and Effects for mobile development with Xamarin.Forms. It simplifies and demonstrates common developer tasks building iOS, Android, and UWP apps with Xamarin.Forms.
MIT License
1.58k stars 471 forks source link

[Bug] [CameraView] [iOS] Native Crash Report #503

Closed gkenaston closed 4 years ago

gkenaston commented 4 years ago

Description

Steps to Reproduce

  1. Run iOS Sample on iPhone v14.1
  2. Take photo

Expected Behavior

Photo loads

Actual Behavior

================================================================= Native Crash Reporting

Got a segv 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 stacktrace:

0x10456acd0 - /private/var/containers/Bundle/Application/7690895E-4878-4609-9437-ACB2C6F401E7/TDNMobile.iOS.app/Xamarin.PreBuilt.iOS : mono_handle_native_crash

0x104712650 - /private/var/containers/Bundle/Application/7690895E-4878-4609-9437-ACB2C6F401E7/TDNMobile.iOS.app/Xamarin.PreBuilt.iOS : _ZL15param_iter_next14IteratorActionPvPKcmS0_Pj

0x10470b2d4 - /private/var/containers/Bundle/Application/7690895E-4878-4609-9437-ACB2C6F401E7/TDNMobile.iOS.app/Xamarin.PreBuilt.iOS : xamarin_invoke_trampoline

0x10471252c - /private/var/containers/Bundle/Application/7690895E-4878-4609-9437-ACB2C6F401E7/TDNMobile.iOS.app/Xamarin.PreBuilt.iOS : xamarin_arch_trampoline
0x1047130d0 - /private/var/containers/Bundle/Application/7690895E-4878-4609-9437-ACB2C6F401E7/TDNMobile.iOS.app/Xamarin.PreBuilt.iOS : xamarin_arm64_common_trampoline
0x1c73dab3c - /System/Library/PrivateFrameworks/AVFCapture.framework/AVFCapture : <redacted>
0x1b6460d54 - /System/Library/PrivateFrameworks/AVFCore.framework/AVFCore : <redacted>
0x1b6460de0 - /System/Library/PrivateFrameworks/AVFCore.framework/AVFCore : <redacted>
0x1aeb49298 - /usr/lib/system/libdispatch.dylib : <redacted>
0x1aeb4a280 - /usr/lib/system/libdispatch.dylib : <redacted>
0x1aeb2c5b8 - /usr/lib/system/libdispatch.dylib : <redacted>
0x1aee90c30 - /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : <redacted>
0x1aee8b0e8 - /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : <redacted>
0x1aee8a200 - /System/Library/Frameworks/CoreFoun
0x104577a68 - /private/var/containers/Bundle/Application/7690895E-4878-4609-9437-ACB2C6F401E7/TDNMobile.iOS.app/Xamarin.PreBuilt.iOS : mono_sigsegv_signal_handler_debug
0x1f4c6edbc - /usr/lib/system/libsystem_platform.dylib : <redacted>
0x104705d04 - /private/var/containers/Bundle/Application/7690895E-4878-4609-9437-ACB2C6F401E7/TDNMobile.iOS.app/Xamarin.PreBuilt.iOS : xamarin_collapse_struct_name

dation.framework/CoreFoundation : CFRunLoopRunSpecific 0x1c5007598 - /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices : GSEventRunModal 0x1b1753bcc - /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : 0x1b17591a0 - /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : UIApplicationMain 0x104720d4c - /private/var/containers/Bundle/Application/7690895E-4878-4609-9437-ACB2C6F401E7/TDNMobile.iOS.app/Xamarin.PreBuilt.iOS : do_icall 0x10471f460 - /private/var/containers/Bundle/Application/7690895E-4878-4609-9437-ACB2C6F401E7/TDNMobile.iOS.app/Xamarin.PreBuilt.iOS : do_icall_wrapper

0x104715edc - /private/var/containers/Bundle/Application/7690895E-4878-4609-9437-ACB2C6F401E7/TDNMobile.iOS.app/Xamarin.PreBuilt.iOS : interp_exec_method_full

0x104574128 - /private/var/containers/Bundle/Application/7690895E-4878-4609-9437-ACB2C6F401E7/TDNMobile.iOS.app/Xamarin.PreBuilt.iOS : mono_dump_native_crash_info

0x104714310 - /private/var/containers/Bundle/Application/7690895E-4878-4609-9437-ACB2C6F401E7/TDNMobile.iOS.app/Xamarin.PreBuilt.iOS : interp_runtime_invoke
0x10457ad18 - /private/var/containers/Bundle/Application/7690895E-4878-4609-9437-ACB2C6F401E7/TDNMobile.iOS.app/Xamarin.PreBuilt.iOS : mono_jit_runtime_invoke
0x10462922c - /private/var/containers/Bundle/Application/7690895E-4878-4609-9437-ACB2C6F401E7/TDNMobile.iOS.app/Xamarin.PreBuilt.iOS : mono_runtime_invoke_checked
0x10462f8e0 - /private/var/containers/Bundle/Application/7690895E-4878-4609-9437-ACB2C6F401E7/TDNMobile.iOS.app/Xamarin.PreBuilt.iOS : mono_runtime_try_invoke_array
0x1045d7930 - /private/var/containers/Bundle/Application/7690895E-4878-4609-9437-ACB2C6F401E7/TDNMobile.iOS.app/Xamarin.PreBuilt.iOS : ves_icall_InternalInvoke
0x1045e7ad4 - /private/var/containers/Bundle/Application/7690895E-4878-4609-9437-ACB2C6F401E7/TDNMobile.iOS.app/Xamarin.PreBuilt.iOS : ves_icall_InternalInvoke_raw
0x104720d4c - /private/var/containers/Bundle/Appl

ication/7690895E-4878-4609-9437-ACB2C6F401E7/TDNMobile.iOS.app/Xamarin.PreBuilt.iOS : do_icall 0x10471f460 - /private/var/containers/Bundle/Application/7690895E-4878-4609-9437-ACB2C6F401E7/TDNMobile.iOS.app/Xamarin.PreBuilt.iOS : do_icall_wrapper 0x104715edc - /private/var/containers/Bundle/Application/7690895E-4878-4609-9437-ACB2C6F401E7/TDNMobile.iOS.app/Xamarin.PreBuilt.iOS : interp_exec_method_full 0x104714310 - /private/var/containers/Bundle/Application/7690895E-4878-4609-9437-ACB2C6F401E7/TDNMobile.iOS.app/Xamarin.PreBuilt.iOS : interp_runtime_invoke 0x10457ad18 - /private/var/containers/Bundle/Application/7690895E-4878-4609-9437-ACB2C6F401E7/TDNMobile.iOS.app/Xamarin.PreBuilt.iOS : mono_jit_runtime_invoke 0x10462922c - /private/var/containers/Bundle/Application/7690895E-4878-4609-9437-ACB2C6F401E7/TDNMobile.iOS.app/Xamarin.PreBuilt.iOS : mono_runtime_invoke_checked 0x10462e4d0 - /private/var/containers/Bundle/Application/7690895E-4878-4609-9437-ACB2C6F401E7/TDNMobile.iOS.app/Xamarin.PreBuilt.iOS : mono_runtime_exec_main_checked 0x10455f8f4 - /private/var/containers/Bundle/Application/7690895E-4878-4609-9437-ACB2C6F401E7/TDNMobile.iOS.app/Xamarin.PreBuilt.iOS : mono_jit_exec 0x104711e38 - /private/var/containers/Bundle/Application/7690895E-4878-4609-9437-ACB2C6F401E7/TDNMobile.iOS.app/Xamarin.PreBuilt.iOS : xamarin_main 0x104526044 - /private/var/containers/Bundle/Application/7690895E-4878-4609-9437-ACB2C6F401E7/TDNMobile.iOS.app/Xamarin.PreBuilt.iOS : main 0x1aeb69588 - /usr/lib/system/libdyld.dylib :

================================================================= Basic Fault Address Reporting

Memory around native instruction pointer (0x104705be4):0x104705bd4 a8 83 5e f8 09 00 80 52 09 01 00 39 a8 03 5f f8 ..^....R...9... 0x104705be4 09 01 40 39 69 0f 00 34 a8 03 5f f8 09 01 c0 39 ..@9i..4......9 0x104705bf4 29 8d 00 71 e8 03 09 aa 08 7d 40 d3 1f 69 01 f1 )..q.....}@..i.. 0x104705c04 e8 13 00 f9 68 0b 00 54 08 00 00 90 08 e1 38 91 ....h..T......8.

================================================================= Managed Stacktrace:

  at <unknown> <0xffffffff>
  at UIKit.UIApplication:UIApplicationMain <0x000b8>
  at UIKit.UIApplication:Main <0x00020>
  at UIKit.UIApplication:Main <0x00038>
  at TDNMobile.iOS.Application:Main <0x00012>
  at <Module>:runtime_invoke_direct_void_string[] <0x0008c>
  at <unknown> <0xffffffff>
  at System.Reflection.RuntimeMethodInfo:InternalInvoke <0x00030>
  at System.Reflection.RuntimeMethodInfo:Invoke <0x000fc>
  at System.Reflection.MethodBase:Invoke <0x0001a>
  at Xamarin.PreBuilt.iOS.Applications:Main <0x00254>
  at <Module>:runtime_invoke_direct_void_string[] <0x00092>

=================================================================

The app has been terminated.

bmacombe commented 4 years ago

@gkenaston I see its iOS 14, but what was the physical device?

gkenaston commented 4 years ago

iPhone 8 Plus.

On Mon, Oct 26, 2020, 12:44 PM Brian Macomber notifications@github.com wrote:

@gkenaston https://github.com/gkenaston I see its iOS 14, but what was the physical device?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/xamarin/XamarinCommunityToolkit/issues/503#issuecomment-716781139, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIKALDDJXMTKKKA3J2OVKLSMXGSRANCNFSM4S7WPSQA .

jfversluis commented 4 years ago

I've tried it just now but I am not able to reproduce this behavior. Did you just try the sample app? Or did you change anything in the code?

gkenaston commented 4 years ago

I included the library in my project and basically copied the sample code and got the error.

I thought I'd have better luck debugging if I downloaded/compiled the complete source and run the sample app on the same device.

Got the exact same error.

I'm willing to do whatever to help resolve this...I really want to use this control.

On Tue, Oct 27, 2020 at 3:04 AM Gerald Versluis notifications@github.com wrote:

I've tried it just now but I am not able to reproduce this behavior. Did you just try the sample app? Or did you change anything in the code?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/xamarin/XamarinCommunityToolkit/issues/503#issuecomment-717129289, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIKALG6LI2ADIPNAYDOCPTSM2LL7ANCNFSM4S7WPSQA .

jfversluis commented 4 years ago

Did you also include the right permissions in your info.plist file? If you could provide us with a sample solution which shows this problem that would be super helpful :)

gkenaston commented 4 years ago

Attached...Same error. CameraViewSampleApp.zip

gkenaston commented 4 years ago

Microsoft Visual Studio Community 2019 Version 16.7.6 VisualStudio.16.Release/16.7.6+30611.23 Microsoft .NET Framework Version 4.8.03752

Installed Version: Community

Visual C++ 2019 00435-60000-00000-AA938 Microsoft Visual C++ 2019

ADL Tools Service Provider 1.0 This package contains services used by Data Lake tools

ASA Service Provider 1.0

ASP.NET and Web Tools 2019 16.7.532.28833 ASP.NET and Web Tools 2019

ASP.NET Core Razor Language Services 16.1.0.2035807+72d099b977d3a85e65fa3b0614ca8cfc803fef02 Provides languages services for ASP.NET Core Razor.

ASP.NET Web Frameworks and Tools 2019 16.7.532.28833 For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0 16.7.532.28833 Azure App Service Tools v3.0.0

Azure Data Lake Node 1.0 This package contains the Data Lake integration nodes for Server Explorer.

Azure Data Lake Tools for Visual Studio 2.6.2000.0 Microsoft Azure Data Lake Tools for Visual Studio

Azure Functions and Web Jobs Tools 16.7.532.28833 Azure Functions and Web Jobs Tools

Azure Stream Analytics Tools for Visual Studio 2.6.2000.0 Microsoft Azure Stream Analytics Tools for Visual Studio

C# Tools 3.7.0-6.20459.4+7ee7c540e3bf19765695b1331c946ddf986d1516 C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools 1.10 Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Extensibility Message Bus 1.2.6 (master@34d6af2) Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.

Fabric.DiagnosticEvents 1.0 Fabric Diagnostic Events

IntelliCode Extension 1.0 IntelliCode Visual Studio Extension Detailed Info

Microsoft Azure HDInsight Azure Node 2.6.2000.0 HDInsight Node under Azure Node

Microsoft Azure Hive Query Language Service 2.6.2000.0 Language service for Hive query

Microsoft Azure Service Fabric Tools for Visual Studio 16.0 Microsoft Azure Service Fabric Tools for Visual Studio

Microsoft Azure Stream Analytics Language Service 2.6.2000.0 Language service for Azure Stream Analytics

Microsoft Azure Stream Analytics Node 1.0 Azure Stream Analytics Node under Azure Node

Microsoft Azure Tools 2.9 Microsoft Azure Tools for Microsoft Visual Studio 2019 - v2.9.30701.1

Microsoft Continuous Delivery Tools for Visual Studio 0.4 Simplifying the configuration of Azure DevOps pipelines from within the Visual Studio IDE.

Microsoft JVM Debugger 1.0 Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft Library Manager 2.1.79+ge3567815aa.RR Install client-side libraries easily to any web project

Microsoft MI-Based Debugger 1.0 Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual C++ Wizards 1.0 Microsoft Visual C++ Wizards

Microsoft Visual Studio Tools for Containers 1.1 Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.

Microsoft Visual Studio VC Package 1.0 Microsoft Visual Studio VC Package

Mono Debugging for Visual Studio 16.7.5 (112c7bc) Support for debugging Mono processes with Visual Studio.

NuGet Package Manager 5.7.0 NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

ProjectServicesPackage Extension 1.0 ProjectServicesPackage Visual Studio Extension Detailed Info

SQL Server Data Tools 16.0.62008.03130 Microsoft SQL Server Data Tools

ToolWindowHostedEditor 1.0 Hosting json editor into a tool window

TypeScript Tools 16.0.20702.2001 TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools 3.7.0-6.20459.4+7ee7c540e3bf19765695b1331c946ddf986d1516 Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools 10.10.0.0 for F# 4.7 16.7.0-beta.20361.3+3ef6f0b514198c0bfa6c2c09fefe41a740b024d5 Microsoft Visual F# Tools 10.10.0.0 for F# 4.7

Visual Studio Code Debug Adapter Host Package 1.0 Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Container Tools Extensions (Preview) 1.0 View, manage, and diagnose containers within Visual Studio.

Visual Studio Tools for Containers 1.0 Visual Studio Tools for Containers

Visual Studio Tools for Kubernetes 1.0 Visual Studio Tools for Kubernetes

VisualStudio.DeviceLog 1.0 Information about my package

VisualStudio.Foo 1.0 Information about my package

VisualStudio.Mac 1.0 Mac Extension for Visual Studio

Xamarin 16.7.000.456 (d16-7-6@f8d55b6) Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer 16.7.0.495 (remotes/origin/d16-7@79c0c522c) Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin Templates 16.7.85 (1bcbbdf) Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.

Xamarin.Android SDK 11.0.2.0 (d16-7/025fde9) Xamarin.Android Reference Assemblies and MSBuild support. Mono: 83105ba Java.Interop: xamarin/java.interop/d16-7@1f3388a ProGuard: Guardsquare/proguard/proguard6.2.2@ebe9000 SQLite: xamarin/sqlite/3.32.1@1a3276b Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-7@017078f

Xamarin.iOS and Xamarin.Mac SDK 14.0.0.0 (7ec3751a1) Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

ZenCoding 1.2.12 Provides ZenCoding for the HTML Editor - full support for static HTML, Razor and WebForms.

bmacombe commented 4 years ago

I tried your sample app on an iPhone 6s and it worked as expected. The only thing I changed was the provisioning profiles so I could deploy it to my test device. I'll see if I can round up another device to try it on.

gkenaston commented 4 years ago

Very strange. I am using Windows (no Mac) with Hot Restart to deploy/debug. Not sure if that makes a difference?

https://www.xamarinexpert.it/how-to-test-your-xamarin-forms-ios-apps-on-your-iphone-or-ipad-without-a-mac/ https://docs.microsoft.com/en-us/xamarin/xamarin-forms/deploy-test/hot-restart?WT.mc_id=xamarin-c9-jamont

On Tue, Oct 27, 2020 at 7:32 AM Brian Macomber notifications@github.com wrote:

I tried your sample app on an iPhone 6s and it worked as expected. The only thing I changed was the provisioning profiles so I could deploy it to my test device. I'll see if I can round up another device to try it on.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/xamarin/XamarinCommunityToolkit/issues/503#issuecomment-717285358, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIKALE2HJXE7FMTAONKMDDSM3KWLANCNFSM4S7WPSQA .

gkenaston commented 4 years ago

I'll also try a deployment through App Center and test.

bmacombe commented 4 years ago

That could be with hot restart, I know there are some limitations, I'm using VS Windows, but have a Mac paired to build and deploy to the device.

bmacombe commented 4 years ago

I'm trying my iPhone 11 Pro Max...but it doesn't want to deploy, same with my iPad Pro for some reason. iOS physical device debugging as always been finicky for me.

gkenaston commented 4 years ago

Did a build/deployment through App Center and now it's crashing on the behavior (see below). Also, camera view still crashing.

Xamarin Exception Stack: System.NullReferenceException: Object reference not set to an instance of an object at Xamarin.CommunityToolkit.Behaviors.EventToCommandBehavior.RegisterEvent () <0x101799290 + 0x000c8> in <931215927cbf4c17abc0d126bf23ff97#e51b9191dd9905e0128acd464b19fa94>:0 at Xamarin.CommunityToolkit.Behaviors.EventToCommandBehavior.OnAttachedTo (Xamarin.Forms.View bindable) <0x1017991c0 + 0x00023> in <931215927cbf4c17abc0d126bf23ff97#e51b9191dd9905e0128acd464b19fa94>:0 at Xamarin.Forms.Behavior`1[T].OnAttachedTo (Xamarin.Forms.BindableObject bindable) <0x100811970 + 0x0004b> in <0c78caada6294b6391bfbb908a3e4681#e51b9191dd9905e0128acd464b19fa94>:0 at Xamarin.Forms.Behavior.Xamarin.Forms.IAttachedObject.AttachTo (Xamarin.Forms.BindableObject bindable) <0x100811800 + 0x0004f> in <0c78caada6294b6391bfbb908a3e4681#e51b9191dd9905e0128acd464b19fa94>:0 at Xamarin.Forms.AttachedCollection`1[T].InsertItem (System.Int32 index, T item) <0x100810990 + 0x000ff> in <0c78caada6294b6391bfbb908a3e4681#e51b9191dd9905e0128acd464b19fa94>:0 at System.Collections.ObjectModel.Collection`1[T].Add (T item) <0x100561f80 + 0x000ab> in <85a0be741dba4068b8b83c4563af7fa8#e51b9191dd9905e0128acd464b19fa94>:0 at TDNMobile.App.Pages.VehiclePage.InitializeComponent () <0x1016e2d50 + 0x038d7> in :0 at TDNMobile.App.Pages.VehiclePage..ctor () <0x1016e2ba0 + 0x0001b> in :0 at TDNMobile.App.Pages.EstimateListPage.NavigateToVehiclePage () <0x1016d1f70 + 0x00057> in :0 at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__7_0 (System.Object state) <0x10049b4c0 + 0x00053> in <85a0be741dba4068b8b83c4563af7fa8#e51b9191dd9905e0128acd464b19fa94>:0 at Foundation.NSAsyncSynchronizationContextDispatcher.Apply () <0x101348a40 + 0x0002b> in :0 at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr) at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) <0x1012ef0f0 + 0x0002f> in :0 at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) <0x1012ef060 + 0x00043> in :0 at TDNMobile.iOS.Application.Main (System.String[] args) <0x100320a90 + 0x00023> in :0
jfversluis commented 4 years ago

Downloaded the sample, had to fiddle with the distribution profile in the info.plist file but then it deployed and works as expected. Are you running it as a release configuration? Maybe some linker issue?

jfversluis commented 4 years ago

Just ran as release, not the hard crash, but also not showing the image... @pictos any ideas around the linker here?

gkenaston commented 4 years ago

Yes, release configuration.

image

image

pictos commented 4 years ago

Hey friends, I don't have any iOS device here, do you know if I can run this on the simulator?

acuntex commented 4 years ago

@pictos There is no camera in the simulator :-(

bmacombe commented 4 years ago

@gkenaston Could you try the code in PR #506? See if you still get a crash with CameraView.

Could you open another issue and provide a sample app with the EventToCommandBehavior crash you saw out of your app center build? I don't see the behavior is used in the sample you provided here for the camera view issue. I'd be glad to take a look. I did try the XCT sample page for EventToCommandBehavior in a release build and it works as expected.

gkenaston commented 4 years ago

Will do.

On Wed, Oct 28, 2020 at 8:13 AM Brian Macomber notifications@github.com wrote:

@gkenaston https://github.com/gkenaston Could you try the code in PR

506 https://github.com/xamarin/XamarinCommunityToolkit/pull/506? See

if you still get a crash with CameraView.

Could you open another issue and provide a sample app with the EventToCommandBehavior crash you saw out of your app center build? I don't see the behavior is used in the sample you provided here for the camera view issue. I'd be glad to take a look. I did try the XCT sample page for EventToCommandBehavior in a release build and it works as expected.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/xamarin/XamarinCommunityToolkit/issues/503#issuecomment-718001182, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIKALG766ZRV7OUAUDABHLSNAYLBANCNFSM4S7WPSQA .

bmacombe commented 4 years ago

@gkenaston Here is a link to the nugets for that PR. Note the dots at the end to download them, I always miss that! https://dev.azure.com/xamarin/public/_build/results?buildId=29550&view=artifacts&type=publishedArtifacts

image

gkenaston commented 4 years ago

[0:] CameraView_OnAvailable Thread started: #8 a fatal error in the mono runtime or one of the native libraries used by your application.

================================================================= Native Crash Reporting

Got a segv while executing native code. This usually indicates

================================================================= Native stacktrace:

0x1043ac128 - /private/var/containers/Bundle/Application/9C8123FC-400C-4860-B66E-07133725A1D8/CameraViewSampleApp.iOS.app/Xamarin.PreBuilt.iOS : mono_dump_native_crash_info
0x1043a2cd0 - /private/var/containers/Bundle/Application/9C8123FC-400C-4860-B66E-07133725A1D8/CameraViewSampleApp.iOS.app/Xamarin.PreBuilt.iOS : mono_handle_native_crash
0x1043afa68 - /private/var/containers/Bundle/Application/9C8123FC-400C-4860-B66E-07133725A1D8/CameraViewSampleApp.iOS.app/Xamarin.PreBuilt.iOS : mono_sigsegv_signal_handler_debug
0x1e8fbadbc - /usr/lib/system/libsystem_platform.dylib : <redacted>

0x10453dd04 - /private/var/containers/Bundle/Application/9C8123FC-400C-4860-B66E-07133725A1D8/CameraViewSampleApp.iOS.app/Xamarin.PreBuilt.iOS : xamarin_collapse_struct_name

0x10454a650 - /private/var/containers/Bundle/Application/9C8123FC-400C-4860-B66E-07133725A1D8/CameraViewSampleApp.iOS.app/Xamarin.PreBuilt.iOS : _ZL15param_iter_next14IteratorActionPvPKcmS0_Pj
0x1045432d4 - /private/var/containers/Bundle/Application/9C8123FC-400C-4860-B66E-07133725A1D8/CameraViewSampleApp.iOS.app/Xamarin.PreBuilt.iOS : xamarin_invoke_trampoline
0x10454a52c - /private/var/containers/Bundle/Application/9C8123FC-400C-4860-B66E-07133725A1D8/CameraViewSampleApp.iOS.app/Xamarin.PreBuilt.iOS : xamarin_arch_trampoline
0x10454b0d0 - /private/var/containers/Bundle/Application/9C8123FC-400C-4860-B66E-07133725A1D8/CameraViewSampleApp.iOS.app/Xamarin.PreBuilt.iOS : xamarin_arm64_common_trampoline
0x1bb726b3c - /System/Library/PrivateFrameworks/AVFCapture.framework/AVFCapture : <redacted>
0x1aa7acd54 - /System/Library/PrivateFrameworks/AVFCore.framework/AVFCore : <redacted>
0x1aa7acde0 - /System/Library/PrivateFrameworks/AVFCore.framework/AVFCore : <redacted>
0x1a2e95298 - /usr/lib/system/libdispat

ch.dylib : 0x1a2e96280 - /usr/lib/system/libdispatch.dylib : 0x1a2e785b8 - /usr/lib/system/libdispatch.dylib : 0x1a31dcc30 - /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : 0x1a31d70e8 - /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : 0x1a31d6200 - /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : CFRunLoopRunSpecific 0x1b9353598 - /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices : GSEventRunModal 0x1a5a9fbcc - /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : 0x1a5aa51a0 - /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : UIApplicationMain 0x104558d4c - /private/var/containers/Bundle/Application/9C8123FC-400C-4860-B66E-07133725A1D8/CameraViewSampleApp.iOS.app/Xamarin.PreBuilt.iOS : do_icall 0x104557460 - /private/var/containers/Bundle/Application/9C8123FC-400C-4860-B66E-07133725A1D8/CameraViewSampleApp.iOS.app/Xam n.PreBuilt.iOS : ves_icall_InternalInvoke 0x10441fad4 - /private/var/containers/Bundle/Application/9C8123FC-400C-4860-B66E-07133725A1D8/CameraViewSampleApp.iOS.app/Xamarin.PreBuilt.iOS : ves_icall_InternalInvoke_raw 0x104558d4c - /private/var/containers/Bundle/Application/9C8123FC-400C-4860-B66E-07133725A1D8/CameraViewSampleApp.iOS.app/Xamarin.PreBuilt.iOS : do_icall 0x104557460 - /private/var/containers/Bundle/Application/9C8123FC-400C-4860-B66E-07133725A1D8/CameraViewSampleApp.iOS.app/Xamarin.PreBuilt.iOS : do_icall_wrapper 0x10454dedc - /private/var/containers/Bundle/Application/9C8123FC-400C-4860-B66E-07133725A1D8/CameraViewSampleApp.iOS.app/Xamarin.PreBuilt.iOS : interp_exec_method_full

0x10454c310 - /private/var/containers/Bundle/Application/9C8123FC-400C-4860-B66E-07133725A1D8/CameraViewSampleApp.iOS.app/Xamarin.PreBuilt.iOS : interp_runtime_invoke
0x1043b2d18 - /private/var/containers/Bundle/Application/9C8123FC-400C-4860-B66E-07133725A1D8/CameraViewSampleApp.iOS.app/Xamarin.PreBuilt.iOS : mono_jit_runtime_invoke
0x10446122c - /private/var/containers/Bundle/Application/9C8123FC-400C-4860-B66E-07133725A1D8/CameraViewSampleApp.iOS.app/Xamarin.PreBuilt.iOS : mono_runtime_invoke_checked
0x1044664d0 - /private/var/containers/Bundle/Application/9C8123FC-400C-4860-B66E-07133725A1D8/CameraViewSampleApp.iOS.app/Xamarin.PreBuilt.iOS : mono_runtime_exec_main_checked
0x1043978f4 - /private/var/containers/Bundle/Application/9C8123FC-400C-4860-B66E-07133725A1D8/CameraViewSampleApp.iOS.app/Xamarin.PreBuilt.iOS : mono_jit_exec
0x104549e38 - /private/var/containers/Bundle/Application/9C8123FC-400C-4860-B66E-07133725A1D8/CameraViewSampleApp.iOS.app/Xamarin.PreBuilt.iOS : xamarin_main
0x10435e044 - /

arin.PreBuilt.iOS : do_icall_wrapper 0x10454dedc - /private/var/containers/Bundle/Application/9C8123FC-400C-4860-B66E-07133725A1D8/CameraViewSampleApp.iOS.app/Xamarin.PreBuilt.iOS : interp_exec_method_full 0x10454c310 - /private/var/containers/Bundle/Application/9C8123FC-400C-4860-B66E-07133725A1D8/CameraViewSampleApp.iOS.app/Xamarin.PreBuilt.iOS : interp_runtime_invoke 0x1043b2d18 - /private/var/containers/Bundle/Application/9C8123FC-400C-4860-B66E-07133725A1D8/CameraViewSampleApp.iOS.app/Xamarin.PreBuilt.iOS : mono_jit_runtime_invoke 0x10446122c - /private/var/containers/Bundle/Application/9C8123FC-400C-4860-B66E-07133725A1D8/CameraViewSampleApp.iOS.app/Xamarin.PreBuilt.iOS : mono_runtime_invoke_checked 0x1044678e0 - /private/var/containers/Bundle/Application/9C8123FC-400C-4860-B66E-07133725A1D8/CameraViewSampleApp.iOS.app/Xamarin.PreBuilt.iOS : mono_runtime_try_invoke_array 0x10440f930 - /private/var/containers/Bundle/Application/9C8123FC-400C-4860-B66E-07133725A1D8/CameraViewSampleApp.iOS.app/Xamari private/var/containers/Bundle/Application/9C8123FC-400C-4860-B66E-07133725A1D8/CameraViewSampleApp.iOS.app/Xamarin.PreBuilt.iOS : main 0x1a2eb5588 - /usr/lib/system/libdyld.dylib :

================================================================= Basic Fault Address Reporting

Memory around native instruction pointer (0x10453dbe4):0x10453dbd4 a8 83 5e f8 09 00 80 52 09 01 00 39 a8 03 5f f8 ..^....R...9... 0x10453dbe4 09 01 40 39 69 0f 00 34 a8 03 5f f8 09 01 c0 39 ..@9i..4......9 0x10453dbf4 29 8d 00 71 e8 03 09 aa 08 7d 40 d3 1f 69 01 f1 )..q.....}@..i.. 0x10453dc04 e8 13 00 f9 68 0b 00 54 08 00 00 90 08 e1 38 91 ....h..T......8.

================================================================= Managed Stacktrace:

  at <unknown> <0xffffffff>
  at UIKit.UIApplication:UIApplicationMain <0x000b8>
  at UIKit.UIApplication:Main <0x00020>
  at UIKit.UIAppl

ication:Main <0x00038> at CameraViewSampleApp.iOS.Application:Main <0x00012> at :runtime_invoke_direct_void_string[] <0x0008c> at <0xffffffff> at System.Reflection.RuntimeMethodInfo:InternalInvoke <0x00030> at System.Reflection.RuntimeMethodInfo:Invoke <0x000fc> at System.Reflection.MethodBase:Invoke <0x0001a> at Xamarin.PreBuilt.iOS.Applications:Main <0x00254> at :runtime_invoke_direct_void_string[] <0x00092>

gkenaston commented 4 years ago

image

bmacombe commented 4 years ago

Based on that stack trace it looks like the exception is happening in the CameraView_OnAvailable handler in your sample app.

In the copy I have it just logs and sets a button IsEnabled. Does the version you tested with this do anything else?

  private void CameraView_OnAvailable(object sender, bool e)
  {
      System.Diagnostics.Debug.WriteLine("CameraView_OnAvailable");

      takePhoto.IsEnabled = e;
  }
bmacombe commented 4 years ago

Could you clone #506 and deploy the XCT Sample App to your test device and see if it crashes on it?

gkenaston commented 4 years ago

Added the attribute [Preserve(Conditional = true)]

Got a segv 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 stacktrace:

================================================================= Native Crash Reporting

0x100ad4128 - /private/var/containers/Bundle/Application/352C96D3-CFB1-47F0-B6AA-210489104C38/Xamarin.CommunityToolkit.Sample.iOS.app/Xamarin.PreBuilt.iOS : mono_dump_native_crash_info

0x100acacd0 - /private/var/containers/Bundle/Application/352C96D3-CFB1-47F0-B6AA-210489104C38/Xamarin.CommunityToolkit.Sample.iOS.app/Xamarin.PreBuilt.iOS : mono_handle_native_crash

0x100ad7a68 - /private/var/containers/Bundle/Application/352C96D3-CFB1-47F0-B6AA-210489104C38/Xamarin.CommunityToolkit.Sample.iOS.app/Xamarin.PreBuilt.iOS : mono_sigsegv_signal_handler_debug
0x1e8fbadbc - /usr/lib/system/libsystem_platform.dylib : <redacted>

0x100c65d04 - /private/var/containers/Bundle/Application/352C96D3-CFB1-47F0-B6AA-210489104C38/Xamarin.CommunityToolkit.Sample.iOS.app/Xamarin.PreBuilt.iOS : xamarin_collapse_struct_name

0x100c7252c - /private/var/containers/Bundle/Application/352C96D3-CFB1-47F0-B6AA-210489104C38/Xamarin.CommunityToolkit.Sample.iOS.app/Xamarin.PreBuilt.iOS : xamarin_arch_trampoline
0x100c730d0 - /private/var/containers/Bundle/Application/352C96D3-CFB1-47F0-B6AA-210489104C38/Xamarin.CommunityToolkit.Sample.iOS.app/Xamarin.PreBuilt.iOS : xamarin_arm64_common_trampoline
0x1bb726b3c - /System/Library/PrivateFrameworks/AVFCapture.framework/AVFCapture : <redacted>
0x1aa7acd54 - /System/Library/PrivateFrameworks/AVFCore.framework/AVFCore : <redacted>
0x1aa7acde0 - /System/Library/PrivateFrameworks/AVFCore.framework/AVFCore : <redacted>
0x1a2e95298 - /usr/lib/system/libdispatch.dylib : <redacted>
0x1a2e96280 - /usr/lib/system/libdispatch.dylib : <redacted>
0x1a2e785b8 - /usr/lib/system/libdispatch.dylib : <redacted>
0x1a31dcc30 - /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : <redacted>
0x1a31d70e8 - /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : <redacted>
0x1a3

1d6200 - /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : CFRunLoopRunSpecific 0x1b9353598 - /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices : GSEventRunModal 0x1a5a9fbcc - /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : 0x1a5aa51a0 - /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : UIApplicationMain 0x100c80d4c - /private/var/containers/Bundle/Application/352C96D3-CFB1-47F0-B6AA-210489104C38/Xamarin.CommunityToolkit.Sample.iOS.app/Xamarin.PreBuilt.iOS : do_icall 0x100c7f460 - /private/var/containers/Bundle/Application/352C96D3-CFB1-47F0-B6AA-210489104C38/Xamarin.CommunityToolkit.Sample.iOS.app/Xamarin.PreBuilt.iOS : do_icall_wrapper 0x100c75edc - /private/var/containers/Bundle/Application/352C96D3-CFB1-47F0-B6AA-210489104C38/Xamarin.CommunityToolkit.Sample.iOS.app/Xamarin.PreBuilt.iOS : interp_exec_method_full 0x100c74310 - /private/var/containers/Bundle/Application/352C96D3-CFB1-47F0-B6AA-210489104C38/Xama rivate/var/containers/Bundle/Application/352C96D3-CFB1-47F0-B6AA-210489104C38/Xamarin.CommunityToolkit.Sample.iOS.app/Xamarin.PreBuilt.iOS : do_icall 0x100c7f460 - /private/var/containers/Bundle/Application/352C96D3-CFB1-47F0-B6AA-210489104C38/Xamarin.CommunityToolkit.Sample.iOS.app/Xamarin.PreBuilt.iOS : do_icall_wrapper 0x100c75edc - /private/var/containers/Bundle/Application/352C96D3-CFB1-47F0-B6AA-210489104C38/Xamarin.CommunityToolkit.Sample.iOS.app/Xamarin.PreBuilt.iOS : interp_exec_method_full 0x100c74310 - /private/var/containers/Bundle/Application/352C96D3-CFB1-47F0-B6AA-210489104C38/Xamarin.CommunityToolkit.Sample.iOS.app/Xamarin.PreBuilt.iOS : interp_runtime_invoke 0x100adad18 - /private/var/containers/Bundle/Application/352C96D3-CFB1-47F0-B6AA-210489104C38/Xamarin.CommunityToolkit.Sample.iOS.app/Xamarin.PreBuilt.iOS : mono_jit_runtime_invoke 0x100b8922c - /private/var/containers/Bundle/Application/352C96D3-CFB1-47F0-B6AA-210489104C38/Xamarin.CommunityToolkit.Sample.iOS.app/Xamarin.PreBuilt.iOS 0x100c72650 - /private/var/containers/Bundle/Application/352C96D3-CFB1-47F0-B6AA-210489104C38/Xamarin.CommunityToolkit.Sample.iOS.app/Xamarin.PreBuilt.iOS : _ZL15param_iter_next14IteratorActionPvPKcmS0_Pj 0x100c6b2d4 - /private/var/containers/Bundle/Application/352C96D3-CFB1-47F0-B6AA-210489104C38/Xamarin.CommunityToolkit.Sample.iOS.app/Xamarin.PreBuilt.iOS : xamarin_invoke_trampoline

f8 09 00 80 52 09 01 00 39 a8 03 5f f8 ..^....R...9... 0x100c65be4 09 01 40 39 69 0f 00 34 a8 03 5f f8 09 01 c0 39 ..@9i..4......9 0x100c65bf4 29 8d 00 71 e8 03 09 aa 08 7d 40 d3 1f 69 01 f1 )..q.....}@..i.. 0x100c65c04 e8 13 00 f9 68 0b 00 54 08 00 00 90 08 e1 38 91 ....h..T......8.

================================================================= Managed Stacktrace:

  at <unknown> <0xffffffff>
  at UIKit.UIApplication:UIApplicationMain <0x000b8>
  at UIKit.UIApplication:Main <0x00020>
  at UIKit.UIApplication:Main <0x00038>
  at Xamarin.CommunityToolkit.Sample.iOS.Application:Main <0x00012>
  at <Module>:runtime_invoke_direct_void_string[] <0x0008c>
  at <unknown> <0xffffffff>
  at System.Reflection.RuntimeMethodInfo:InternalInvoke <0x00030>
  at System.Reflection.RuntimeMethodInfo:Invoke <0x000fc>
  at System.Reflection.MethodBase:Invoke <0x0001a>
  at Xamarin.PreBuilt.iOS.Applications:Main <0x00254>
  at <Module>:run

rin.CommunityToolkit.Sample.iOS.app/Xamarin.PreBuilt.iOS : interp_runtime_invoke 0x100adad18 - /private/var/containers/Bundle/Application/352C96D3-CFB1-47F0-B6AA-210489104C38/Xamarin.CommunityToolkit.Sample.iOS.app/Xamarin.PreBuilt.iOS : mono_jit_runtime_invoke 0x100b8922c - /private/var/containers/Bundle/Application/352C96D3-CFB1-47F0-B6AA-210489104C38/Xamarin.CommunityToolkit.Sample.iOS.app/Xamarin.PreBuilt.iOS : mono_runtime_invoke_checked 0x100b8f8e0 - /private/var/containers/Bundle/Application/352C96D3-CFB1-47F0-B6AA-210489104C38/Xamarin.CommunityToolkit.Sample.iOS.app/Xamarin.PreBuilt.iOS : mono_runtime_try_invoke_array 0x100b37930 - /private/var/containers/Bundle/Application/352C96D3-CFB1-47F0-B6AA-210489104C38/Xamarin.CommunityToolkit.Sample.iOS.app/Xamarin.PreBuilt.iOS : ves_icall_InternalInvoke 0x100b47ad4 - /private/var/containers/Bundle/Application/352C96D3-CFB1-47F0-B6AA-210489104C38/Xamarin.CommunityToolkit.Sample.iOS.app/Xamarin.PreBuilt.iOS : ves_icall_InternalInvoke_raw 0x100c80d4c - /p time_invoke_direct_void_string[] <0x00092>

: mono_runtime_invoke_checked 0x100b8e4d0 - /private/var/containers/Bundle/Application/352C96D3-CFB1-47F0-B6AA-210489104C38/Xamarin.CommunityToolkit.Sample.iOS.app/Xamarin.PreBuilt.iOS : mono_runtime_exec_main_checked 0x100abf8f4 - /private/var/containers/Bundle/Application/352C96D3-CFB1-47F0-B6AA-210489104C38/Xamarin.CommunityToolkit.Sample.iOS.app/Xamarin.PreBuilt.iOS : mono_jit_exec 0x100c71e38 - /private/var/containers/Bundle/Application/352C96D3-CFB1-47F0-B6AA-210489104C38/Xamarin.CommunityToolkit.Sample.iOS.app/Xamarin.PreBuilt.iOS : xamarin_main 0x100a86044 - /private/var/containers/Bundle/Application/352C96D3-CFB1-47F0-B6AA-210489104C38/Xamarin.CommunityToolkit.Sample.iOS.app/Xamarin.PreBuilt.iOS : main 0x1a2eb5588 - /usr/lib/system/libdyld.dylib :

================================================================= Basic Fault Address Reporting

Memory around native instruction pointer (0x100c65be4):0x100c65bd4 a8 83 5e

gkenaston commented 4 years ago

I'm not seeing anything related to the crash in the 'Device Log' either.

jfversluis commented 4 years ago

Was closed automatically with the other fox but clearly this wasn't fixed yet :)

I'll have to be honest though. We're running out of ideas without a reproduction 😅

gkenaston commented 4 years ago

No worries. Is the sample working for you on an actual device?

bmacombe commented 4 years ago

For me it is and I think @jfversluis has also.

gkenaston commented 4 years ago

Well, I guess I'll troubleshoot some more and/or wait and see if anyone else reports an issue. Thanks for taking the time to help.

bmacombe commented 4 years ago

@gkenaston No problem, thanks for reporting. Reach out if you need someone else to test anything you find.

And we found and fixed an unrelated issue while testing. Thanks for that!

jfversluis commented 4 years ago

Indeed, we tried with three people running on different physical devices and trying to come up with different scenarios and reasons why this happens to you, but we can't reproduce this behavior.

Please let us know if you make any progress in identifying an error message or stacktrace or anything and we will gladly look into it!

gkenaston commented 4 years ago

So, I started playing with the other controls in the sample app and every one works except the CameraView :O Just my luck!

But...I decided to play around with recording, front/rear camera etc and see if I can get different errors.

Now this error comes up after switching camera front/rear trying to record:

Foundation.MonoTouchException Message=Objective-C exception thrown. Name: NSInvalidArgumentException Reason: *** -[AVCaptureConnection setVideoOrientation:] Not supported - use -isVideoOrientationSupported Native stack trace: 0 CoreFoundation 0x00000001af959128 58021D2F-E0D8-3FD1-805D-ECF92B4E0CB0 + 1155368 1 libobjc.A.dylib 0x00000001c31f5cb4 objc_exception_throw + 56 2 AVFCapture 0x00000001c7daf3a8 BA0EBC7F-5445-31F9-80FD-8F90D980A655 + 152488 3 Foundation 0x00000001b0bd6f28 A0089247-6F38-3097-B144-F5E2C90ADD3A + 1044264 4 Foundation 0x00000001b0b1b800 A0089247-6F38-3097-B144-F5E2C90ADD3A + 276480 5 Foundation 0x00000001b0bd23d8 A0089247-6F38-3097-B144-F5E2C90ADD3A + 1024984 6 Xamarin.PreBuilt.iOS 0x0000000102f00dd8 do_icall + 352 7 Xamarin.PreBuilt.iOS 0x0000000102eff460 do_icall_wrapper

On Thu, Oct 29, 2020 at 11:41 AM Gerald Versluis notifications@github.com wrote:

Indeed, we tried with three people running on different physical devices and trying to come up with different scenarios and reasons why this happens to you, but we can't reproduce this behavior.

Please let us know if you make any progress in identifying an error message or stacktrace or anything and we will gladly look into it!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/xamarin/XamarinCommunityToolkit/issues/503#issuecomment-718947291, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIKALB7M6JDW25Y46UCXE3SNGZOXANCNFSM4S7WPSQA .

gkenaston commented 4 years ago

Also, the button never shows "Stop Recording". The top status bar flashes red when I "Start Recording". What's supposed to happen when recording?

On Thu, Oct 29, 2020 at 3:37 PM Gordon Kenaston gkenaston@gmail.com wrote:

So, I started playing with the other controls in the sample app and every one works except the CameraView :O Just my luck!

But...I decided to play around with recording, front/rear camera etc and see if I can get different errors.

Now this error comes up after switching camera front/rear trying to record:

Foundation.MonoTouchException Message=Objective-C exception thrown. Name: NSInvalidArgumentException Reason: *** -[AVCaptureConnection setVideoOrientation:] Not supported - use -isVideoOrientationSupported Native stack trace: 0 CoreFoundation 0x00000001af959128 58021D2F-E0D8-3FD1-805D-ECF92B4E0CB0 + 1155368 1 libobjc.A.dylib 0x00000001c31f5cb4 objc_exception_throw + 56 2 AVFCapture 0x00000001c7daf3a8 BA0EBC7F-5445-31F9-80FD-8F90D980A655 + 152488 3 Foundation 0x00000001b0bd6f28 A0089247-6F38-3097-B144-F5E2C90ADD3A + 1044264 4 Foundation 0x00000001b0b1b800 A0089247-6F38-3097-B144-F5E2C90ADD3A + 276480 5 Foundation 0x00000001b0bd23d8 A0089247-6F38-3097-B144-F5E2C90ADD3A + 1024984 6 Xamarin.PreBuilt.iOS 0x0000000102f00dd8 do_icall + 352 7 Xamarin.PreBuilt.iOS 0x0000000102eff460 do_icall_wrapper + 296 8 Xamarin.PreBuilt.iOS 0x0000000102ef5edc interp_exec_method_full + 3128 9 Xamarin.PreBuilt.iOS 0x0000000102ef4310 interp_runtime_invoke + 336 10 Xamarin.PreBuilt.iOS 0x0000000102d5ad18 mono_jit_runtime_invoke + 904 11 Xamarin.PreBuilt.iOS 0x0000000102e0aa60 mono_runtime_try_invoke + 156 12 Xamarin.PreBuilt.iOS 0x0000000102e0c668 mono_runtime_invoke + 100 13 Xamarin.PreBuilt.iOS 0x0000000102cbd358 _ZL31native_to_managed_trampoline_36P11objc_objectP13objc_selectorPP11_MonoMethodj

  • 244 14 Xamarin.PreBuilt.iOS 0x0000000102cbd258 -[UIKit_UIControlEventProxy BridgeSelector] + 44 15 UIKitCore 0x00000001b21a291c B718818B-0B80-3807-83BF-BB4FD626F70C + 11700508 16 UIKitCore 0x00000001b1b3a5bc B718818B-0B80-3807-83BF-BB4FD626F70C + 4982204 17 UIKitCore 0x00000001b1b3a900 B718818B-0B80-3807-83BF-BB4FD626F70C + 4983040 18 UIKitCore 0x00000001b1b39238 B718818B-0B80-3807-83BF-BB4FD626F70C + 4977208 19 UIKitCore 0x00000001b1d1fca8 B718818B-0B80-3807-83BF-BB4FD626F70C + 6970536 20 UIKitCore 0x00000001b1d1de38 B718818B-0B80-3807-83BF-BB4FD626F70C + 6962744 21 UIKitCore 0x00000001b21df0fc B718818B-0B80-3807-83BF-BB4FD626F70C + 11948284 22 UIKitCore 0x00000001b21ba4fc B718818B-0B80-3807-83BF-BB4FD626F70C + 11797756 23 UIKitCore 0x00000001b223c76c B718818B-0B80-3807-83BF-BB4FD626F70C + 12330860 24 UIKitCore 0x00000001b2240f0c B718818B-0B80-3807-83BF-BB4FD626F70C + 12349196 25 UIKitCore 0x00000001b22381cc B718818B-0B80-3807-83BF-BB4FD626F70C + 12313036 26 CoreFoundation 0x00000001af8d9240 58021D2F-E0D8-3FD1-805D-ECF92B4E0CB0 + 631360 27 CoreFoundation 0x00000001af8d9140 58021D2F-E0D8-3FD1-805D-ECF92B4E0CB0 + 631104 28 CoreFoundation 0x00000001af8d8488 58021D2F-E0D8-3FD1-805D-ECF92B4E0CB0 + 627848 29 CoreFoundation 0x00000001af8d2a40 58021D2F-E0D8-3FD1-805D-ECF92B4E0CB0 + 604736 30 CoreFoundation 0x00000001af8d2200 CFRunLoopRunSpecific + 572 31 GraphicsServices 0x00000001c5a4f598 GSEventRunModal
  • 160 32 UIKitCore 0x00000001b219bbcc B718818B-0B80-3807-83BF-BB4FD626F70C + 11672524 33 UIKitCore 0x00000001b21a11a0 UIApplicationMain + 164 34 Xamarin.PreBuilt.iOS 0x0000000102f00d4c do_icall + 212 35 Xamarin.PreBuilt.iOS 0x0000000102eff460 do_icall_wrapper + 296 36 Xamarin.PreBuilt.iOS 0x0000000102ef5edc interp_exec_method_full + 3128 37 Xamarin.PreBuilt.iOS 0x0000000102ef4310 interp_runtime_invoke + 336 38 Xamarin.PreBuilt.iOS 0x0000000102d5ad18 mono_jit_runtime_invoke + 904 39 Xamarin.PreBuilt.iOS 0x0000000102e0922c mono_runtime_invoke_checked + 148 40 Xamarin.PreBuilt.iOS 0x0000000102e0f8e0 mono_runtime_try_invoke_array + 1284 41 Xamarin.PreBuilt.iOS 0x0000000102db7930 ves_icall_InternalInvoke + 1036 42 Xamarin.PreBuilt.iOS 0x0000000102dc7ad4 ves_icall_InternalInvoke_raw + 108 43 Xamarin.PreBuilt.iOS 0x0000000102f00d4c do_icall + 212 44 Xamarin.PreBuilt.iOS 0x0000000102eff460 do_icall_wrapper + 296 45 Xamarin.PreBuilt.iOS 0x0000000102ef5edc interp_exec_method_full + 3128 46 Xamarin.PreBuilt.iOS 0x0000000102ef4310 interp_runtime_invoke + 336 47 Xamarin.PreBuilt.iOS 0x0000000102d5ad18 mono_jit_runtime_invoke + 904 48 Xamarin.PreBuilt.iOS 0x0000000102e0922c mono_runtime_invoke_checked + 148 49 Xamarin.PreBuilt.iOS 0x0000000102e0e4d0 mono_runtime_exec_main_checked + 128 50 Xamarin.PreBuilt.iOS 0x0000000102d3f8f4 mono_jit_exec + 376 51 Xamarin.PreBuilt.iOS 0x0000000102ef1e38 xamarin_main + 1976 52 Xamarin.PreBuilt.iOS 0x0000000102d06044 main + 84 53 libdyld.dylib 0x00000001af5b1588 97942B47-8579-3037-ABC2-61C035EF1E70 + 5512

    Source=Xamarin.iOS StackTrace: at ObjCRuntime.Runtime.ThrowNSException (System.IntPtr ns_exception) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/ 14.2.0.12/src/Xamarin.iOS/ObjCRuntime/Runtime.cs:407 at ObjCRuntime.Runtime.throw_ns_exception (System.IntPtr exc) [0x00000] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/runtime/Delegates.generated.cs:128 at (wrapper native-to-managed) ObjCRuntime.Runtime.throw_ns_exception(intptr)

On Thu, Oct 29, 2020 at 11:41 AM Gerald Versluis notifications@github.com wrote:

Indeed, we tried with three people running on different physical devices and trying to come up with different scenarios and reasons why this happens to you, but we can't reproduce this behavior.

Please let us know if you make any progress in identifying an error message or stacktrace or anything and we will gladly look into it!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/xamarin/XamarinCommunityToolkit/issues/503#issuecomment-718947291, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIKALB7M6JDW25Y46UCXE3SNGZOXANCNFSM4S7WPSQA .

gkenaston commented 4 years ago

Okay, it is saving the videos to disk but not the photos (still crashing). The button never updates to "Stop Recording".

On Thu, Oct 29, 2020 at 4:20 PM Gordon Kenaston gkenaston@gmail.com wrote:

Also, the button never shows "Stop Recording". The top status bar flashes red when I "Start Recording". What's supposed to happen when recording?

On Thu, Oct 29, 2020 at 3:37 PM Gordon Kenaston gkenaston@gmail.com wrote:

So, I started playing with the other controls in the sample app and every one works except the CameraView :O Just my luck!

But...I decided to play around with recording, front/rear camera etc and see if I can get different errors.

Now this error comes up after switching camera front/rear trying to record:

Foundation.MonoTouchException Message=Objective-C exception thrown. Name: NSInvalidArgumentException Reason: *** -[AVCaptureConnection setVideoOrientation:] Not supported - use -isVideoOrientationSupported Native stack trace: 0 CoreFoundation 0x00000001af959128 58021D2F-E0D8-3FD1-805D-ECF92B4E0CB0 + 1155368 1 libobjc.A.dylib 0x00000001c31f5cb4 objc_exception_throw + 56 2 AVFCapture 0x00000001c7daf3a8 BA0EBC7F-5445-31F9-80FD-8F90D980A655 + 152488 3 Foundation 0x00000001b0bd6f28 A0089247-6F38-3097-B144-F5E2C90ADD3A + 1044264 4 Foundation 0x00000001b0b1b800 A0089247-6F38-3097-B144-F5E2C90ADD3A + 276480 5 Foundation 0x00000001b0bd23d8 A0089247-6F38-3097-B144-F5E2C90ADD3A + 1024984 6 Xamarin.PreBuilt.iOS 0x0000000102f00dd8 do_icall + 352 7 Xamarin.PreBuilt.iOS 0x0000000102eff460 do_icall_wrapper + 296 8 Xamarin.PreBuilt.iOS 0x0000000102ef5edc interp_exec_method_full + 3128 9 Xamarin.PreBuilt.iOS 0x0000000102ef4310 interp_runtime_invoke + 336 10 Xamarin.PreBuilt.iOS 0x0000000102d5ad18 mono_jit_runtime_invoke + 904 11 Xamarin.PreBuilt.iOS 0x0000000102e0aa60 mono_runtime_try_invoke + 156 12 Xamarin.PreBuilt.iOS 0x0000000102e0c668 mono_runtime_invoke + 100 13 Xamarin.PreBuilt.iOS 0x0000000102cbd358 _ZL31native_to_managed_trampoline_36P11objc_objectP13objc_selectorPP11_MonoMethodj

  • 244 14 Xamarin.PreBuilt.iOS 0x0000000102cbd258 -[UIKit_UIControlEventProxy BridgeSelector] + 44 15 UIKitCore 0x00000001b21a291c B718818B-0B80-3807-83BF-BB4FD626F70C + 11700508 16 UIKitCore 0x00000001b1b3a5bc B718818B-0B80-3807-83BF-BB4FD626F70C + 4982204 17 UIKitCore 0x00000001b1b3a900 B718818B-0B80-3807-83BF-BB4FD626F70C + 4983040 18 UIKitCore 0x00000001b1b39238 B718818B-0B80-3807-83BF-BB4FD626F70C + 4977208 19 UIKitCore 0x00000001b1d1fca8 B718818B-0B80-3807-83BF-BB4FD626F70C + 6970536 20 UIKitCore 0x00000001b1d1de38 B718818B-0B80-3807-83BF-BB4FD626F70C + 6962744 21 UIKitCore 0x00000001b21df0fc B718818B-0B80-3807-83BF-BB4FD626F70C + 11948284 22 UIKitCore 0x00000001b21ba4fc B718818B-0B80-3807-83BF-BB4FD626F70C + 11797756 23 UIKitCore 0x00000001b223c76c B718818B-0B80-3807-83BF-BB4FD626F70C + 12330860 24 UIKitCore 0x00000001b2240f0c B718818B-0B80-3807-83BF-BB4FD626F70C + 12349196 25 UIKitCore 0x00000001b22381cc B718818B-0B80-3807-83BF-BB4FD626F70C + 12313036 26 CoreFoundation 0x00000001af8d9240 58021D2F-E0D8-3FD1-805D-ECF92B4E0CB0 + 631360 27 CoreFoundation 0x00000001af8d9140 58021D2F-E0D8-3FD1-805D-ECF92B4E0CB0 + 631104 28 CoreFoundation 0x00000001af8d8488 58021D2F-E0D8-3FD1-805D-ECF92B4E0CB0 + 627848 29 CoreFoundation 0x00000001af8d2a40 58021D2F-E0D8-3FD1-805D-ECF92B4E0CB0 + 604736 30 CoreFoundation 0x00000001af8d2200 CFRunLoopRunSpecific + 572 31 GraphicsServices 0x00000001c5a4f598 GSEventRunModal + 160 32 UIKitCore 0x00000001b219bbcc B718818B-0B80-3807-83BF-BB4FD626F70C + 11672524 33 UIKitCore 0x00000001b21a11a0 UIApplicationMain + 164 34 Xamarin.PreBuilt.iOS 0x0000000102f00d4c do_icall + 212 35 Xamarin.PreBuilt.iOS 0x0000000102eff460 do_icall_wrapper + 296 36 Xamarin.PreBuilt.iOS 0x0000000102ef5edc interp_exec_method_full + 3128 37 Xamarin.PreBuilt.iOS 0x0000000102ef4310 interp_runtime_invoke + 336 38 Xamarin.PreBuilt.iOS 0x0000000102d5ad18 mono_jit_runtime_invoke + 904 39 Xamarin.PreBuilt.iOS 0x0000000102e0922c mono_runtime_invoke_checked + 148 40 Xamarin.PreBuilt.iOS 0x0000000102e0f8e0 mono_runtime_try_invoke_array + 1284 41 Xamarin.PreBuilt.iOS 0x0000000102db7930 ves_icall_InternalInvoke + 1036 42 Xamarin.PreBuilt.iOS 0x0000000102dc7ad4 ves_icall_InternalInvoke_raw + 108 43 Xamarin.PreBuilt.iOS 0x0000000102f00d4c do_icall + 212 44 Xamarin.PreBuilt.iOS 0x0000000102eff460 do_icall_wrapper + 296 45 Xamarin.PreBuilt.iOS 0x0000000102ef5edc interp_exec_method_full + 3128 46 Xamarin.PreBuilt.iOS 0x0000000102ef4310 interp_runtime_invoke + 336 47 Xamarin.PreBuilt.iOS 0x0000000102d5ad18 mono_jit_runtime_invoke + 904 48 Xamarin.PreBuilt.iOS 0x0000000102e0922c mono_runtime_invoke_checked + 148 49 Xamarin.PreBuilt.iOS 0x0000000102e0e4d0 mono_runtime_exec_main_checked + 128 50 Xamarin.PreBuilt.iOS 0x0000000102d3f8f4 mono_jit_exec
  • 376 51 Xamarin.PreBuilt.iOS 0x0000000102ef1e38 xamarin_main + 1976 52 Xamarin.PreBuilt.iOS 0x0000000102d06044 main + 84 53 libdyld.dylib 0x00000001af5b1588 97942B47-8579-3037-ABC2-61C035EF1E70 + 5512

    Source=Xamarin.iOS StackTrace: at ObjCRuntime.Runtime.ThrowNSException (System.IntPtr ns_exception) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/ 14.2.0.12/src/Xamarin.iOS/ObjCRuntime/Runtime.cs:407 at ObjCRuntime.Runtime.throw_ns_exception (System.IntPtr exc) [0x00000] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/runtime/Delegates.generated.cs:128 at (wrapper native-to-managed) ObjCRuntime.Runtime.throw_ns_exception(intptr)

On Thu, Oct 29, 2020 at 11:41 AM Gerald Versluis < notifications@github.com> wrote:

Indeed, we tried with three people running on different physical devices and trying to come up with different scenarios and reasons why this happens to you, but we can't reproduce this behavior.

Please let us know if you make any progress in identifying an error message or stacktrace or anything and we will gladly look into it!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/xamarin/XamarinCommunityToolkit/issues/503#issuecomment-718947291, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIKALB7M6JDW25Y46UCXE3SNGZOXANCNFSM4S7WPSQA .

gkenaston commented 4 years ago

FinishCapture never gets invoked when taking a photo...It does get invoked when hitting the record button a second time; which stops recording but doesn't update button.

On Thu, Oct 29, 2020 at 4:28 PM Gordon Kenaston gkenaston@gmail.com wrote:

Okay, it is saving the videos to disk but not the photos (still crashing). The button never updates to "Stop Recording".

On Thu, Oct 29, 2020 at 4:20 PM Gordon Kenaston gkenaston@gmail.com wrote:

Also, the button never shows "Stop Recording". The top status bar flashes red when I "Start Recording". What's supposed to happen when recording?

On Thu, Oct 29, 2020 at 3:37 PM Gordon Kenaston gkenaston@gmail.com wrote:

So, I started playing with the other controls in the sample app and every one works except the CameraView :O Just my luck!

But...I decided to play around with recording, front/rear camera etc and see if I can get different errors.

Now this error comes up after switching camera front/rear trying to record:

Foundation.MonoTouchException Message=Objective-C exception thrown. Name: NSInvalidArgumentException Reason: *** -[AVCaptureConnection setVideoOrientation:] Not supported - use -isVideoOrientationSupported Native stack trace: 0 CoreFoundation 0x00000001af959128 58021D2F-E0D8-3FD1-805D-ECF92B4E0CB0 + 1155368 1 libobjc.A.dylib 0x00000001c31f5cb4 objc_exception_throw + 56 2 AVFCapture 0x00000001c7daf3a8 BA0EBC7F-5445-31F9-80FD-8F90D980A655 + 152488 3 Foundation 0x00000001b0bd6f28 A0089247-6F38-3097-B144-F5E2C90ADD3A + 1044264 4 Foundation 0x00000001b0b1b800 A0089247-6F38-3097-B144-F5E2C90ADD3A + 276480 5 Foundation 0x00000001b0bd23d8 A0089247-6F38-3097-B144-F5E2C90ADD3A + 1024984 6 Xamarin.PreBuilt.iOS 0x0000000102f00dd8 do_icall + 352 7 Xamarin.PreBuilt.iOS 0x0000000102eff460 do_icall_wrapper + 296 8 Xamarin.PreBuilt.iOS 0x0000000102ef5edc interp_exec_method_full + 3128 9 Xamarin.PreBuilt.iOS 0x0000000102ef4310 interp_runtime_invoke + 336 10 Xamarin.PreBuilt.iOS 0x0000000102d5ad18 mono_jit_runtime_invoke + 904 11 Xamarin.PreBuilt.iOS 0x0000000102e0aa60 mono_runtime_try_invoke + 156 12 Xamarin.PreBuilt.iOS 0x0000000102e0c668 mono_runtime_invoke + 100 13 Xamarin.PreBuilt.iOS 0x0000000102cbd358 _ZL31native_to_managed_trampoline_36P11objc_objectP13objc_selectorPP11_MonoMethodj

  • 244 14 Xamarin.PreBuilt.iOS 0x0000000102cbd258 -[UIKit_UIControlEventProxy BridgeSelector] + 44 15 UIKitCore 0x00000001b21a291c B718818B-0B80-3807-83BF-BB4FD626F70C + 11700508 16 UIKitCore 0x00000001b1b3a5bc B718818B-0B80-3807-83BF-BB4FD626F70C + 4982204 17 UIKitCore 0x00000001b1b3a900 B718818B-0B80-3807-83BF-BB4FD626F70C + 4983040 18 UIKitCore 0x00000001b1b39238 B718818B-0B80-3807-83BF-BB4FD626F70C + 4977208 19 UIKitCore 0x00000001b1d1fca8 B718818B-0B80-3807-83BF-BB4FD626F70C + 6970536 20 UIKitCore 0x00000001b1d1de38 B718818B-0B80-3807-83BF-BB4FD626F70C + 6962744 21 UIKitCore 0x00000001b21df0fc B718818B-0B80-3807-83BF-BB4FD626F70C + 11948284 22 UIKitCore 0x00000001b21ba4fc B718818B-0B80-3807-83BF-BB4FD626F70C + 11797756 23 UIKitCore 0x00000001b223c76c B718818B-0B80-3807-83BF-BB4FD626F70C + 12330860 24 UIKitCore 0x00000001b2240f0c B718818B-0B80-3807-83BF-BB4FD626F70C + 12349196 25 UIKitCore 0x00000001b22381cc B718818B-0B80-3807-83BF-BB4FD626F70C + 12313036 26 CoreFoundation 0x00000001af8d9240 58021D2F-E0D8-3FD1-805D-ECF92B4E0CB0 + 631360 27 CoreFoundation 0x00000001af8d9140 58021D2F-E0D8-3FD1-805D-ECF92B4E0CB0 + 631104 28 CoreFoundation 0x00000001af8d8488 58021D2F-E0D8-3FD1-805D-ECF92B4E0CB0 + 627848 29 CoreFoundation 0x00000001af8d2a40 58021D2F-E0D8-3FD1-805D-ECF92B4E0CB0 + 604736 30 CoreFoundation 0x00000001af8d2200 CFRunLoopRunSpecific + 572 31 GraphicsServices 0x00000001c5a4f598 GSEventRunModal + 160 32 UIKitCore 0x00000001b219bbcc B718818B-0B80-3807-83BF-BB4FD626F70C + 11672524 33 UIKitCore 0x00000001b21a11a0 UIApplicationMain + 164 34 Xamarin.PreBuilt.iOS 0x0000000102f00d4c do_icall + 212 35 Xamarin.PreBuilt.iOS 0x0000000102eff460 do_icall_wrapper + 296 36 Xamarin.PreBuilt.iOS 0x0000000102ef5edc interp_exec_method_full + 3128 37 Xamarin.PreBuilt.iOS 0x0000000102ef4310 interp_runtime_invoke + 336 38 Xamarin.PreBuilt.iOS 0x0000000102d5ad18 mono_jit_runtime_invoke + 904 39 Xamarin.PreBuilt.iOS 0x0000000102e0922c mono_runtime_invoke_checked + 148 40 Xamarin.PreBuilt.iOS 0x0000000102e0f8e0 mono_runtime_try_invoke_array + 1284 41 Xamarin.PreBuilt.iOS 0x0000000102db7930 ves_icall_InternalInvoke + 1036 42 Xamarin.PreBuilt.iOS 0x0000000102dc7ad4 ves_icall_InternalInvoke_raw + 108 43 Xamarin.PreBuilt.iOS 0x0000000102f00d4c do_icall + 212 44 Xamarin.PreBuilt.iOS 0x0000000102eff460 do_icall_wrapper + 296 45 Xamarin.PreBuilt.iOS 0x0000000102ef5edc interp_exec_method_full + 3128 46 Xamarin.PreBuilt.iOS 0x0000000102ef4310 interp_runtime_invoke + 336 47 Xamarin.PreBuilt.iOS 0x0000000102d5ad18 mono_jit_runtime_invoke + 904 48 Xamarin.PreBuilt.iOS 0x0000000102e0922c mono_runtime_invoke_checked + 148 49 Xamarin.PreBuilt.iOS 0x0000000102e0e4d0 mono_runtime_exec_main_checked + 128 50 Xamarin.PreBuilt.iOS 0x0000000102d3f8f4 mono_jit_exec
  • 376 51 Xamarin.PreBuilt.iOS 0x0000000102ef1e38 xamarin_main
  • 1976 52 Xamarin.PreBuilt.iOS 0x0000000102d06044 main + 84 53 libdyld.dylib 0x00000001af5b1588 97942B47-8579-3037-ABC2-61C035EF1E70 + 5512

    Source=Xamarin.iOS StackTrace: at ObjCRuntime.Runtime.ThrowNSException (System.IntPtr ns_exception) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/ 14.2.0.12/src/Xamarin.iOS/ObjCRuntime/Runtime.cs:407 at ObjCRuntime.Runtime.throw_ns_exception (System.IntPtr exc) [0x00000] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/runtime/Delegates.generated.cs:128 at (wrapper native-to-managed) ObjCRuntime.Runtime.throw_ns_exception(intptr)

On Thu, Oct 29, 2020 at 11:41 AM Gerald Versluis < notifications@github.com> wrote:

Indeed, we tried with three people running on different physical devices and trying to come up with different scenarios and reasons why this happens to you, but we can't reproduce this behavior.

Please let us know if you make any progress in identifying an error message or stacktrace or anything and we will gladly look into it!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/xamarin/XamarinCommunityToolkit/issues/503#issuecomment-718947291, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIKALB7M6JDW25Y46UCXE3SNGZOXANCNFSM4S7WPSQA .

gkenaston commented 4 years ago

I think the problem is in the delegate.

image

gkenaston commented 4 years ago

Sorry for all the posts, but I think I'm getting close.

Is WillCapturePhotoAnimation supposed to be here?

image

jfversluis commented 4 years ago

Don't worry about the posts, that's what GitHub is for :D

Great info and investigation, thank you for that. As for your last questions, this is deep into Xamarin.iOS. Not sure what needs or doesn't need to be in there. This is interesting stuff though.

Since you are the only one able to reproduce, would you be willing and/or able to maybe hook up your repro project to the direct source of the Toolkit? That will make it easier to walk through it. Or you could use Source Link

cindycluck commented 2 years ago

@jfversluis hi, I also met this crash from 2021 July to now in my xamarin form ios project. I test on my iphone 13 and iphone se2.