0

One of my users is experiencing a problem with my app. I have received he stack trace but it's not really pointing me to the problem. All I knoe is that some index is out of bounds, but which index? The trace does not lead me to my code...

I believe I have had this in the past, I might have solved it by disabling minifyEnabled and shrinkResources. These options are enabled again but on my Nexus 6P the app is working fine.

Here the stack trace:

Android-Version

Android 4.0.3 - 4.0.4 1 Iconia Tab A501 (picasso) 1

java.lang.ArrayIndexOutOfBoundsException: length=7; index=7
    at com.baviloworks.braumeister.f.m(Unknown Source)
at com.baviloworks.braumeister.f$1.onClick(Unknown Source)
at android.view.View.performClick(View.java:3511)
at android.view.View$PerformClick.run(View.java:14110)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4424)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at     com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(Zygote    Init.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)

I hope someone knows what this could be.

Thanks!

3
  • Please correlate this stack trace to the relevant code and include that code in your question. At this point, you know more than we do here. Commented Dec 11, 2016 at 9:50
  • Your array has been accessed with an illegal index. Would be great to have an example of your code. As well you will find a good explanation of the error here: stackoverflow.com/questions/5554734/… Commented Dec 11, 2016 at 9:50
  • Well I do know what would cause such an error, but the stack trace isn't pointing to any of my code. Therefore I don't know what exactly is affected. And again, the app works fine on my phone. What about the (Unknown source)? Commented Dec 11, 2016 at 9:51

2 Answers 2

2

The stack trace is obfuscated, so first of all we have to decode it so we get the actual file where the exception is thrown:

Launch Android/Sdk/tools/proguard/bin/proguardgui.bat (or .sh if you are on Linux), select Retrace on the left side and then select your mapping.txt.

See http://simplyadvanced.net/blog/android-how-to-decode-proguards-obfuscated-code-from-stack-trace/

Sign up to request clarification or add additional context in comments.

2 Comments

I will try that in a sec! See I did not know it is obfuscated...thanks! I will report back
Thanks this worked! it has pointed me to a somewhat near location of the error. Time to dig.
0

An Array length of 7 means that only the index 6 exist from 0, because in java array indexes start with 0! So this will work till you index to 6

Or in other words the Boundaries of an Array are Array.length -1

5 Comments

Right. But which array? I have lots of arrays. I am waiting for the user to give me feedback on when the error occurs. I really have no clue why this is happening. Like I said this appeared in the past and the problem just went away.
lol i am not a god to tell you that . debug and find out . if you posted a logcat i can help. i have no powers to see invisible codes you can start from View.java:3511
Well yea but neither do I. If I knew which code is affected I would have posted it already. And I can hardly tell some user to give me his logcat. That's not going to work :-(. Is there anything weird about the stack trace? I mean if it really is telling me that some array is out of bounds, shouldn't it point me to the one which is affected? Like it always has in the past?
java.lang.ArrayIndexOutOfBoundsException: length=7; index=7 at com.baviloworks.braumeister.f.m(Unknown Source) at com.baviloworks.braumeister.f$1.onClick(Unknown Source) at android.view.View.performClick(View.java:3511) This is the key dig in to your code and find out which array is there
Sadly I do not have a file called View.java. And where this Unknown Source is...is well unknown

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.