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

Using Once right after app starts causes thread to freeze #21

Closed
Pkmmte opened this issue Mar 31, 2016 · 2 comments
Closed

Using Once right after app starts causes thread to freeze #21

Pkmmte opened this issue Mar 31, 2016 · 2 comments

Comments

@Pkmmte
Copy link

Pkmmte commented Mar 31, 2016

Using any Once method right when the application starts causes the entire thread to freeze. In my case, I'd like to use this library in my MainActivity to know if I should show the user an onboarding screen. However, calling Once.beenDone("seen_onboarding") caused a blank screen to be shown.

I was able to replicate this effect on a sample app quite easily with the following steps:

  1. Call Once.initialise(this) in the app's Application class onCreate().
  2. Call any Once method inside the MainActivity's onCreate().

Doing this will cause a blank screen. It's pretty straightforward but I can provide the sample app code if needed. This only happens in version 1.0.2 of the library. I'm guessing it's because the asynchronous loading never wakes up the thread that called it before it finished loading.

@jonfinerty
Copy link
Owner

Thanks for raising this, I'll look into it today hopefully. In the meantime it's probably best to just downgrade to v1.0.1

@jonfinerty
Copy link
Owner

This should be fixed now if you grab v1.0.3

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