Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Back-to-Back Choice Sets Can Fail #2018

Closed
joeljfischer opened this issue Jul 6, 2021 · 1 comment · Fixed by #2019
Closed

Back-to-Back Choice Sets Can Fail #2018

joeljfischer opened this issue Jul 6, 2021 · 1 comment · Fixed by #2019
Assignees
Labels
bug A defect in the library manager-screen Relating to the manager layer - screen managers

Comments

@joeljfischer
Copy link
Contributor

joeljfischer commented Jul 6, 2021

Bug Report

I'm seeing a bug in the choice set manager where back-to-back choice sets can fail. Because the SDLPresentChoiceSetOperation uses the standard completionBlock, which runs after the operation completes and the next one starts, if two present operations are next to each other, the second should run, but I've seen cases where that does not happen. This is because the completionBlock clears the pendingPresentationSet, which may no longer be the running presentation set.

Instead, we should do as we do in the alert manager and add pending presentations to the queue and cancel previous non-executing ones if a new one is added.

Reproduction Steps
  1. Create a choice set
  2. Before an option is pressed, present a new choice set
Expected Behavior

The second choice set appears

Observed Behavior

The second choice set fails to appear because the choice set is nil in the PresentChoiceSetOperation. This is because it's set to nil in sdl_presentChoiceSetWithMode in the completionBlock.

OS & Version Information
  • iOS Version: iOS 14.6
  • SDL iOS Version: v7.2.0
  • Testing Against: Manticore and Sync 3.4
Test Case, Sample Code, and / or Example App

n/a

@joeljfischer joeljfischer added bug A defect in the library manager-screen Relating to the manager layer - screen managers labels Jul 6, 2021
@joeljfischer joeljfischer self-assigned this Jul 6, 2021
@joeljfischer joeljfischer changed the title Back-to-Back Choice Sets Can Fail Unnecessarily Back-to-Back Choice Sets Can Fail Jul 6, 2021
@joeljfischer joeljfischer linked a pull request Jul 6, 2021 that will close this issue
4 tasks
@theresalech
Copy link
Contributor

Corresponding Java Suite issue: smartdevicelink/sdl_java_suite#1717.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug A defect in the library manager-screen Relating to the manager layer - screen managers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants