Android Developer Console: Error Reports

Kevin

Well-Known Member
Licensed User
Longtime User
The Error Reports section in the Android Developer Console is a pretty handy tool, but I'm hoping to get some things clarified if possible.

1) I assume that these are not ALL of the crashes that have occured, but only crash reports that the user submitted? Maybe it's a setting in my phone, but of all of the apps that have crashed on my phone, I've never seen an option to report it. Some even leave comments, which is nice though often not very helpful. :D

2) I was hoping maybe someone could shed some light on how to correct some crashes I've seen reported. I believe they are likely isolated as I have never seen these during developing/using my app, and with over 10,000 downloads there are only 10 reports (1-4 of each below), but I would still like to prevent a complete "crash" for anyone if possible. As best I can tell, they all seem to be originating in the HttpUtilsService.

3) If I put Log ("stuff....") statements in my code (and in the right spots), would these log statements appear with the data sample below that the Dev. Console shows me?

(This is a long post, and for that I apologize!)

IllegalCharsetNameException: I'm not sure what to make of this as the only http responses my app should be getting are from DirecTV receivers. Possibly if they are in another country and the receiver names or show data use different character sets, but how or where would I check for this and display a message without crashing?
B4X:
 java.lang.RuntimeException: java.io.UnsupportedEncodingException: %s
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:145)
at anywheresoftware.b4a.BA$1.run(BA.java:210)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
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:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.io.UnsupportedEncodingException: %s
at java.io.InputStreamReader.<init>(InputStreamReader.java:89)
at org.apache.http.util.EntityUtils.toString(EntityUtils.java:130)
at anywheresoftware.b4a.http.HttpClientWrapper$HttpResponeWrapper.GetString(HttpClientWrapper.java:416)
at com.cognitial.directvremote.httputilsservice._hc_responseerror(httputilsservice.java:123)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:105)
... 10 more
Caused by: java.nio.charset.IllegalCharsetNameException: %s
at java.nio.charset.Charset.checkCharsetName(Charset.java:200)
at java.nio.charset.Charset.forName(Charset.java:290)
at java.io.InputStreamReader.<init>(InputStreamReader.java:85)
... 16 more

RejectedExecutionException: I use the HttpUtilsService and also a custom service which is a modified version of the HttpUtilsService, but apparently this error is coming up in the HttpUtilsService. While I suppose it's possible that the user may be trying to do a bunch of different things at once, other HTTP commands sent outside of the HttpUtilsService should not happen at the same time as commands using the HttpUtilsService, and certainly not enough to exceed the limit, but people seem to try some pretty crazy things. :D I couldn't use the HttpUtilsService alone because due to the nature of my app, for certain things it wasn't feasible. Again, just wondering if there is a way to trap this error (using Try/Catch) and if so, where?
B4X:
java.lang.RuntimeException: java.util.concurrent.RejectedExecutionException: pool=20/20, queue=0/0
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:145)
at anywheresoftware.b4a.BA$1.run(BA.java:210)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:150)
at android.app.ActivityThread.main(ActivityThread.java:4293)
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:849)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.util.concurrent.RejectedExecutionException: pool=20/20, queue=0/0
at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1961)
at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:794)
at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1315)
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:85)
at anywheresoftware.b4a.B4AThreadPool.submit(B4AThreadPool.java:39)
at anywheresoftware.b4a.BA.submitRunnable(BA.java:232)
at anywheresoftware.b4a.http.HttpClientWrapper.ExecuteCredentials(HttpClientWrapper.java:294)
at anywheresoftware.b4a.http.HttpClientWrapper.Execute(HttpClientWrapper.java:188)
at com.cognitial.directvremote.httputilsservice._processnexttask(httputilsservice.java:225)
at com.cognitial.directvremote.httputilsservice._hc_responseerror(httputilsservice.java:127)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:105)
... 10 more


NullPointerException: I have no idea where to even begin wondering how this error happened or what it really means. I just saw this one for the first time today (1 report).
B4X:
java.lang.RuntimeException: java.lang.NullPointerException
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:145)
at anywheresoftware.b4a.BA$1.run(BA.java:210)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4914)
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:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at com.cognitial.directvremote.httputilsservice._processnexttask(httputilsservice.java:188)
at com.cognitial.directvremote.httputilsservice._hc_responseerror(httputilsservice.java:127)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:105)
... 10 more

SocketTimeoutException: I have the timeout set to 12 seconds (req.Timeout = 12000) in the HttpUtilsService module. I guess I don't understand how you get a timeout ERROR/CRASH though.
B4X:
java.lang.RuntimeException: java.net.SocketTimeoutException
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:145)
at anywheresoftware.b4a.BA$1.run(BA.java:210)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:132)
at android.app.ActivityThread.main(ActivityThread.java:4123)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:491)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.net.SocketTimeoutException
at org.apache.harmony.luni.net.PlainSocketImpl.read(PlainSocketImpl.java:451)
at org.apache.harmony.luni.net.SocketInputStream.read(SocketInputStream.java:75)
at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:103)
at org.apache.http.impl.io.AbstractSessionInputBuffer.read(AbstractSessionInputBuffer.java:134)
at org.apache.http.impl.io.IdentityInputStream.read(IdentityInputStream.java:86)
at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:159)
at java.io.InputStreamReader.read(InputStreamReader.java:248)
at java.io.Reader.read(Reader.java:149)
at org.apache.http.util.EntityUtils.toString(EntityUtils.java:135)
at anywheresoftware.b4a.http.HttpClientWrapper$HttpResponeWrapper.GetString(HttpClientWrapper.java:416)
at com.cognitial.directvremote.httputilsservice._hc_responseerror(httputilsservice.java:122)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:491)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:105)
... 10 more


If it helps, I use the HttpUtilsService for:

~ Scanning the entire network for receivers by sending a command to each IP address and seeing if there is a response. This action is either stopped by the user or stopped via code when the user leaves the screen. They cannot do anything else while this is going on.

~ If a person enters an IP address to manually look for a receiver. They cannot do anything else in the app when performing this step.

~ To confirm if the app is communicating with a receiver (looks for a JSON response which is then parsed).

~ When sending a certain specific macro to the receiver. This is a pro-only feature and all crash reports have come from the free one, so this is unlikely.

I'm not looking for anyone to debug my code or anything like that.... mostly just wondering where in my code can I check for or prevent those errors? :sign0085:
 
Top