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

Calling dismissBulletin whilst bulletin is dismissing causes crash #148

Open
yusuftor opened this issue Feb 25, 2019 · 1 comment
Open

Comments

@yusuftor
Copy link

yusuftor commented Feb 25, 2019

If I call bulletinManager.dismissBulletin(animated: true) when the bulletin has already been dismissed, it crashes saying BLTNItemManager must only be used from the main thread. If the dismissBulletin() function is called immediately after the manager has been dismissed, bulletinManager.isShowingBulletin is still true. There needs to be a check like "if the manager is no longer presenting, or is in the middle of dismissing, ignore the call to dismiss".

I'm using the latest version of BulletinBoard

@yusuftor yusuftor changed the title Calling dismissBulletin causes crashes Calling dismissBulletin whilst bulletin is dismissing causes crash Feb 25, 2019
@kambala-decapitator
Copy link

Also facing same issue. I believe the crash actually happens in assertIsPrepared() because we've already ensured that all dismiss calls occur on the main thread. And for testing I could reproduce it by executing 2 dismiss calls in a row.

I'm using the following solution:

  1. add system("sed -i '' -e 's/fileprivate var isPrepared/public fileprivate(set) var isPrepared/' Pods/BulletinBoard/Sources/BLTNItemManager.swift") to post_install hook in the Podfile

  2. before calling dismiss, check that manager.isPrepared == true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants