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

Fix NPE in TransportBorker #1882

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

JulianKast
Copy link
Contributor

@JulianKast JulianKast commented Dec 14, 2023

Fixes #1881

This PR is [ready] for review.

Risk

This PR makes [no] API changes.

Testing Plan

  • I have verified that I have not introduced new warnings in this PR (or explain why below)
  • I have run the unit tests with this PR
  • I have tested this PR against Core and verified behavior (if applicable, if not applicable, explain why below).
  • I have tested Android

Unit Tests

n/a

Core Tests

Test 1: (This is from our test plan using test suite and hello_sdl)

  1. This test needs two apps (app1 is custom RS, hello_sdl)
  2. Use test suite customRS flavor as an app1, start the app, then go to menu and click on "Start Custom RS"
  3. Use hello_sdl with multi_sec_off flavor for the second app but do the following changes:
    i. Change the UUID in MultiplexBluetoothTransport.SERVER_UUID to any other UUID
    ii. Modify the way MainActivity starts the SdlService to manually start the SdlService instead of calling queryForConnectedServices
  4. Start hello_sdl and make sure it connects through the custom RS

Test 2: (This is the accidental test I ran when I found the NPE)

  1. Run test 1 but have second app use multi_high_bandwidth flavor for hello_sdl
  2. Observe that the custom RS is connected, but app hello_sdl does not connect, no NPE in logs

Core version / branch / commit hash / module tested against: Sync 3
HMI name / version / branch / commit hash / module tested against: Sync 3

Summary

This PR fixes an NPE which can happen if we don't close the routerServiceMessageEmitter before we set routerServiceMessenger to null in TransportBroker.shutDownRouterServiceMessenger

Bug Fixes
  • Fix NPE in TransportBroker

CLA

@joeygrover joeygrover merged commit d34e5e7 into release/5.7.0_RC Dec 14, 2023
4 checks passed
@joeygrover joeygrover deleted the bugfix/issue_1881_transport_broker_npe branch December 14, 2023 16:35
@joeygrover joeygrover mentioned this pull request Dec 14, 2023
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

Successfully merging this pull request may close these issues.

2 participants