Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

OnLowMemory causing a deadlock?

$
0
0

We've been seeing this issue for a while and I just can't get to the bottom of it. Occasionally, our app deadlocks with an ANR. When I check the logs, the main thread has this trace:

at app.droid.FeedListActivity.n_onLowMemory(Native Method)  
at app.droid.FeedListActivity.onLowMemory(FeedListActivity.java:55) 
at android.app.ActivityThread.handleLowMemory(ActivityThread.java:3858) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1323) 
at android.os.Handler.dispatchMessage(Handler.java:99)  
at android.os.Looper.loop(Looper.java:137)  
at android.app.ActivityThread.main(ActivityThread.java:4745)    
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:511) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)  
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) 

at dalvik.system.NativeStart.main(Native Method)

That activity's OnLowMemory is pretty simple-- it just calls the OnLowMemory of a MapView it owns:

public override void OnLowMemory()
{
    //base.OnLowMemory();
    if (_MapInitialized)
        _MapView.OnLowMemory();
}

I've tried it both with and without the call to base.OnLowMemory() and have seen the deadlock both ways. Any idea what could be going wrong here, or how I can even go about debugging it?


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>