ANR Freeze Reports received for my application on Android Market

Hi Guys,

I have recently published an application on Android Market developed using the cocos2d-x engine. The problem I am facing is that I have received quite a few ANR Freeze reports on the market but can’t reproduce this on any of the devices I have(HTC Flyer, HTC Nexus One, Samsung Galaxy S1-2). I have went through all my code and cant find any place where I am doing anything heavy that might block the UI thread. I have pasted the trace below. Please help me out with this issue.

DALVIK THREADS: “main” prio=5 tid=1 NATIVE

Here is the stack trace :

at android.media.MediaPlayer.isPlaying(Native Method) at org.cocos2dx.lib.Cocos2dxMusic.pauseBackgroundMusic(SourceFile:81) at org.cocos2dx.lib.Cocos2dxActivity.onPause(SourceFile:265) at com.myapp.myappl.myappl.onPause(SourceFile:222) at android.app.Activity.performPause(Activity.java:3848) at
android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1190) at
android.app.ActivityThread.performPauseActivity(ActivityThread.java:3409) at
android.app.ActivityThread.performPauseActivity(ActivityThread.java:3379) at
android.app.ActivityThread.handlePauseActivity(ActivityThread.java:3362) at android.app.ActivityThread.access$2700(ActivityThread.java:129) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2114) at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143) at android.app.ActivityThread.main(ActivityThread.java:4701) at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:85
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:617) at dalvik.system.NativeStart.main(Native Method)
“AsyncTask #5” prio=5 tid=18 WAIT

Hello,
we have the similar stack trace. I think only on LG-P990 with android 2.3.4.

Mayby it happend after long time (over one hour) in suspend mode with previously played music?

at android.app.ActivityThread.performPauseActivity(ActivityThread.java:2354)
at android.app.ActivityThread.performPauseActivity(ActivityThread.java:2311)
at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:2291)
at android.app.ActivityThread.access$1700(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:861)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:619)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalStateException
at android.media.MediaPlayer.isPlaying(Native Method)
at org.cocos2dx.lib.Cocos2dxMusic.pauseBackgroundMusic(Cocos2dxMusic.java:120)
at org.cocos2dx.lib.Cocos2dxActivity.pauseBackgroundMusic(Cocos2dxActivity.java:166)
at org.cocos2dx.lib.Cocos2dxActivity.onPause(Cocos2dxActivity.java:245)
at com.lonelysockgames.Application.onPause(Application.java:145)
at android.app.Activity.performPause(Activity.java:3857)
at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1191)
at android.app.ActivityThread.performPauseActivity(ActivityThread.java:2341)
… 12 more
java.lang.IllegalStateException
at android.media.MediaPlayer.isPlaying(Native Method)
at org.cocos2dx.lib.Cocos2dxMusic.pauseBackgroundMusic(Cocos2dxMusic.java:120)
at org.cocos2dx.lib.Cocos2dxActivity.pauseBackgroundMusic(Cocos2dxActivity.java:166)
at org.cocos2dx.lib.Cocos2dxActivity.onPause(Cocos2dxActivity.java:245)
at com.lonelysockgames.Application.onPause(Application.java:145)
at android.app.Activity.performPause(Activity.java:3857)
at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1191)
at android.app.ActivityThread.performPauseActivity(ActivityThread.java:2341)
at android.app.ActivityThread.performPauseActivity(ActivityThread.java:2311)
at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:2291)
at android.app.ActivityThread.access$1700(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:861)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:619)
at dalvik.system.NativeStart.main(Native Method)