How Can I Solve this Crash when Compiling an iOS App with OpenCV Contrib using React Native?

故事扮演 提交于 2021-02-07 11:04:14

问题


trying to compile an iOS app with OpenCV 4.3 with contrib in a react native app. The app works fine in xcode, but as soon as I try compiling to bit code, the app fails. I've gone through several similar questions, but have not had any results and I'm hoping someone more experienced than I might have some suggestions.

The .ipa file does generate and I can test it on an iPad or iPhone, but as soon as the app opens, it crashes. Here is the crash log;

{"app_name":"helloOpenCV","timestamp":"2020-08-19 12:28:12.00 -0700","app_version":"1.0.0","slice_uuid":"ac62f4b8-acaa-3280-b516-c2bf59457f88","adam_id":1524526914,"build_version":"0","bundleID":"org.reactjs.native.example.ostrichtech","share_with_app_devs":0,"is_first_party":0,"bug_type":"109","os_version":"iPhone OS 13.6.1 (17G80)","incident_id":"022E1542-E13B-4D9C-8F11-EC181CAA230A","name":"helloOpenCV"}
Incident Identifier: 022E1542-E13B-4D9C-8F11-EC181CAA230A
CrashReporter Key:   1e73e0b5ca9fcb32b790521b18e0bd9d899b4d7f
Hardware Model:      xxx
Process:             helloOpenCV [1527]
Path:                /private/var/containers/Bundle/Application/540EE926-FB7E-47BD-B44F-6AD23FE645D8/helloOpenCV.app/helloOpenCV
Identifier:          org.reactjs.native.example.ostrichtech
Version:             0 (1.0.0)
AppStoreTools:       11E707
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           org.reactjs.native.example.ostrichtech [741]


Date/Time:           2020-08-19 12:28:12.4291 -0700
Launch Time:         2020-08-19 12:28:12.0061 -0700
OS Version:          iPhone OS 13.6.1 (17G80)
Release Type:        User
Baseband Version:    n/a
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Triggered by Thread:  0

Last Exception Backtrace:
0   CoreFoundation                  0x1aaa37654 __exceptionPreprocess + 224
1   libobjc.A.dylib                 0x1aa759bcc objc_exception_throw + 55
2   helloOpenCV                     0x102baa574 RCTFatal + 386420 (RCTAssert.m:146)
3   helloOpenCV                     0x102bbee14 __28-[RCTCxxBridge handleError:]_block_invoke + 470548 (RCTCxxBridge.mm:990)
4   libdispatch.dylib               0x1aa6fc9a8 _dispatch_call_block_and_release + 23
5   libdispatch.dylib               0x1aa6fd524 _dispatch_client_callout + 15
6   libdispatch.dylib               0x1aa6af5b4 _dispatch_main_queue_callback_4CF$VARIANT$mp + 903
7   CoreFoundation                  0x1aa9b56bc __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 11
8   CoreFoundation                  0x1aa9b0590 __CFRunLoopRun + 1723
9   CoreFoundation                  0x1aa9afba8 CFRunLoopRunSpecific + 423
10  GraphicsServices                0x1b4b1f344 GSEventRunModal + 159
11  UIKitCore                       0x1aeaeb3e4 UIApplicationMain + 1931
12  helloOpenCV                     0x102b53280 main + 29312 (main.m:14)
13  libdyld.dylib                   0x1aa8378f0 start + 3


Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_kernel.dylib          0x00000001aa82cd88 __pthread_kill + 8
1   libsystem_pthread.dylib         0x00000001aa7451e8 pthread_kill$VARIANT$mp + 136
2   libsystem_c.dylib               0x00000001aa698934 abort + 100
3   libc++abi.dylib                 0x00000001aa800cc0 __cxxabiv1::__aligned_malloc_with_fallback+ 76992 (unsigned long) + 0
4   libc++abi.dylib                 0x00000001aa7f2e10 demangling_unexpected_handler+ 19984 () + 0
5   libobjc.A.dylib                 0x00000001aa759e80 _objc_terminate+ 24192 () + 124
6   libc++abi.dylib                 0x00000001aa80014c std::__terminate(void (*)+ 74060 ()) + 16
7   libc++abi.dylib                 0x00000001aa8000e4 std::terminate+ 73956 () + 44
8   libdispatch.dylib               0x00000001aa6fd538 _dispatch_client_callout + 36
9   libdispatch.dylib               0x00000001aa6af5b4 _dispatch_main_queue_callback_4CF$VARIANT$mp + 904
10  CoreFoundation                  0x00000001aa9b56bc __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
11  CoreFoundation                  0x00000001aa9b0590 __CFRunLoopRun + 1724
12  CoreFoundation                  0x00000001aa9afba8 CFRunLoopRunSpecific + 424
13  GraphicsServices                0x00000001b4b1f344 GSEventRunModal + 160
14  UIKitCore                       0x00000001aeaeb3e4 UIApplicationMain + 1932
15  helloOpenCV                     0x0000000102b53280 main + 29312 (main.m:14)
16  libdyld.dylib                   0x00000001aa8378f0 start + 4

