-
Notifications
You must be signed in to change notification settings - Fork 545
Reliable ANR related to SpiceServiceListener when SpiceManager is Starting #270
Comments
👍 Seems to be related to #203 and comes in various flavors. In our case an activity causes the manager to be started and stopped in a quick succession, which results in one thread being at |
I tried to reproduce this simply using the Robospice-Retrofit example and could not. After more testing, I can only reproduce this ANR when I have added any SpiceServiceListener to the current SpiceManager. I'll update the issue title to reflect this. |
@stephanenicolas Any idea what might cause an ANR when using a SpiceServiceListener? Having the screen off seems to reproduce this reliably, but it can also happen in other ways. Thanks! |
@colintheshots Sorry for the very long delay. Can you still reproduce that bug with 1.4.12 or current 1.4.13 snapshots ? |
I am really struggling to reproduce this error. Do you have a small snippet of activity showing the bug. Can you also check it is still present with 1.4.13 ? |
@colintheshots and @k0dek0mmand0 , I am trying a new approach, blindly as I can't reproduce the bug. Please try the latest 1.4.13 snapshot and report back. Thanks in advance and sorry for the delay to answer. |
Using 1.4.12, I just added getSpiceManager().addSpiceServiceListener(new MySpiceServiceListener()) to onResume in some existing sample code and ran it while the screen was off on my Nexus 4. The result was an ANR when I switched on the screen. MySpiceServiceListener, in this case, simply implements the interface with no code added to any functions. I'll try your 1.4.13 snapshot. |
I tried that but couldn't get an ANR. You just add the spice service 2014-06-11 10:48 GMT-04:00 Colin Lee [email protected]:
|
Yes, I simply added the SpiceServiceListener to this sample code in SampleSpiceActivity and it reproduced the bug: https://github.com/colintheshots/robospice-minnebar-example |
@colintheshots Okay, let me try this, cloning your repo. |
I believe it works with the Robospice Retrofit sample app. You just need to make sure the code goes in the onResume() of the first activity that loads. |
Thx @colintheshots , I got it :) It looks like the latest SNAPSHOT of 1.4.13 resolved the problem. On my phone, the bug is gone with the snapshot, and present with 1.4.12. (Nexus 4, latest kitkat) Can you confirm the issue is closed ? |
I was working from source and having issues getting my compilation environment right. Where are the SNAPSHOTS? |
https://github.com/stephanenicolas/robospice/wiki/Using-RoboSpice-snapshots 2014-06-11 12:24 GMT-04:00 Colin Lee [email protected]:
|
I verified that this ANR bug appears to be fixed. |
Thank you very much for the follow-up though there was a very long time you reported the bug. |
I get this in some of my apps using 1.4.12. |
Never mind, I managed to build the snapshot myself. |
In case you want to do it again, look at the wiki, you will find the maven S. 2014-07-26 10:12 GMT+02:00 Moritz Pfeiffer [email protected]:
|
I have noticed that I can reliably produce an Application Not Responding error which seems to be an infinite deadlock using Robospice 1.4.11 with robospice-retrofit if I attempt to install and run the app via ADB while the screen is off on the physical device. The device used is a Nexus 7 (2012) running the most recent version of KitKat 4.4.2. It looks like the SpiceManager is attempting to start and stop at the same time, resulting in a deadlock. I'm attaching the ANR traces.txt.
Although the method used to reproduce this bug is hardly a normal use case, I fear that this ANR may appear in other usage patterns which are more typical. For example, I would expect this problem to trigger when the app gets updated while the device screen is off.
The text was updated successfully, but these errors were encountered: