您好我正在开发一个使用ZXing库进行条形码识别的xamarin应用程序。我使用AVCaptureScannerViewController与自定义叠加。一切正常,直到我开始在AVCaptureScannerView.StartScanning
上收到这些错误:
Starting to scan...
StartScanning
critical:
Native stacktrace:
critical: 0 0x00000001001569e4 mono_handle_native_sigsegv + 260
critical: 1 libsystem_platform.dylib 0x0000000182fef348 _sigtramp + 52
critical: 2 libsystem_kernel.dylib 0x0000000182f29480 <redacted> + 100
critical: 3 libsystem_kernel.dylib 0x0000000182f294c8 system_set_sfi_window + 0
critical: 4 TCC 0x000000018616a560 <redacted> + 0
critical: 5 TCC 0x000000018616a45c <redacted> + 0
critical: 6 TCC 0x000000018616d52c <redacted> + 288
critical: 7 libxpc.dylib 0x000000018303401c <redacted> + 80
critical: 8 libxpc.dylib 0x0000000183033f8c <redacted> + 40
critical: 9 libdispatch.dylib 0x0000000182de91c0 <redacted> + 16
critical: 10 libdispatch.dylib 0x0000000182df7ab4 <redacted> + 732
critical: 11 libdispatch.dylib 0x0000000182df938c <redacted> + 572
critical: 12 libdispatch.dylib 0x0000000182df90ec <redacted> + 124
critical: 13 libsystem_pthread.dylib 0x0000000182ff12c8 _pthread_wqthread + 1288
critical: 14 libsystem_pthread.dylib 0x0000000182ff0db4 start_wqthread + 4
critical:
=================================================================
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.
=================================================================
我发现这发生在AVCaptureDeviceInput.FromDevice(captureDevice)
上。有趣的是,我将每次更改恢复到以前的工作状态,但问题仍然存在。