[epoxy-paging] Notify Executor crash in PagedListEpoxyController.submitList when used with MvRx
See original GitHub issueThis 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()
and Looper.myLooper == Looper.getMainLooper
. I’m using the default modelBuildingHandler
so I don’t think this is an obvious threading issue
My 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.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Timeline : try to get a better PagedList/Epoxy integration. Still ...
The notify thread of your PagedList (from setNotifyExecutor in the PagedList Builder) must be. * the same as this thread. Otherwise Epoxy will...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Woops, turns out that I was manually setting
defaultModelBuildingHandler
🤦♂️ . Thanks for the help!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.