Skip to content

[Crash] ASDeallocQueue (15): Fatal error: Executing on background thread. Please use MainScheduler.instance.schedule to schedule work on main thread. #18

@mongris

Description

@mongris

With following code:

class MyView: ASDisplayNode {
  let data = BehaviorRelay<Section>

  override func didLoad() {
        super.didLoad()

        data.asDriver()
            .map({ [$0] })
            .drive(collectionView.rx.items(dataSource: dataSource))
            .disposed(by: disposeBag)
    }
}

The app will be crash when dismissed view controller because ASDisplayNode was dealloc
in background thread.

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