Thread 1:
0   libsystem_pthread.dylib         0x00000001aa751738 start_wqthread + 0

Thread 2:
0   libsystem_pthread.dylib         0x00000001aa751738 start_wqthread + 0

Thread 3:
0   libsystem_pthread.dylib         0x00000001aa751738 start_wqthread + 0

Thread 4:
0   libsystem_pthread.dylib         0x00000001aa751738 start_wqthread + 0

Thread 5 name:  com.apple.uikit.eventfetch-thread
Thread 5:
0   libsystem_kernel.dylib          0x00000001aa80b198 mach_msg_trap + 8
1   libsystem_kernel.dylib          0x00000001aa80a60c mach_msg + 72
2   CoreFoundation                  0x00000001aa9b5328 __CFRunLoopServiceMachPort + 148
3   CoreFoundation                  0x00000001aa9b035c __CFRunLoopRun + 1160
4   CoreFoundation                  0x00000001aa9afba8 CFRunLoopRunSpecific + 424
5   Foundation                      0x00000001aad0101c -[NSRunLoop+ 32796 (NSRunLoop) runMode:beforeDate:] + 228
6   Foundation                      0x00000001aad00efc -[NSRunLoop+ 32508 (NSRunLoop) runUntilDate:] + 88
7   UIKitCore                       0x00000001aeb8e57c -[UIEventFetcher threadMain] + 152
8   Foundation                      0x00000001aae2fe20 __NSThread__start__ + 848
9   libsystem_pthread.dylib         0x00000001aa74dd98 _pthread_start + 156
10  libsystem_pthread.dylib         0x00000001aa75174c thread_start + 8

Thread 6:
0   libsystem_pthread.dylib         0x00000001aa751738 start_wqthread + 0

Thread 7:
0   libsystem_pthread.dylib         0x00000001aa751738 start_wqthread + 0

Thread 8:
0   libsystem_pthread.dylib         0x00000001aa751738 start_wqthread + 0

Thread 9 name:  com.facebook.react.JavaScript
Thread 9:
0   libsystem_kernel.dylib          0x00000001aa80b198 mach_msg_trap + 8
1   libsystem_kernel.dylib          0x00000001aa80a60c mach_msg + 72
2   CoreFoundation                  0x00000001aa9b5328 __CFRunLoopServiceMachPort + 148
3   CoreFoundation                  0x00000001aa9b035c __CFRunLoopRun + 1160
4   CoreFoundation                  0x00000001aa9afba8 CFRunLoopRunSpecific + 424
5   helloOpenCV                     0x0000000102bbab68 +[RCTCxxBridge runRunLoop] + 453480 (RCTCxxBridge.mm:0)
6   Foundation                      0x00000001aae2fe20 __NSThread__start__ + 848
7   libsystem_pthread.dylib         0x00000001aa74dd98 _pthread_start + 156
8   libsystem_pthread.dylib         0x00000001aa75174c thread_start + 8

Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x0000000000000000
    x4: 0x00000001aa803f29   x5: 0x000000016d2b2630   x6: 0x000000000000006e   x7: 0xffffffffffffffec
    x8: 0x0000000103195840   x9: 0x4a916e5a4ccfbc7a  x10: 0x00000001aa745160  x11: 0x000000000000000b
   x12: 0x00000001e4b57080  x13: 0x0000000000000001  x14: 0x0000000000000010  x15: 0x0000000000000007
   x16: 0x0000000000000148  x17: 0x0000000000000000  x18: 0x0000000000000000  x19: 0x0000000000000006
   x20: 0x0000000000000407  x21: 0x000000016d2b2630  x22: 0x0000000103195920  x23: 0x0000000000000000
   x24: 0x0000000000000114  x25: 0x00000002811f1cc0  x26: 0x0000000103195920  x27: 0x00000000000020ff
   x28: 0x0000000002ffffff   fp: 0x000000016d2b2590   lr: 0x00000001aa7451e8
    sp: 0x000000016d2b2570   pc: 0x00000001aa82cd88 cpsr: 0x40000000
   esr: 0x56000080  Address size fault
 

This issue on git hub best describes what I'm dealing with, but I have had no luck with any of the given answers and I am not using Unity; https://github.com/f111fei/react-native-unity-view/issues/79

Thanks in advance to anyone who has a suggestion.

来源:https://stackoverflow.com/questions/63906206/how-can-i-solve-this-crash-when-compiling-an-ios-app-with-opencv-contrib-using-r

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!