-
Notifications
You must be signed in to change notification settings - Fork 545
Deadlock while using service #203
Comments
Hi llya, how do you start and stop your service ? Are you sure it is related to using a cachemanager ? Which version of RS do you use. Brief, we need more details. |
I use version 1.4.8. No, there is nothing about CacheManager. I found the root cause of this problem, but I had no time to analyze your code well. Briefly, my activity calls As I found, the problem occurs if I call Strictly speaking if SpiceManager connects to the service before anyone asks it for executing a request, everything's ok. I made a dirty workaround - added Now I took all your sources into my project and hacked If it's not just a stupid deadlock which could be fixed easily (I'm not sure how it should work), maybe you could create such an event (something like Please, tell me when this is solved thus I could update my version of RoboSpice and remove my hack. |
Hi @bigfatbrowncat , this will take some time. Next week I should find some time to dig into this issue. I will first setup a test and if it fails, I will try to resolve it and submit a new snapshot that you can try. This issue is close to another that I am aware of since a few days. I will detail it here as a reminder. Fire and forget requests don't work. If you execute a request and finish the activity right after execute, the request is not launched. |
Hi @stephanenicolas did you manage to find any time for this? I'm seeing very similar issues in the wild. With ANR's being reported with the threads deadlocked on waitForServiceToBeBound() call. FYI I have an Activity that calls SpiceManage.onStart(), immediately followed by a call to getAllCacheKeys(). execute is also called shortly after. Thanks, Ryan |
Hi @bigfatbrowncat and @rpk98c , not sure if this all still applies. Sorry for the delay, I took some time off. Can one of you provide a working (or better, a bugging) example somewhere on git ? Also, @rpk98c , getAllCacheKeys will block, and should not be called from the UI Thread. Meanwhile I close that thread. |
I have implemented a simple service based on RoboSpice's
SpiceService
class.When I use it, the application freezes accidentally (possible a kind of a deadlock) with this log:
The text was updated successfully, but these errors were encountered: