Google developer console app crash


#1

Hi

I do not know if there is a bug or an error on the app, i get the following error message in the google developer console. I have searched the forum but can not find anything. It’s a radio app with taifun player. I will mention that I do not use any pictures except 4x pictures of 69x69 (Media buttons).

java.lang.OutOfMemoryError:
at java.util.Arrays.copyOf (Arrays.java:3352)
at java.lang.AbstractStringBuilder.expandCapacity (AbstractStringBuilder.java:130)
at java.lang.AbstractStringBuilder.ensureCapacityInternal (AbstractStringBuilder.java:114)
at java.lang.AbstractStringBuilder.append (AbstractStringBuilder.java:550)
at java.lang.StringBuilder.append (StringBuilder.java:205)
at com.google.appinventor.components.runtime.Web.getResponseContent (Web.java:1010)
at com.google.appinventor.components.runtime.Web.performRequest (Web.java:869)
at com.google.appinventor.components.runtime.Web.access$700 (Web.java:80)
at com.google.appinventor.components.runtime.Web$1.run (Web.java:361)
at java.lang.Thread.run (Thread.java:762)

sometimes I also get these two

java.lang.RuntimeException:
java.lang.SecurityException:

Kind regards
Gregoris


#2

You need to find-out what device (and API) is producing this error. Your dashboard should provide more info


#3

Hi John,

There are different devices with Android 5.0, 6.0, 7.0 and 7.1


#4

Can you provide the Play Store link so I can install your app and see if the error happens to me? If it happens, it may help you find what the problem is.


#5

Of course, I appreciate all the help. The error may occur after 20min or more, as far as I know


#6

I tried your app, and effectively after around half hour playing, an error terminates the app. There’s no information on what causes the crash, so you will have to post the crash reports the Play Store is giving you or use a tool like logcat to obtain the data of what happens when the error occurs.

Please read this post by Taifun on how to use Logcat: App always crashing when i open screen second time


#7

I got this in developer console

wf562g_lg3, Android 6.0

java.lang.OutOfMemoryError:
at java.lang.AbstractStringBuilder.enlargeBuffer (AbstractStringBuilder.java:95)
at java.lang.AbstractStringBuilder.append0 (AbstractStringBuilder.java:125)
at java.lang.StringBuilder.append (StringBuilder.java:271)
at com.google.appinventor.components.runtime.Web.getResponseContent (Web.java:1010)
at com.google.appinventor.components.runtime.Web.performRequest (Web.java:869)
at com.google.appinventor.components.runtime.Web.access$700 (Web.java:80)
at com.google.appinventor.components.runtime.Web$1.run (Web.java:361)
at java.lang.Thread.run (Thread.java:818)


#8

What component are you using to play the stream? How is it configured?
Have you tried this block in the Screen1 blocks drawer?

Capture

Maybe you can catch that error and restart the player in the same station every time the error happens. It will be a nice workaround until you figure out how to avoid the error at all.

Did you try getting the log with Logcat?


#9

I use taifunplayer

I have also block .errorOccurred.
Screen-error-block

This is really frustrating, I’ve spent a lot of time on this. I have tried Logcat earlier, but i didn’t understand so much, I will try again. It sounds good with a temporary solution as you say, but how?

Kind regards
Gregoris


#10

@Taifun, do you have an idea of what can be happening here? The player starts normally, but at around 20 minutes the app crashes. Well, I’m not sure if it is the player, but it’s the only thing working at the time of the crash.
Can it be some kind of memory overflow?


#11

what are you doing with the web component?
do you use it together with a clock component?
you might want to show us a few relevant blocks…
Taifun


#12

Hi Taifun

I am checking if links/streams are working or not. Clock timer triggers when you press the play button, It has nothing to do with web component.