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

Crash when re-connecting to carplay #184

Open
KestasVenslauskas opened this issue May 21, 2024 · 1 comment
Open

Crash when re-connecting to carplay #184

KestasVenslauskas opened this issue May 21, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@KestasVenslauskas
Copy link

KestasVenslauskas commented May 21, 2024

Describe the bug
App crashes after re-connected to car play and pressing on any list item.

To Reproduce

  1. Display root template where it would have list template with some list items.
  2. Shut down car play emulator.
  3. Re-open car play simulator.
  4. Observe same template is shown.
  5. Press on any list item.
  6. App crashes

Expected behavior
App should handle clicks as expected

Screenshots/Videos

Screen.Recording.2024-05-21.at.19.07.34.mov

CarPlay (please complete the following information):

  • Device: Simulator
  • OS version iOS 17
  • RNCarPlay version 2.4.0

Additional context
This bug was captured on production. Same behaviour can we observed with real device.
My guess is that CarScene keeps a reference to an old template even if the app is trying to set new root template.
This is a public project if you need to check any code.

Crashlytics info:
image

      Fatal Exception: NSInvalidArgumentException
0  CoreFoundation                 0x83f20 __exceptionPreprocess
1  libobjc.A.dylib                0x16018 objc_exception_throw
2  CoreFoundation                 0x15e6c -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]
3  CoreFoundation                 0x15a88 +[NSDictionary dictionaryWithObjects:forKeys:count:]
4  lrtApp                         0x9e0bf8 -[RNCarPlay listTemplate:didSelectListItem:completionHandler:] + 1273 (RNCarPlay.m:1273)
5  CarPlay                        0x1d3a0 __95-[CPListTemplate listTemplateWithIdentifier:didSelectListItemWithIdentifier:completionHandler:]_block_invoke
6  libdispatch.dylib              0x213c _dispatch_call_block_and_release
7  libdispatch.dylib              0x3dd4 _dispatch_client_callout
8  libdispatch.dylib              0x125a4 _dispatch_main_queue_drain
9  libdispatch.dylib              0x121b8 _dispatch_main_queue_callback_4CF
10 CoreFoundation                 0x56710 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
11 CoreFoundation                 0x53914 __CFRunLoopRun
12 CoreFoundation                 0x52cd8 CFRunLoopRunSpecific
13 GraphicsServices               0x11a8 GSEventRunModal
14 UIKitCore                      0x40a90c (Missing UUID 1741fa374e53371e8daed611aab0043d)
15 UIKitCore                      0x4be9d0 (Missing UUID 1741fa374e53371e8daed611aab0043d)
16 UIKitCore                      0x638384 (Missing UUID 1741fa374e53371e8daed611aab0043d)
17 lrtApp                         0x91ac main (AppDelegate.swift)
18 ???                            0x1c0151e4c (Missing)
    ```
@KestasVenslauskas KestasVenslauskas added the bug Something isn't working label May 21, 2024
@KestasVenslauskas
Copy link
Author

Additional testing results that might be usefull.
I observed this issue on 2.3.0 as well on 2.4.0-beta.2
But I also experience refreshing issue between those 2 versions.

  • Open carplay
  • Refresh the app (press R on react-native CLI)
  • On 2.3.0 carplay view blinks and refreshes.
  • On 2.4.0-beta.2 if not refreshing the UI at all and pressing on any list item does nothing (maybe callbacks are missing since new app instance is loaded?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant