Skip to content
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

[@nstudio/nativescript-barcodescanner] [iOS] Crash on exit from scanner #145

Open
Yauheni-Matveyenka opened this issue Nov 9, 2023 · 5 comments

Comments

@Yauheni-Matveyenka
Copy link

Yauheni-Matveyenka commented Nov 9, 2023

App crashes when I close the scanner on iOS. Android is ok.
Issue reproduce with "@nativescript/ios": "8.6.0+"

Thread 0 name:
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000001d72dd01c __pthread_kill + 8 (:-1)
1 libsystem_pthread.dylib 0x00000001f98e2680 pthread_kill + 268 (pthread.c:1681)
2 libsystem_c.dylib 0x00000001986dbbb0 abort + 180 (abort.c:118)
3 libsystem_c.dylib 0x00000001986daecc __assert_rtn + 284 (assert.c:94)
4 NativeScript 0x0000000103cdd190 tns::Assert(bool, v8::Isolate*, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) (.cold.1) + 40 (Helpers.mm:643)
5 NativeScript 0x00000001031e33e0 tns::Assert(bool, v8::Isolate*, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) + 132 (Helpers.mm:643)
6 NativeScript 0x00000001031a35dc tns::ArgConverter::Invoke(v8::Localv8::Context, objc_class*, v8::Localv8::Object, tns::V8Args&, tns::MethodMeta const*, bool) + 112 (ArgConverter.mm:30)
7 NativeScript 0x00000001031c7b48 tns::MetadataBuilder::InvokeMethod(v8::Localv8::Context, tns::MethodMeta const*, v8::Localv8::Object, tns::V8Args&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator... + 88 (MetadataBuilder.mm:853)
8 NativeScript 0x00000001031c6ff4 tns::MetadataBuilder::MethodCallback(v8::FunctionCallbackInfov8::Value const&) + 220 (MetadataBuilder.mm:676)
9 NativeScript 0x00000001032e76cc v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) + 276
10 NativeScript 0x00000001032e6d08 v8::internal::MaybeHandlev8::internal::Object v8::internal::(anonymous namespace)::HandleApiCallHelper(v8::internal::Isolate*, v8::internal::Handlev8::internal::HeapObject, v8::internal:... + 504
11 NativeScript 0x00000001032e64a4 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) + 240
12 NativeScript 0x0000000103b71f4c Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit + 108
13 NativeScript 0x0000000103affe58 Builtins_InterpreterEntryTrampoline + 248
14 NativeScript 0x0000000103bbb43c Builtins_PromiseConstructor + 1820
15 NativeScript 0x0000000103afd5d4 Builtins_JSBuiltinsConstructStub + 340
16 NativeScript 0x0000000103c022f8 Builtins_ConstructHandler + 664
17 NativeScript 0x0000000103affe58 Builtins_InterpreterEntryTrampoline + 248
18 NativeScript 0x0000000103afdc68 Builtins_ConstructProxy + 488
19 NativeScript 0x0000000103c022f8 Builtins_ConstructHandler + 664
20 NativeScript 0x0000000103affe58 Builtins_InterpreterEntryTrampoline + 248
21 NativeScript 0x0000000103afe190 Builtins_JSEntryTrampoline + 176
22 NativeScript 0x0000000103afde24 Builtins_JSEntry + 164
23 NativeScript 0x00000001034b78c4 v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) + 2680
24 NativeScript 0x00000001034b6e18 v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::Handlev8::internal::Object, v8::internal::Handlev8::internal::Object, int, v8::internal::Handlev8::internal::Object) + 212
25 NativeScript 0x0000000103267f70 v8::Function::Call(v8::Localv8::Context, v8::Localv8::Value, int, v8::Localv8::Value
) + 652
26 NativeScript 0x00000001031a5320 tns::ArgConverter::MethodCallback(ffi_cif*, void*, void**, void*) + 1260 (ArgConverter.mm:172)
27 NativeScript 0x0000000103216eac ffi_closure_SYSV_inner + 800
28 NativeScript 0x00000001032181b4 .Ldo_closure + 20
29 BarcodeScannerFramework 0x00000001048ba5e4 __154-[QRCodeReaderViewController initWithCancelButtonTitle:codeReader:startScanningAtLoad:showSwitchCameraButton:showTorchButton:cancelButtonBackgroundColor:]_block_invoke + 296 (QRCodeReaderViewController.m:94)
30 BarcodeScannerFramework 0x00000001048bd870 -[QRCodeReader captureOutput:didOutputMetadataObjects:fromConnection:] + 436 (QRCodeReader.m:232)
31 AVFCapture 0x00000001aca06790 -[AVCaptureMetadataOutput _processSampleBuffer:] + 624 (AVCaptureMetadataOutput.m:1117)
32 AVFCapture 0x00000001aca064e0 __46-[AVCaptureMetadataOutput _updateRemoteQueue:]_block_invoke + 88 (AVCaptureMetadataOutput.m:902)
33 CMCapture 0x00000001b00b7230 __FigRemoteOperationReceiverCreateMessageReceiver_block_invoke + 112 (FigRemoteOperation.c:1508)
34 CMCapture 0x00000001b00b716c __rqReceiverSetSource_block_invoke + 260 (FigRemoteQueue.c:1563)
35 libdispatch.dylib 0x0000000198623300 _dispatch_client_callout + 20 (object.m:561)
36 libdispatch.dylib 0x00000001986267b8 _dispatch_continuation_pop + 600 (queue.c:306)
37 libdispatch.dylib 0x000000019863a5c0 _dispatch_source_latch_and_call + 420 (source.c:596)
38 libdispatch.dylib 0x0000000198639190 _dispatch_source_invoke + 832 (source.c:961)
39 libdispatch.dylib 0x00000001986318a8 _dispatch_main_queue_drain + 744 (queue.c:7813)
40 libdispatch.dylib 0x00000001986315b0 _dispatch_main_queue_callback_4CF + 44 (queue.c:7973)
41 CoreFoundation 0x000000019072c9bc CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 16 (CFRunLoop.c:1780)
42 CoreFoundation 0x00000001907296c8 __CFRunLoopRun + 1996 (CFRunLoop.c:3149)
43 CoreFoundation 0x0000000190728e18 CFRunLoopRunSpecific + 608 (CFRunLoop.c:3420)
44 GraphicsServices 0x00000001d31ed5ec GSEventRunModal + 164 (GSEvent.c:2196)
45 UIKitCore 0x0000000192b372fc -[UIApplication _run] + 888 (UIApplication.m:3690)
46 UIKitCore 0x0000000192b36938 UIApplicationMain + 340 (UIApplication.m:5275)
47 NativeScript 0x0000000103218044 ffi_call_SYSV + 68
48 NativeScript 0x0000000103216710 ffi_call_int + 968
49 NativeScript 0x00000001031fde4c tns::Interop::CallFunctionInternal(tns::MethodCall&) + 376 (Interop.mm:1515)
50 NativeScript 0x00000001031cd11c tns::MetadataBuilder::CFunctionCallback(v8::FunctionCallbackInfov8::Value const&)::$_2::operator()() const + 596 (MetadataBuilder.mm:887)
51 NativeScript 0x00000001031cd11c decltype(static_cast<tns::MetadataBuilder::CFunctionCallback(v8::FunctionCallbackInfov8::Value const&)::$_2&>(fp)()) std::__1::__invoke<tns::MetadataBuilder::CFunctionCallback(v8::FunctionCallbac... + 596 (type_traits:3918)
52 NativeScript 0x00000001031cd11c void std::__1::__invoke_void_return_wrapper<void, true>::__call<tns::MetadataBuilder::CFunctionCallback(v8::FunctionCallbackInfov8::Value const&)::$_2&>(tns::MetadataBuilder::CFunctionCallback(v8... + 596 (invoke.h:61)
53 NativeScript 0x00000001031cd11c std::__1::__function::__alloc_func<tns::MetadataBuilder::CFunctionCallback(v8::FunctionCallbackInfov8::Value const&)::$_2, std::__1::allocator<tns::MetadataBuilder::CFunctionCallback(v8::Function... + 596 (function.h:178)
54 NativeScript 0x00000001031cd11c std::__1::__function::__func<tns::MetadataBuilder::CFunctionCallback(v8::FunctionCallbackInfov8::Value const&)::$_2, std::__1::allocator<tns::MetadataBuilder::CFunctionCallback(v8::FunctionCallba... + 632 (function.h:352)
55 NativeScript 0x0000000103207740 std::__1::__function::__value_func<void ()>::operator()() const + 20 (function.h:505)
56 NativeScript 0x0000000103207740 std::__1::function<void ()>::operator()() const + 20 (function.h:1182)
57 NativeScript 0x0000000103207740 tns::Tasks::Drain() + 100 (Tasks.cpp:13)
58 TPMSPlusMobileApp 0x00000001020540e0 main + 224 (main.m:60)
59 dyld 0x00000001b2f13d44 start + 2104 (dyldMain.cpp:1269)

@Yauheni-Matveyenka Yauheni-Matveyenka changed the title [nativescript-barcodescanner] [iOS] Crash on exit from scanner [@nstudio/nativescript-barcodescanner] [iOS] Crash on exit from scanner Nov 9, 2023
@rob4226
Copy link

rob4226 commented Jan 16, 2024

I'm having the same issue, it crashes on exit, and after a scan.

@jessorlisa
Copy link

I'm experiencing a similar issue. With a freshly started device and app, I'm able to scan around 20 codes before it crashes. Following that, every second scan results in a crash, producing crash logs that are almost identical to those provided by @Yauheni-Matveyenka.

@rob4226
Copy link

rob4226 commented Feb 1, 2024

@jessorlisa If you're up to trying something new, checkout @nativescript/mlkit-barcode-scanning I found it works really well!

@jessorlisa
Copy link

@rob4226 switched to mlkit - thanks for the tip.

@andrewm-mitchells
Copy link

Same issue here. MLKit also fails to build currently

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants