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

The soft button manager can enter an infinite loop when artwork upload fails #1177

Closed
NicoleYarroch opened this issue Mar 7, 2019 · 2 comments
Assignees
Labels
bug A defect in the library
Projects

Comments

@NicoleYarroch
Copy link
Contributor

Bug Report

If the phone is disconnected from Core while soft button images are being uploaded, the soft button manager will enter an infinite loop trying to upload images. It should only attempt to upload the artworks the number of times set by the user in the SDLFileManagerConfiguration. I assume this bug will also occur if any of the soft button artwork uploads fail.

Reproduction Steps
  1. Connect the example app to Core
  2. Disconnect the example app from Core while the soft button images are being uploaded. Do not close the app.
Expected Behavior

The soft button manager stops attempting to upload images after the max number of uploads attempts has been reached (as set by the user in the SDLFileManagerConfiguration).

Observed Behavior

The soft button manager enters an infinite loop of trying to upload the image.

OS & Version Information
  • iOS Version: n/a
  • SDL iOS Version: 6.1
  • Testing Against: n/a
Test Case, Sample Code, and / or Example App

Soft Button Manager Infinite Loop.log.zip

@NicoleYarroch NicoleYarroch added the bug A defect in the library label Mar 7, 2019
@NicoleYarroch NicoleYarroch self-assigned this Apr 2, 2019
@NicoleYarroch
Copy link
Contributor Author

In the soft button manager's sdl_updateWithCompletionHandler: method, when an artwork fails to upload (either because the image upload fails or the file manager is not in the ready state) the manager enters an infinite recursive loop where it attempts to upload the same artworks again and again. The sdl_uploadInitialStateImages: and sdl_uploadOtherStateImages: methods called from sdl_updateWithCompletionHandler: do not take into account that the file manager is responsible for the re-upload attempts so logic should be added to make sure the soft button manager only attempts to upload the artworks once.

@theresalech
Copy link
Contributor

Closed via #1251

@theresalech theresalech added this to To do in v6.3 via automation May 23, 2019
@theresalech theresalech moved this from To do to Done in v6.3 May 23, 2019
@joeljfischer joeljfischer mentioned this issue Jun 24, 2019
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A defect in the library
Projects
No open projects
v6.3
  
Done
Development

No branches or pull requests

2 participants