新的Google开发者控制台崩溃导致堆栈跟踪不再准确 [英] New Google developer console crashes stack traces are not accurate anymore

查看:89
本文介绍了新的Google开发者控制台崩溃导致堆栈跟踪不再准确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Google最近更新了Google Play控制台,现在会自动报告崩溃情况.

Google has recently updated the Google Play Console, and now crashes are automatically reported.

由于我得到的几乎所有堆栈跟踪信息都不再准确了:

Since almost all stack traces I got are not accurate anymore:

  • 堆栈跟踪中充满了<OR>方法,所以我猜到了所有可能的候选对象?
  • 所有行号都是0
  • The stack trace is full of <OR> methods, so I guess full of possible candidates?
  • All the line numbers are 0

请注意,我使用的是Proguard(而不是Multidex),我强烈怀疑这是问题的原因.

Note that I use Proguard (and not Multidex) and I strongly suspect it is the cause of the problem.

示例:

java.lang.ClassCastException: 
at <<MyPackage>>.adapters.PackageRecyclerViewAdapter.getItemCount(PackageRecyclerViewAdapter.java:0)
at <OR>.getItemViewType(PackageRecyclerViewAdapter.java:0)
at <OR>.onBindViewHolder(PackageRecyclerViewAdapter.java:0)
at <OR>.onCreateViewHolder(PackageRecyclerViewAdapter.java:0)
at android.support.v7.widget.RecyclerView$Adapter.onCreateViewHolder(RecyclerView.java:0)
at <OR>.onBindViewHolder(RecyclerView.java:0)
at <OR>.onBindViewHolder(RecyclerView.java:0)
at <OR>.getItemViewType(RecyclerView.java:0)
at <OR>.getItemCount(RecyclerView.java:0)
at <OR>.onViewRecycled(RecyclerView.java:0)
at <OR>.registerAdapterDataObserver(RecyclerView.java:0)
at <OR>.onAttachedToRecyclerView(RecyclerView.java:0)
at android.support.v7.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:0)
at <OR>.bindViewHolder(RecyclerView.java:0)
at <OR>.getItemId(RecyclerView.java:0)
at <OR>.hasStableIds(RecyclerView.java:0)
at <OR>.onFailedToRecycleView(RecyclerView.java:0)
at <OR>.unregisterAdapterDataObserver(RecyclerView.java:0)
at <OR>.onDetachedFromRecyclerView(RecyclerView.java:0)
at android.support.v7.widget.RecyclerView$Recycler.clear(RecyclerView.java:0)
at <OR>.setViewCacheSize(RecyclerView.java:0)
at <OR>.validateViewHolderForOffsetPosition(RecyclerView.java:0)
at <OR>.tryBindViewHolderByDeadline(RecyclerView.java:0)
at <OR>.getViewForPosition(RecyclerView.java:0)
at <OR>.tryGetViewHolderForPositionByDeadline(RecyclerView.java:0)
at <OR>.invalidateDisplayListInt(RecyclerView.java:0)
at <OR>.recycleView(RecyclerView.java:0)
at <OR>.addViewHolderToRecycledViewPool(RecyclerView.java:0)
at <OR>.getScrapOrCachedViewForId(RecyclerView.java:0)
at <OR>.onAdapterChanged(RecyclerView.java:0)
at <OR>.offsetPositionRecordsForMove(RecyclerView.java:0)
at <OR>.offsetPositionRecordsForRemove(RecyclerView.java:0)
at <OR>.setViewCacheExtension(RecyclerView.java:0)
at <OR>.setRecycledViewPool(RecyclerView.java:0)
at android.support.v7.widget.RecyclerView$Recycler.clear(RecyclerView.java:0)
at <OR>.setViewCacheSize(RecyclerView.java:0)
at <OR>.validateViewHolderForOffsetPosition(RecyclerView.java:0)
at <OR>.tryBindViewHolderByDeadline(RecyclerView.java:0)
at <OR>.getViewForPosition(RecyclerView.java:0)
at <OR>.tryGetViewHolderForPositionByDeadline(RecyclerView.java:0)
at <OR>.invalidateDisplayListInt(RecyclerView.java:0)
at <OR>.recycleView(RecyclerView.java:0)
at <OR>.addViewHolderToRecycledViewPool(RecyclerView.java:0)
at <OR>.getScrapOrCachedViewForId(RecyclerView.java:0)
at <OR>.onAdapterChanged(RecyclerView.java:0)
at <OR>.offsetPositionRecordsForMove(RecyclerView.java:0)
at <OR>.offsetPositionRecordsForRemove(RecyclerView.java:0)
at <OR>.setViewCacheExtension(RecyclerView.java:0)
at <OR>.setRecycledViewPool(RecyclerView.java:0)
at android.support.v7.widget.RecyclerView$Recycler.clear(RecyclerView.java:0)
at <OR>.setViewCacheSize(RecyclerView.java:0)
at <OR>.validateViewHolderForOffsetPosition(RecyclerView.java:0)
at <OR>.tryBindViewHolderByDeadline(RecyclerView.java:0)
at <OR>.getViewForPosition(RecyclerView.java:0)
at <OR>.tryGetViewHolderForPositionByDeadline(RecyclerView.java:0)
at <OR>.invalidateDisplayListInt(RecyclerView.java:0)
at <OR>.recycleView(RecyclerView.java:0)
at <OR>.addViewHolderToRecycledViewPool(RecyclerView.java:0)
at <OR>.getScrapOrCachedViewForId(RecyclerView.java:0)
at <OR>.onAdapterChanged(RecyclerView.java:0)
at <OR>.offsetPositionRecordsForMove(RecyclerView.java:0)
at <OR>.offsetPositionRecordsForRemove(RecyclerView.java:0)
at <OR>.setViewCacheExtension(RecyclerView.java:0)
at <OR>.setRecycledViewPool(RecyclerView.java:0)
at android.support.v7.widget.RecyclerView$Recycler.getScrapList(RecyclerView.java:0)
at <OR>.getViewForPosition(RecyclerView.java:0)
at <OR>.scrapView(RecyclerView.java:0)
at <OR>.unscrapView(RecyclerView.java:0)
at <OR>.viewRangeUpdate(RecyclerView.java:0)
at android.support.v7.widget.LinearLayoutManager$LayoutState.hasMore(LinearLayoutManager.java:0)
at <OR>.next(LinearLayoutManager.java:0)
at <OR>.assignPositionFromScrapList(LinearLayoutManager.java:0)
at <OR>.assignPositionFromScrapList(LinearLayoutManager.java:0)
at android.support.v7.widget.LinearLayoutManager.generateDefaultLayoutParams(LinearLayoutManager.java:0)
at <OR>.onDetachedFromWindow(LinearLayoutManager.java:0)
at <OR>.onInitializeAccessibilityEvent(LinearLayoutManager.java:0)
at <OR>.onRestoreInstanceState(LinearLayoutManager.java:0)
at <OR>.setStackFromEnd(LinearLayoutManager.java:0)
at <OR>.smoothScrollToPosition(LinearLayoutManager.java:0)
at <OR>.onLayoutCompleted(LinearLayoutManager.java:0)
at <OR>.onAnchorReady(LinearLayoutManager.java:0)
at <OR>.updateAnchorInfoForLayout(LinearLayoutManager.java:0)
at <OR>.updateAnchorFromPendingData(LinearLayoutManager.java:0)
at <OR>.fixLayoutEndGap(LinearLayoutManager.java:0)
at <OR>.updateLayoutStateToFillEnd(LinearLayoutManager.java:0)
at <OR>.updateLayoutStateToFillEnd(LinearLayoutManager.java:0)
at <OR>.scrollHorizontallyBy(LinearLayoutManager.java:0)
at <OR>.updateLayoutState(LinearLayoutManager.java:0)
at <OR>.collectPrefetchPositionsForLayoutState(LinearLayoutManager.java:0)
at <OR>.collectInitialPrefetchPositions(LinearLayoutManager.java:0)
at <OR>.collectAdjacentPrefetchPositions(LinearLayoutManager.java:0)
at <OR>.assertNotInLayoutOrScroll(LinearLayoutManager.java:0)
at <OR>.recycleChildren(LinearLayoutManager.java:0)
at <OR>.recycleViewsFromStart(LinearLayoutManager.java:0)
at <OR>.recycleByLayoutState(LinearLayoutManager.java:0)
at <OR>.fill(LinearLayoutManager.java:0)
at <OR>.layoutChunk(LinearLayoutManager.java:0)
at <OR>.findFirstVisibleChildClosestToStart(LinearLayoutManager.java:0)
at <OR>.findReferenceChild(LinearLayoutManager.java:0)
at <OR>.findOneVisibleChild(LinearLayoutManager.java:0)
at <OR>.onFocusSearchFailed(LinearLayoutManager.java:0)
at android.support.v7.widget.LinearLayoutManager.generateDefaultLayoutParams(LinearLayoutManager.java:0)
at <OR>.onDetachedFromWindow(LinearLayoutManager.java:0)
at <OR>.onInitializeAccessibilityEvent(LinearLayoutManager.java:0)
at <OR>.onRestoreInstanceState(LinearLayoutManager.java:0)
at <OR>.setStackFromEnd(LinearLayoutManager.java:0)
at <OR>.smoothScrollToPosition(LinearLayoutManager.java:0)
at <OR>.onLayoutCompleted(LinearLayoutManager.java:0)
at <OR>.onAnchorReady(LinearLayoutManager.java:0)
at <OR>.updateAnchorInfoForLayout(LinearLayoutManager.java:0)
at <OR>.updateAnchorFromPendingData(LinearLayoutManager.java:0)
at <OR>.fixLayoutEndGap(LinearLayoutManager.java:0)
at <OR>.updateLayoutStateToFillEnd(LinearLayoutManager.java:0)
at <OR>.updateLayoutStateToFillEnd(LinearLayoutManager.java:0)
at <OR>.scrollHorizontallyBy(LinearLayoutManager.java:0)
at <OR>.updateLayoutState(LinearLayoutManager.java:0)
at <OR>.collectPrefetchPositionsForLayoutState(LinearLayoutManager.java:0)
at <OR>.collectInitialPrefetchPositions(LinearLayoutManager.java:0)
at <OR>.collectAdjacentPrefetchPositions(LinearLayoutManager.java:0)
at <OR>.assertNotInLayoutOrScroll(LinearLayoutManager.java:0)
at <OR>.recycleChildren(LinearLayoutManager.java:0)
at <OR>.recycleViewsFromStart(LinearLayoutManager.java:0)
at <OR>.recycleByLayoutState(LinearLayoutManager.java:0)
at <OR>.fill(LinearLayoutManager.java:0)
at <OR>.layoutChunk(LinearLayoutManager.java:0)
at <OR>.findFirstVisibleChildClosestToStart(LinearLayoutManager.java:0)
at <OR>.findReferenceChild(LinearLayoutManager.java:0)
at <OR>.findOneVisibleChild(LinearLayoutManager.java:0)
at <OR>.onFocusSearchFailed(LinearLayoutManager.java:0)
at android.support.v7.widget.LinearLayoutManager.onSaveInstanceState(LinearLayoutManager.java:0)
at <OR>.findViewByPosition(LinearLayoutManager.java:0)
at <OR>.onLayoutChildren(LinearLayoutManager.java:0)
at <OR>.computeHorizontalScrollOffset(LinearLayoutManager.java:0)
at <OR>.scrollBy(LinearLayoutManager.java:0)
at <OR>.findOnePartiallyOrCompletelyInvisibleChild(LinearLayoutManager.java:0)
at android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:0)
at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:0)
at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:0)
at android.view.View.layout(View.java:17945)
at android.view.ViewGroup.layout(ViewGroup.java:5812)
at android.support.v4.view.ViewPager.onLayout(ViewPager.java:0)
at android.view.View.layout(View.java:17945)
at android.view.ViewGroup.layout(ViewGroup.java:5812)
at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1080)
at android.view.View.layout(View.java:17945)
at android.view.ViewGroup.layout(ViewGroup.java:5812)
at android.support.v4.widget.DrawerLayout.onLayout(DrawerLayout.java:0)
at android.view.View.layout(View.java:17945)
at android.view.ViewGroup.layout(ViewGroup.java:5812)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1742)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1494)
at android.view.View.layout(View.java:17945)
at android.view.ViewGroup.layout(ViewGroup.java:5812)
at android.support.design.widget.CoordinatorLayout.getLastChildRect(CoordinatorLayout.java:0)
at <OR>.layoutChild(CoordinatorLayout.java:0)
at <OR>.resolveGravity(CoordinatorLayout.java:0)
at <OR>.getDependencies(CoordinatorLayout.java:0)
at <OR>.removePreDrawListener(CoordinatorLayout.java:0)
at android.support.design.widget.CoordinatorLayout.releaseTempRect(CoordinatorLayout.java:0)
at <OR>.setWindowInsets(CoordinatorLayout.java:0)
at <OR>.getTopSortedChildren(CoordinatorLayout.java:0)
at <OR>.performIntercept(CoordinatorLayout.java:0)
at <OR>.parseBehavior(CoordinatorLayout.java:0)
at <OR>.getResolvedLayoutParams(CoordinatorLayout.java:0)
at <OR>.getDescendantRect(CoordinatorLayout.java:0)
at <OR>.onMeasureChild(CoordinatorLayout.java:0)
at <OR>.onLayoutChild(CoordinatorLayout.java:0)
at <OR>.getChildRect(CoordinatorLayout.java:0)
at <OR>.getDesiredAnchoredChildRectWithoutConstraints(CoordinatorLayout.java:0)
at <OR>.constrainChildRect(CoordinatorLayout.java:0)
at <OR>.getDesiredAnchoredChildRect(CoordinatorLayout.java:0)
at <OR>.layoutChildWithAnchor(CoordinatorLayout.java:0)
at <OR>.onChildViewsChanged(CoordinatorLayout.java:0)
at <OR>.offsetChildByInset(CoordinatorLayout.java:0)
at <OR>.ensurePreDrawListener(CoordinatorLayout.java:0)
at <OR>.isPointInChildBounds(CoordinatorLayout.java:0)
at <OR>.generateLayoutParams(CoordinatorLayout.java:0)
at <OR>.generateLayoutParams(CoordinatorLayout.java:0)
at android.support.design.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:0)
at android.view.View.layout(View.java:17945)
at android.view.ViewGroup.layout(ViewGroup.java:5812)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:344)
at android.widget.FrameLayout.onLayout(FrameLayout.java:281)
at android.view.View.layout(View.java:17945)
at android.view.ViewGroup.layout(ViewGroup.java:5812)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1742)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1494)
at android.view.View.layout(View.java:17945)
at android.view.ViewGroup.layout(ViewGroup.java:5812)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:344)
at android.widget.FrameLayout.onLayout(FrameLayout.java:281)
at android.view.View.layout(View.java:17945)
at android.view.ViewGroup.layout(ViewGroup.java:5812)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1742)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1494)
at android.view.View.layout(View.java:17945)
at android.view.ViewGroup.layout(ViewGroup.java:5812)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:344)
at android.widget.FrameLayout.onLayout(FrameLayout.java:281)
at com.android.internal.policy.PhoneWindow$DecorView.onLayout(PhoneWindow.java:3178)
at android.view.View.layout(View.java:17945)
at android.view.ViewGroup.layout(ViewGroup.java:5812)
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2716)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2417)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1487)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7450)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:920)
at android.view.Choreographer.doCallbacks(Choreographer.java:695)
at android.view.Choreographer.doFrame(Choreographer.java:631)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:906)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7237)
at java.lang.reflect.Method.invoke(Method.java:0)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

我已修复此错误,问题出在getItemViewType方法中,而不是第一个显示的问题(getItemCount).因此,这些堆栈跟踪与以前的堆栈跟踪相比确实没有用.您知道有一个错误,但您不知道确切的位置.

I fixed this bug and the issue was in the getItemViewType method and not in the first displayed one (getItemCount). So these stack traces are really useless compared to previous ones. You know there is a bug but you don't know exactly where it occurs.

您遇到同样的问题吗? 有人知道如何解决吗?

Do you experience the same issues? Does someone know how to fix it?

推荐答案

我认为这是因为当省略行号时,proguard回溯无法明确标识堆栈帧(请参阅

I think this is because proguard retrace cannot unambiguously identify the stack frame when line numbers are omitted (see https://www.guardsquare.com/en/proguard/manual/retrace#without).

从这些文档看来,有必要保留LineNumberTable以便消除歧义.

From these docs, it looks like it's necessary to preserve the LineNumberTable in order to remove ambiguity.

这篇关于新的Google开发者控制台崩溃导致堆栈跟踪不再准确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