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

[BlinkIDFlutterPlugin overlayDidTapClose:] EXC_BAD_ACCESS (KERN_INVALID_ADDRESS) #52

Open
radivojeostojic opened this issue Oct 30, 2023 · 9 comments

Comments

@radivojeostojic
Copy link

We've been encountering a growing number of errors lately reported in Firebase Crashlytics for users with iOS devices (16 and 17), and it seems to be directly related to the BlinkID plugin in our project. I am attaching stacktrace:

 Crashed: com.apple.main-thread
0  blinkid_flutter                0x4ac8 -[BlinkIDFlutterPlugin overlayDidTapClose:] + 133 (BlinkIDFlutterPlugin.m:133)
1  blinkid_flutter                0x6d68 -[MBBlinkIdOverlaySettingsSerialization blinkIdOverlayViewControllerDidTapClose:] + 180 (MBBlinkIdOverlaySettingsSerialization.m:180)
2  BlinkID                        0xabbf0 $sSo25NSMutableAttributedStringC7BlinkIDE6string5style4fontABSS_So16NSParagraphStyleCSo6UIFontCtcfc + 674088
3  libdispatch.dylib              0x4300 _dispatch_client_callout + 20
4  libdispatch.dylib              0x12998 _dispatch_main_queue_drain + 984
5  libdispatch.dylib              0x125b0 _dispatch_main_queue_callback_4CF + 44
6  CoreFoundation                 0x379bc __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
7  CoreFoundation                 0x346c8 __CFRunLoopRun + 1996
8  CoreFoundation                 0x33e18 CFRunLoopRunSpecific + 608
9  GraphicsServices               0x35ec GSEventRunModal + 164
10 UIKitCore                      0x22f2fc -[UIApplication _run] + 888
11 UIKitCore                      0x22e938 UIApplicationMain + 340
12 Runner                         0xb508 main + 11 (AppDelegate.swift:11)
13 ???                            0x1bb50bd44 (Missing)

com.apple.uikit.eventfetch-thread

We would like to know more about this issue because it's relatively hard to reproduce it locally.

Flutter version: 3.13.5
blinkid_flutter: 6.1.2

@mparadina
Copy link
Contributor

Hi @radivojeostojic

Are you able to reproduce the crash on your end?
If so, are you able to share the reproduction steps?

Also to ask, is the crash device specific?

@radivojeostojic
Copy link
Author

Hi, unfortunately I didn't manage to reproduce it on my end.

Crash is happening only on iOS 16 and 17 for now.

Screenshot 2023-10-30 at 15 05 47

@mparadina
Copy link
Contributor

Hi @radivojeostojic

Thank you for the feedback.

From the crash, I can see that the crash is occurring with the blinkIdOverlayViewControllerDidTapClose, which is responsible for handling the event when the end-user taps on the 'X' (close) button on the scanning UI.

We will try to reproduce it on our end and back to you.
In the meantime, please let me know if you manage to reproduce it on your end.

@radivojeostojic
Copy link
Author

radivojeostojic commented Nov 30, 2023

Hi @mparadina, anything new about this?

@mparadina
Copy link
Contributor

Hi @radivojeostojic

Apologies for the delay.
We have tested the reported behavior on multiple devices as we have released the new version of the SDK, but failed to reproduce it.

Were there any additional reports of the same crash?
Also, were you able to reproduce the crash on your end, and are able to share the reproduction steps?

@radivojeostojic
Copy link
Author

@mparadina We are still seeing these crash reports in Crashlytics last few months. It is still hard to reproduce it locally.

Here is the stacktrace:

Crashed: com.apple.main-thread
0  blinkid_flutter                0x4a58 -[BlinkIDFlutterPlugin overlayViewControllerDidFinishScanning:state:] + 124 (BlinkIDFlutterPlugin.m:124)
1  blinkid_flutter                0x6ea8 -[MBBlinkIdOverlaySettingsSerialization blinkIdOverlayViewControllerDidFinishScanning:state:] + 176 (MBBlinkIdOverlaySettingsSerialization.m:176)
2  BlinkID                        0xbcea0 __aarch64_swp1_acq + 736544
3  libdispatch.dylib              0x64094 <redacted> + 16
4  libdispatch.dylib              0x10d44 <redacted> + 928
5  libdispatch.dylib              0x10994 <redacted> + 36
6  CoreFoundation                 0x4e014 <redacted> + 12
7  CoreFoundation                 0xb4f8 <redacted> + 2544
8  CoreFoundation                 0x1e174 CFRunLoopRunSpecific + 572
9  GraphicsServices               0x1988 GSEventRunModal + 160
10 UIKitCore                      0x4e5a88 <redacted> + 1080
11 UIKitCore                      0x27ef78 UIApplicationMain + 336
12 Runner                         0xb52c main + 12 (AppDelegate.swift:12)
13 ???                            0x106bfc4d0 (Missing)

Devices:
Screenshot 2024-03-29 at 14 03 05

Last 30 days:
Screenshot 2024-03-29 at 14 03 47

@radivojeostojic
Copy link
Author

Here is the new stacktrace for last seven days:

Crashed: com.apple.main-thread
0  blinkid_flutter                0x4a58 -[BlinkIDFlutterPlugin overlayViewControllerDidFinishScanning:state:] + 124 (BlinkIDFlutterPlugin.m:124)
1  blinkid_flutter                0x6ea8 -[MBBlinkIdOverlaySettingsSerialization blinkIdOverlayViewControllerDidFinishScanning:state:] + 176 (MBBlinkIdOverlaySettingsSerialization.m:176)
2  BlinkID                        0xbcea0 __aarch64_swp1_acq + 736544
3  libdispatch.dylib              0x4300 _dispatch_client_callout + 20
4  libdispatch.dylib              0x12998 _dispatch_main_queue_drain + 984
5  libdispatch.dylib              0x125b0 _dispatch_main_queue_callback_4CF + 44
6  CoreFoundation                 0x3720c __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
7  CoreFoundation                 0x33f18 __CFRunLoopRun + 1996
8  CoreFoundation                 0x33668 CFRunLoopRunSpecific + 608
9  GraphicsServices               0x35ec GSEventRunModal + 164
10 UIKitCore                      0x22c294 -[UIApplication _run] + 888
11 UIKitCore                      0x22b8d0 UIApplicationMain + 340
12 Runner                         0xb58c main + 13 (AppDelegate.swift:13)
13 ???                            0x1afc06dcc (Missing)

@mparadina
Copy link
Contributor

Hi @radivojeostojic

Thank you for the feedback.

From what I understand from the logs, the issues are occurring here, or to be more specific, here.
These methods handle the actions when the scanning process finishes and give back the scanning results.

Can you maybe check the implementation of these methods? Have they been correctly implemented?

@radivojeostojic
Copy link
Author

Hi @mparadina I checked how we perform scanning, and it doesn't seem to be different from the method proposed in the Sample app.

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

2 participants