New Google developer console crashes stack traces are not accurate anymore

你离开我真会死。 提交于 2019-12-13 12:42:59

问题


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:

  • The stack trace is full of <OR> methods, so I guess full of possible candidates?
  • All the line numbers are 0

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

Example:

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)

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?


回答1:


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).

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



来源:https://stackoverflow.com/questions/44883820/new-google-developer-console-crashes-stack-traces-are-not-accurate-anymore

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!