Originally created by @ghost on GitHub (May 8, 2024).
Hey John!
I am facing an issue debugging on an iOS 16.6.1 test device using Xcode 15.3, CoreStore 9.2.
An assertion failure is sometimes happening with updates to ListState that are covered behind a sheet.
During deinit, when removeObserver(_ observer: T) gets called in ListPublisher:164 the assertion on Thread.isMainThread is triggered because SwiftUI sometimes uses com.apple.SwiftUI.AsyncRenderer to apply view updates.
As it is just an assertion and not a general abort, it is not an issue in release builds. But for convenience check that if that might raise an issue somewhere, you can workaround the assertion failure by extending the check on Thread.isMainThread || Thread.current.name == "com.apple.SwiftUI.AsyncRenderer", if that is considered safe for you.
Originally created by @ghost on GitHub (May 8, 2024).
Hey John!
I am facing an issue debugging on an iOS 16.6.1 test device using Xcode 15.3, CoreStore 9.2.
An assertion failure is sometimes happening with updates to ListState that are covered behind a sheet.
During deinit, when removeObserver(_ observer: T) gets called in ListPublisher:164 the assertion on Thread.isMainThread is triggered because SwiftUI sometimes uses com.apple.SwiftUI.AsyncRenderer to apply view updates.
As it is just an assertion and not a general abort, it is not an issue in release builds. But for convenience check that if that might raise an issue somewhere, you can workaround the assertion failure by extending the check on Thread.isMainThread || Thread.current.name == "com.apple.SwiftUI.AsyncRenderer", if that is considered safe for you.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @ghost on GitHub (May 8, 2024).
Hey John!
I am facing an issue debugging on an iOS 16.6.1 test device using Xcode 15.3, CoreStore 9.2.
An assertion failure is sometimes happening with updates to ListState that are covered behind a sheet.
During deinit, when removeObserver(_ observer: T) gets called in ListPublisher:164 the assertion on Thread.isMainThread is triggered because SwiftUI sometimes uses com.apple.SwiftUI.AsyncRenderer to apply view updates.
As it is just an assertion and not a general abort, it is not an issue in release builds. But for convenience check that if that might raise an issue somewhere, you can workaround the assertion failure by extending the check on Thread.isMainThread || Thread.current.name == "com.apple.SwiftUI.AsyncRenderer", if that is considered safe for you.
@JohnEstropia commented on GitHub (May 9, 2024):
Thanks for reporting this. I'll try looking for a workaround