ANR exception

marcick

Well-Known Member
Licensed User
Longtime User
Hope not to put a stupid question ...

Looking to the report of some users of my app, I see sometimes an Application_Not_Responding exception, that cause the App to stop.
Difficult to understand for me (understanding the stack) where and why it happened, but my question is:
Is there a bad way to write a program, that can cause this error ?
Or anything I write this should never happen ?
I wonder if there are some errors not to be done, if there are some basic rules to respect, some structures to avoid.

Marco
 

Mike Maurice

Member
Licensed User
Longtime User
I have been trying to eliminate an ANR (app not responding) problem in a blue tooth app that uses very high speed intensive data transfers. Over this weekend I seem to have solved the problem. It will take some more testing during this coming week to be sure. But, The problem was some "ToastMessageShow" calls that apparently were being queued up and displayed one after the other, but the ANR would not display until about 15 to 20 seconds later. There is nothing even hinted at in the B4A forums or even the android ones that this could trigger an ANR in this way. By the way, I had been testing on Android Versions 4.4.2, 4.4.3 and 4.4.4 and with each update the problem had been getting worse.
I don't suggest that this is an issue whenever you see an ANR, but if you can't find the problem and have run out of possibilities you may want to think about this.
 
Upvote 0

Douglas Farias

Expert
Licensed User
Longtime User
hi erel

i have in my app also a lot of loops
and get also ANR error

what can i do to avoid ANR massages?

is there a "doinbackground" possibility??

like i have read here Keeping Your App Responsive | Android Developers

thanx

is there a "doinbackground" possibility???
i have the same problem, my app works fine when user press continue
but problem is the button close *-*

have a way to dont show this arn dialog, or make this more long? 15 seconds etc???
 
Upvote 0
Top