android-anr-dialog

Android not responding if Debugging. If not in Debug app works normally

让人想犯罪 __ 提交于 2019-12-10 18:31:42
问题 When I'm debugging and the app hits an breakpoint, I can debug normally for a while. Some time later, Android displays the ANR Dialog, but I still can debug normally. If I don't click on the Phone's screen, it ends the debug, so I need to keep my eye on the screen when debugging and that's annoying and really wastes my time, because sometimes the dialog keeps popping every 10 seconds. I don't know what is causing this. I tried restarting the Machine, Phone, ADB and already tried using

Is it okay to Query the DownloadManager on the UI Thread?

允我心安 提交于 2019-12-10 13:08:46
问题 The DownloadManager has a method query(). My question is if it's okay to call this method on the UI Thread, or if it should only be called from a background thread? Can calling it ever cause an ANR? 回答1: If one looks at the source of the query() method: public Cursor query(Query query) { Cursor underlyingCursor = query.runQuery(mResolver, UNDERLYING_COLUMNS, mBaseUri); if (underlyingCursor == null) { return null; } return new CursorTranslator(underlyingCursor, mBaseUri); } ... this could be

Android - Forcing ANR for testing purpose

冷暖自知 提交于 2019-12-09 06:19:13
问题 Why i can't force Android ANR with this code? No log messages or pop up. The application is just launched lazily. [UPDATE] I can't get it even sleeping a View.setOnClickListener or BroadcastReceiver.onReceive! Is there a trick? public class MainActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); try { Thread.sleep(10000); } catch (InterruptedException e) { Log.e("Test", "", e); } }

ANR in SurfaceView method “onTouchEvent(…)” on Android

北慕城南 提交于 2019-12-07 12:06:41
问题 On Android, I've subclassed SurfaceView and the resulting view is working fine in most cases. However, roughly 1% of all users report an ANR problem with this implementation. Apparently, there's an edge case where the SurfaceView fails due to some problem, probably a deadlock. Unfortunately, I don't know what's wrong with my implementation of onDraw(...) and onTouchEvent(...) or how to improve the code. Can you help? "main" prio=5 tid=1 MONITOR | group="main" sCount=1 dsCount=0 obj=0x41920e88

How to change Application Not Responding (ANR) Timeout in AOSP [closed]

最后都变了- 提交于 2019-12-07 06:43:01
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 6 years ago . How do I change the Application Not Responding (ANR) timeout in the AOSP source code? The default timeout is 5 seconds, but where is that set and how do I change it? 回答1: The ANR Timeout is defined in File InputDispatcher.cpp (frameworks\base\libs\ui) . Copying and pasting that piece of code below.

How to get something useful from this ANR log

↘锁芯ラ 提交于 2019-12-07 05:04:20
问题 I'm struggling with ANRs for a few weeks now but I still feel blind with logs like this. It is too long for stackoverflow and I have no idea which part might be useful. It happens usually during initial synchronization when there is a ton of network request being processed in the background (and I'm almost 100% sure non of that is in the main thread) and I'm also making a lot of UI stuff like populating recyclerviews from shared preferences via RxJava observables so I'm observing a massive

Firebase ANR - Not even using firebase

房东的猫 提交于 2019-12-06 05:59:15
问题 With recent updates to GMS, a new ANR has been introduced. If you exit the app, and then return, that's when the ANR is initialized. The thread trace seems to point to Firebase, but I never even started using Firebase. I guess it must be part of the new GMS package? 06-11 00:34:00.143: E/ActivityManager(1487): ANR in com.myapp 06-11 00:34:00.143: E/ActivityManager(1487): PID: 19700 06-11 00:34:00.143: E/ActivityManager(1487): Reason: Broadcast of Intent { act=com.google.firebase.INSTANCE_ID

ANR in SurfaceView method “onTouchEvent(…)” on Android

核能气质少年 提交于 2019-12-05 22:09:53
On Android, I've subclassed SurfaceView and the resulting view is working fine in most cases. However, roughly 1% of all users report an ANR problem with this implementation. Apparently, there's an edge case where the SurfaceView fails due to some problem, probably a deadlock. Unfortunately, I don't know what's wrong with my implementation of onDraw(...) and onTouchEvent(...) or how to improve the code. Can you help? "main" prio=5 tid=1 MONITOR | group="main" sCount=1 dsCount=0 obj=0x41920e88 self=0x4190f8d0 | sysTid=13407 nice=0 sched=0/0 cgrp=apps handle=1074618708 | state=S schedstat=(

How to change Application Not Responding (ANR) Timeout in AOSP [closed]

十年热恋 提交于 2019-12-05 09:55:15
Closed . This question needs details or clarity . It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post . Closed 6 years ago . How do I change the Application Not Responding (ANR) timeout in the AOSP source code? The default timeout is 5 seconds, but where is that set and how do I change it? The ANR Timeout is defined in File InputDispatcher.cpp (frameworks\base\libs\ui) . Copying and pasting that piece of code below. // Default input dispatching timeout if there is no focused application or paused window // from which to

ANR Input dispatching timed out

删除回忆录丶 提交于 2019-12-05 08:34:23
问题 ANR Input dispatching timed out (Waiting to send non-key event because the touched window has not finished processing certain input events that were delivered to it over 500.0ms ago. Wait queue length: 60. Wait queue head age: 8503.2ms.) Hi! I'm getting this strange ANR-report from several users. Unfortunately, I have very limited knowledge about ANR-reports, and I'm hoping that someone can help me to understand what the cause of this could be "main" prio=5 tid=1 Suspended | group="main"