Skip to content

Crashes when initializing popup from background thread #373

Description

@aebanoidze
  • Xcode version 12.5.1: ℹ

  • PopupDialog version 1.1.1: ℹ

  • Minimum deployment target 13.4: ℹ

  • Language Swift: ℹ

  • Swift - Version 5.0: ℹ

  • Dependency manager CocoaPods: ℹ

  • Version 1.10.1: ℹ

I am trying to present DopupDialog from background thread:

let popup = PopupDialog(title: title, message: message, buttonAlignment: .horizontal, transitionStyle: .zoomIn, tapGestureDismissal: true, panGestureDismissal: true, hideStatusBar: false) {}

I am getting error:
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Modifications to the layout engine must not be performed from a background thread after it has been accessed from the main thread.'

Error happening on the line 57:

Screen Shot 2021-09-01 at 5 58 44 PM

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions