Skip to content

ScreenManager's endUpdates() completion block never executes in case changes are not related to TextAndGraphicManager #1942

@FrankElias77

Description

@FrankElias77

Bug Report

The ScreenManager's endUpdates(completionHandler:) never executes in case the code executed between screenManager.beginUpdates() and screenManager.endUpdates(completionHandler:) are not related to the TextAndGraphicManager

SDLScreenManager.m:

- (void)endUpdatesWithCompletionHandler:(nullable SDLScreenManagerUpdateCompletionHandler)handler {
    self.softButtonManager.batchUpdates = NO;
    self.textAndGraphicManager.batchUpdates = NO;
    [self.textAndGraphicManager updateWithCompletionHandler:handler];
}

The handler only returns in SDLTextAndGraphicUpdateOperation 's finishOperation func and ignores the other managers(e.g. MenuManager, SoftButtonManager)

Reproduction Steps
      let state = SDLSoftButtonState(stateName: "1", text: "Button 1", artwork: nil)
      let button = SDLSoftButtonObject(name: "button", state: state, handler: nil)

      self.screenManager.beginUpdates()
      self.screenManager.softButtonObjects = [button]
      self.screenManager.endUpdates { (err) in
          let result: SmokeTestResult
          if let error = err {
              result = SmokeTestResult(success: false, info: "\(error)")
          } else {
              result = SmokeTestResult(success: true)
          }

          completionHandler(result)
      }
Expected Behavior

screenManager.endUpdates completion block should execute.

Observed Behavior

screenManager.endUpdates completion block does not get any response.

OS & Version Information
  • iOS Version: N/A
  • SDL iOS Version: Branch develop
  • Testing Against: Manticore
Test Case, Sample Code, and / or Example App

This bug was found while working on Smoke Tester app

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA defect in the librarymanager-screenRelating to the manager layer - screen managers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions