-
Notifications
You must be signed in to change notification settings - Fork 727
[epoxy-paging] Notify Executor crash in PagedListEpoxyController.submitList when used with MvRx #677
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
Comments
Thanks for reporting - I don't see anything wrong with your setup at first glance. Can you post a stacktrace? any debugging you could do on your side would be helpful too. How rare is this? |
Here's a stacktrace:
|
Hmmm, debugged this more. So it seems like the If I explicitly pass in a Handler which uses main looper, the crashes disappear.
|
Thanks for digging into this, it is very strange that manually using Possibly there is a bug in how the default main handler is set up, although the code does look pretty straightforward, I'll see what I can figure out. I'm glad you have a workaround in the meantime though - once you manually set that handler you don't have any more issues? |
Allows us to workaround airbnb/epoxy#677
Wow, bizarre! That is very helpful though. You wouldn't by any chance be setting The model building looper you are showing is using a HandlerThread with the name It is static and a global setting, so that would be an easy mistake to make. |
Woops, turns out that I was manually setting |
Ah, glad you figured it out. Any thoughts on how to make it harder to make this mistake? I think an easy change would be to print out the thread information of both threads when the same thread validation is done. |
This is a follow on from #567 but specifically when used with MvRx.
I'm seeing sporadic:
java.lang.IllegalArgumentException: The notify executor for your PagedList must use the same thread as the model building handler set in PagedListEpoxyController.modelBuildingHandler
exceptions when used with MvRx.I've checked the loopers in my Fragment's
invalidate()
andLooper.myLooper == Looper.getMainLooper
. I'm using the defaultmodelBuildingHandler
so I don't think this is an obvious threading issueMy paging setup is here and my submit is here.
This might be something to do with the fact that MvRx is async all the time. I'll try and debug this more tomorrow, but figured I'd throw this up here in case anyone is using MvRx + Paging + Epoxy together.
The text was updated successfully, but these errors were encountered: