索引号和数组在崩溃报告中的大小信息是否与原始代码保持一致?

huangapple go评论140阅读模式
英文:

Do the index number and size information of array in crash report remain same as original code?

问题

在我的安卓应用中,我正在使用以下的ProGuard规则。

-keepattributes SourceFile,LineNumberTable

-renamesourcefileattribute SourceFile

以下是错误报告摘要,但没有提到正确的行号和类名。在这个报告中提到的索引号和大小是否应该与原始值相同,还是已经更改?

java.lang.IndexOutOfBoundsException: Index: 11, Size: 10
at java.util.ArrayList.get(ArrayList.java:437)
at c.b.a.F.b(SourceFile:21)
at androidx.recyclerview.widget.RecyclerView$a.a(SourceFile:14)
at androidx.recyclerview.widget.RecyclerView$p.a(SourceFile:157)
at androidx.recyclerview.widget.LinearLayoutManager$c.a(SourceFile:10)
at androidx.recyclerview.widget.LinearLayoutManager.a(SourceFile:108)
at androidx.recyclerview.widget.LinearLayoutManager.a(SourceFile:95)
at androidx.recyclerview.widget.LinearLayoutManager.e(SourceFile:119)
at androidx.recyclerview.widget.RecyclerView.f(SourceFile:8)
at androidx.recyclerview.widget.RecyclerView.d(SourceFile:9)
at androidx.recyclerview.widget.RecyclerView.onLayout(SourceFile:2)
at android.view.View.layout(View.java:20710)
at android.view.ViewGroup.layout(ViewGroup.java:6198)
at androidx.constraintlayout.widget.ConstraintLayout.onLayout(SourceFile:12)
at android.view.View.layout(View.java:20710)
at android.view.ViewGroup.layout(ViewGroup.java:6198)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at android.view.View.layout(View.java:20710)
at android.view.ViewGroup.layout(ViewGroup.java:6198)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1565)
at android.view.View.layout(View.java:20710)
at android.view.ViewGroup.layout(ViewGroup.java:6198)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at android.view.View.layout(View.java:20710)
at android.view.ViewGroup.layout(ViewGroup.java:6198)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1565)
at android.view.View.layout(View.java:20710)
at android.view.ViewGroup.layout(ViewGroup.java:6198)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at com.android.internal.policy.DecorView.onLayout(DecorView.java:757)
at android.view.View.layout(View.java:20710)
at android.view.ViewGroup.layout(ViewGroup.java:6198)
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2839)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2366)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1505)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7353)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1100)
at android.view.Choreographer.doCallbacks(Choreographer.java:895)
at android.view.Choreographer.doFrame(Choreographer.java:826)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1086)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:201)
at android.app.ActivityThread.main(ActivityThread.java:6864)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
英文:

In my android app I am using following proguard rules.

-keepattributes SourceFile,LineNumberTable

-renamesourcefileattribute SourceFile

Following is bug report summary and it does not mention the proper line number and class name. Are the Index number and size mentioned in this report supposed to be same as original or are they changed?

java.lang.IndexOutOfBoundsException: Index: 11, Size: 10
at java.util.ArrayList.get(ArrayList.java:437)
at c.b.a.F.b(SourceFile:21)
at androidx.recyclerview.widget.RecyclerView$a.a(SourceFile:14)
at androidx.recyclerview.widget.RecyclerView$p.a(SourceFile:157)
at androidx.recyclerview.widget.LinearLayoutManager$c.a(SourceFile:10)
at androidx.recyclerview.widget.LinearLayoutManager.a(SourceFile:108)
at androidx.recyclerview.widget.LinearLayoutManager.a(SourceFile:95)
at androidx.recyclerview.widget.LinearLayoutManager.e(SourceFile:119)
at androidx.recyclerview.widget.RecyclerView.f(SourceFile:8)
at androidx.recyclerview.widget.RecyclerView.d(SourceFile:9)
at androidx.recyclerview.widget.RecyclerView.onLayout(SourceFile:2)
at android.view.View.layout(View.java:20710)
at android.view.ViewGroup.layout(ViewGroup.java:6198)
at androidx.constraintlayout.widget.ConstraintLayout.onLayout(SourceFile:12)
at android.view.View.layout(View.java:20710)
at android.view.ViewGroup.layout(ViewGroup.java:6198)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at android.view.View.layout(View.java:20710)
at android.view.ViewGroup.layout(ViewGroup.java:6198)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1565)
at android.view.View.layout(View.java:20710)
at android.view.ViewGroup.layout(ViewGroup.java:6198)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at android.view.View.layout(View.java:20710)
at android.view.ViewGroup.layout(ViewGroup.java:6198)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1565)
at android.view.View.layout(View.java:20710)
at android.view.ViewGroup.layout(ViewGroup.java:6198)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at com.android.internal.policy.DecorView.onLayout(DecorView.java:757)
at android.view.View.layout(View.java:20710)
at android.view.ViewGroup.layout(ViewGroup.java:6198)
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2839)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2366)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1505)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7353)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1100)
at android.view.Choreographer.doCallbacks(Choreographer.java:895)
at android.view.Choreographer.doFrame(Choreographer.java:826)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1086)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:201)
at android.app.ActivityThread.main(ActivityThread.java:6864)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)

答案1

得分: 0

这个异常在移除对数组第11个索引的调用后被移除。因此,对于原始问题的答案是,崩溃报告中数组的索引编号和大小信息与原始代码保持一致。

英文:

This exception was removed after removing the call to 11th index of array.So the answer to original question would be yes, the index number and size information of array in crash report remain same as original code.

huangapple
  • 本文由 发表于 2020年9月13日 16:52:35
  • 转载请务必保留本文链接:https://go.coder-hub.com/63868880.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定