Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

com.squareup.leakcanary.internal.DisplayLeakActivity has leaked #343

Closed
koral-- opened this issue Dec 21, 2015 · 3 comments
Closed

com.squareup.leakcanary.internal.DisplayLeakActivity has leaked #343

koral-- opened this issue Dec 21, 2015 · 3 comments

Comments

@koral--
Copy link

koral-- commented Dec 21, 2015

Similar to #1 (comment). Difference is that affected field in InputMethodManager is mServedView instead of mCurRootView. It looks like it should also be ignored as well.

D/LeakCanary: * com.squareup.leakcanary.internal.DisplayLeakActivity has leaked:
D/LeakCanary: * GC ROOT static android.view.inputmethod.InputMethodManager.mInstance
D/LeakCanary: * references android.view.inputmethod.InputMethodManager.mServedView
D/LeakCanary: * references com.android.internal.policy.impl.PhoneWindow$DecorView.mContext
D/LeakCanary: * leaks com.squareup.leakcanary.internal.DisplayLeakActivity instance
D/LeakCanary: * Reference Key: 28f138fd-00b0-4fb6-bdbd-ae37600a7473
D/LeakCanary: * Device: S.LSI Division, Samsung Electronics Co., Ltd. Android Full Android on ORIGEN QUAD full_origen_quad
D/LeakCanary: * Android Version: 4.0.4 API: 15 LeakCanary: 1.3.1
D/LeakCanary: * Durations: watch=5011ms, gc=134ms, heap dump=789ms, analysis=19125ms
D/LeakCanary: * Details:
D/LeakCanary: * Class android.view.inputmethod.InputMethodManager
D/LeakCanary: |   static $staticOverhead = byte[] [id=0x40bda221;length=480;size=496]
D/LeakCanary: |   static CONTROL_START_INITIAL = 256
D/LeakCanary: |   static CONTROL_WINDOW_FIRST = 4
D/LeakCanary: |   static CONTROL_WINDOW_IS_TEXT_EDITOR = 2
D/LeakCanary: |   static CONTROL_WINDOW_VIEW_HAS_FOCUS = 1
D/LeakCanary: |   static DEBUG = false
D/LeakCanary: |   static HIDE_IMPLICIT_ONLY = 1
D/LeakCanary: |   static HIDE_NOT_ALWAYS = 2
D/LeakCanary: |   static MSG_BIND = 2
D/LeakCanary: |   static MSG_DUMP = 1
D/LeakCanary: |   static MSG_SET_ACTIVE = 4
D/LeakCanary: |   static MSG_UNBIND = 3
D/LeakCanary: |   static RESULT_HIDDEN = 3
D/LeakCanary: |   static RESULT_SHOWN = 2
D/LeakCanary: |   static RESULT_UNCHANGED_HIDDEN = 1
D/LeakCanary: |   static RESULT_UNCHANGED_SHOWN = 0
D/LeakCanary: |   static SHOW_FORCED = 2
D/LeakCanary: |   static SHOW_IMPLICIT = 1
D/LeakCanary: |   static TAG = java.lang.String [id=0x40bda4a8]
D/LeakCanary: |   static mInstance = android.view.inputmethod.InputMethodManager [id=0x41263f38]
D/LeakCanary: |   static mInstanceSync = java.lang.Object [id=0x40b69cd0]
D/LeakCanary: * Instance of android.view.inputmethod.InputMethodManager
D/LeakCanary: |   static $staticOverhead = byte[] [id=0x40bda221;length=480;size=496]
D/LeakCanary: |   static CONTROL_START_INITIAL = 256
D/LeakCanary: |   static CONTROL_WINDOW_FIRST = 4
D/LeakCanary: |   static CONTROL_WINDOW_IS_TEXT_EDITOR = 2
D/LeakCanary: |   static CONTROL_WINDOW_VIEW_HAS_FOCUS = 1
D/LeakCanary: |   static DEBUG = false
D/LeakCanary: |   static HIDE_IMPLICIT_ONLY = 1
D/LeakCanary: |   static HIDE_NOT_ALWAYS = 2
D/LeakCanary: |   static MSG_BIND = 2
D/LeakCanary: |   static MSG_DUMP = 1
D/LeakCanary: |   static MSG_SET_ACTIVE = 4
D/LeakCanary: |   static MSG_UNBIND = 3
D/LeakCanary: |   static RESULT_HIDDEN = 3
D/LeakCanary: |   static RESULT_SHOWN = 2
D/LeakCanary: |   static RESULT_UNCHANGED_HIDDEN = 1
D/LeakCanary: |   static RESULT_UNCHANGED_SHOWN = 0
D/LeakCanary: |   static SHOW_FORCED = 2
D/LeakCanary: |   static SHOW_IMPLICIT = 1
D/LeakCanary: |   static TAG = java.lang.String [id=0x40bda4a8]
D/LeakCanary: |   static mInstance = android.view.inputmethod.InputMethodManager [id=0x41263f38]
D/LeakCanary: |   static mInstanceSync = java.lang.Object [id=0x40b69cd0]
D/LeakCanary: |   mTmpCursorRect = android.graphics.Rect [id=0x41264cd8]
D/LeakCanary: |   mService = com.android.internal.view.IInputMethodManager$Stub$Proxy [id=0x41275c38]
D/LeakCanary: |   mClient = android.view.inputmethod.InputMethodManager$1 [id=0x41264d18]
D/LeakCanary: |   mCompletions = null
D/LeakCanary: |   mCurId = null
D/LeakCanary: |   mCurMethod = null
D/LeakCanary: |   mCurRootView = com.android.internal.policy.impl.PhoneWindow$DecorView [id=0x41331a78]
D/LeakCanary: |   mCurrentTextBoxAttribute = null
D/LeakCanary: |   mServedView = com.android.internal.policy.impl.PhoneWindow$DecorView [id=0x41331a78]
D/LeakCanary: |   mServedInputConnection = null
D/LeakCanary: |   mCursorRect = android.graphics.Rect [id=0x41264cf8]
D/LeakCanary: |   mNextServedView = com.android.internal.policy.impl.PhoneWindow$DecorView [id=0x41331a78]
D/LeakCanary: |   mMainLooper = android.os.Looper [id=0x4124fc70]
D/LeakCanary: |   mDummyInputConnection = android.view.inputmethod.BaseInputConnection [id=0x412554a0]
D/LeakCanary: |   mIInputContext = android.view.inputmethod.InputMethodManager$ControlledInputConnectionWrapper [id=0x41254ff0]
D/LeakCanary: |   mH = android.view.inputmethod.InputMethodManager$H [id=0x412554c8]
D/LeakCanary: |   mHasBeenInactive = true
D/LeakCanary: |   mFullscreenMode = false
D/LeakCanary: |   mCursorSelStart = 0
D/LeakCanary: |   mCursorSelEnd = 0
D/LeakCanary: |   mServedConnecting = false
D/LeakCanary: |   mCursorCandStart = 0
D/LeakCanary: |   mCursorCandEnd = 0
D/LeakCanary: |   mBindSequence = -1
D/LeakCanary: |   mActive = false
D/LeakCanary: * Instance of com.android.internal.policy.impl.PhoneWindow$DecorView
D/LeakCanary: |   mActionMode = null
D/LeakCanary: |   mActionModePopup = null
D/LeakCanary: |   mActionModeView = null
D/LeakCanary: |   mBackgroundPadding = android.graphics.Rect [id=0x4135b4b8]
D/LeakCanary: |   this$0 = com.android.internal.policy.impl.PhoneWindow [id=0x4135eb20]
D/LeakCanary: |   mShowActionModePopup = null
D/LeakCanary: |   mMenuBackground = null
D/LeakCanary: |   mDrawingBounds = android.graphics.Rect [id=0x4135b498]
D/LeakCanary: |   mFramePadding = android.graphics.Rect [id=0x4135b4d8]
D/LeakCanary: |   mFrameOffsets = android.graphics.Rect [id=0x4135b4f8]
D/LeakCanary: |   mFeatureId = -1
D/LeakCanary: |   mDownY = 0
D/LeakCanary: |   mDefaultOpacity = -1
D/LeakCanary: |   mWatchingForMenu = false
D/LeakCanary: |   mChanging = false
D/LeakCanary: |   mForeground = null
D/LeakCanary: |   mSelfBounds = android.graphics.Rect [id=0x4135b440]
D/LeakCanary: |   mOverlayBounds = android.graphics.Rect [id=0x4135b460]
D/LeakCanary: |   mMatchParentChildren = java.util.ArrayList [id=0x41331d08]
D/LeakCanary: |   mForegroundPaddingBottom = 0
D/LeakCanary: |   mForegroundPaddingLeft = 0
D/LeakCanary: |   mForegroundPaddingRight = 0
D/LeakCanary: |   mForegroundPaddingTop = 0
D/LeakCanary: |   mForegroundInPadding = true
D/LeakCanary: |   mMeasureAllChildren = false
D/LeakCanary: |   mForegroundGravity = 119
D/LeakCanary: |   mForegroundBoundsChanged = true
D/LeakCanary: |   mAnimationListener = null
D/LeakCanary: |   mCachePaint = null
D/LeakCanary: |   mVisibilityChangingChildren = null
D/LeakCanary: |   mChildTransformation = android.view.animation.Transformation [id=0x41331cb0]
D/LeakCanary: |   mChildren = android.view.View[] [id=0x4135b3f8;length=12]
D/LeakCanary: |   mTransitioningViews = null
D/LeakCanary: |   mCurrentDrag = null
D/LeakCanary: |   mCurrentDragView = null
D/LeakCanary: |   mDisappearingChildren = null
D/LeakCanary: |   mDragNotifiedChildren = null
D/LeakCanary: |   mTransition = null
D/LeakCanary: |   mFirstHoverTarget = null
D/LeakCanary: |   mFirstTouchTarget = null
D/LeakCanary: |   mFocused = null
D/LeakCanary: |   mOnHierarchyChangeListener = null
D/LeakCanary: |   mLocalPoint = android.graphics.PointF [id=0x41331cf0]
D/LeakCanary: |   mInvalidateRegion = null
D/LeakCanary: |   mInvalidationTransformation = null
D/LeakCanary: |   mLayoutTransitionListener = android.view.ViewGroup$3 [id=0x412701d0]
D/LeakCanary: |   mLayoutAnimationController = null
D/LeakCanary: |   mLastTouchDownX = 0.0
D/LeakCanary: |   mLastTouchDownTime = 0
D/LeakCanary: |   mLastTouchDownY = 0.0
D/LeakCanary: |   mLayoutSuppressed = false
D/LeakCanary: |   mLastTouchDownIndex = -1
D/LeakCanary: |   mHoveredSelf = false
D/LeakCanary: |   mGroupFlags = 2375763
D/LeakCanary: |   mPersistentDrawingCache = 2
D/LeakCanary: |   mDrawLayers = true
D/LeakCanary: |   mChildrenCount = 1
D/LeakCanary: |   mChildAcceptsDrag = false
D/LeakCanary: |   mAccessibilityDelegate = null
D/LeakCanary: |   mUnsetPressedState = null
D/LeakCanary: |   mAnimator = null
D/LeakCanary: |   mAttachInfo = null
D/LeakCanary: |   mBGDrawable = android.graphics.drawable.StateListDrawable [id=0x41316478]
D/LeakCanary: |   mUnscaledDrawingCache = null
D/LeakCanary: |   mTransformationInfo = null
D/LeakCanary: |   mTouchDelegate = null
D/LeakCanary: |   mTag = null
D/LeakCanary: |   mContentDescription = null
D/LeakCanary: |   mContext = com.squareup.leakcanary.internal.DisplayLeakActivity [id=0x41355550]
D/LeakCanary: |   mCurrentAnimation = null
D/LeakCanary: |   mDisplayList = android.view.GLES20DisplayList [id=0x4132e608]
D/LeakCanary: |   mDrawableState = int[] [id=0x40a8ca28;length=2;size=24]
D/LeakCanary: |   mDrawingCache = null
D/LeakCanary: |   mSendViewScrolledAccessibilityEvent = null
D/LeakCanary: |   mFloatingTreeObserver = null
D/LeakCanary: |   mHardwareLayer = null
D/LeakCanary: |   mScrollCache = null
D/LeakCanary: |   mResources = android.content.res.Resources [id=0x41252608]
D/LeakCanary: |   mInputEventConsistencyVerifier = android.view.InputEventConsistencyVerifier [id=0x41351080]
D/LeakCanary: |   mKeyedTags = null
D/LeakCanary: |   mPerformClick = null
D/LeakCanary: |   mLayerPaint = null
D/LeakCanary: |   mPendingCheckForTap = null
D/LeakCanary: |   mLayoutParams = android.view.WindowManager$LayoutParams [id=0x4135ec10]
D/LeakCanary: |   mPendingCheckForLongPress = null
D/LeakCanary: |   mListenerInfo = null
D/LeakCanary: |   mLocalDirtyRect = null
D/LeakCanary: |   mParent = null
D/LeakCanary: |   mMeasuredWidth = 1280
D/LeakCanary: |   mMinHeight = 0
D/LeakCanary: |   mMinWidth = 0
D/LeakCanary: |   mNextFocusDownId = -1
D/LeakCanary: |   mNextFocusForwardId = -1
D/LeakCanary: |   mNextFocusLeftId = -1
D/LeakCanary: |   mNextFocusRightId = -1
D/LeakCanary: |   mNextFocusUpId = -1
D/LeakCanary: |   mOldHeightMeasureSpec = 1073742560
D/LeakCanary: |   mOldWidthMeasureSpec = 1073743104
D/LeakCanary: |   mOverScrollMode = 1
D/LeakCanary: |   mPaddingBottom = 0
D/LeakCanary: |   mPaddingLeft = 0
D/LeakCanary: |   mPaddingRight = 0
D/LeakCanary: |   mPaddingTop = 0
D/LeakCanary: |   mMeasuredHeight = 736
D/LeakCanary: |   mLeft = 0
D/LeakCanary: |   mLayerType = 0
D/LeakCanary: |   mLastIsOpaque = true
D/LeakCanary: |   mPrivateFlags = 27265336
D/LeakCanary: |   mPrivateFlags2 = 0
D/LeakCanary: |   mRecreateDisplayList = false
D/LeakCanary: |   mResolvedTextDirection = 0
D/LeakCanary: |   mID = -1
D/LeakCanary: |   mRight = 1280
D/LeakCanary: |   mHasPerformedLongPress = false
D/LeakCanary: |   mScrollX = 0
D/LeakCanary: |   mScrollY = 0
D/LeakCanary: |   mDrawingCacheBackgroundColor = 0
D/LeakCanary: |   mSendingHoverAccessibilityEvents = false
D/LeakCanary: |   mSystemUiVisibility = 0
D/LeakCanary: |   mCachingFailed = false
D/LeakCanary: |   mTextDirection = 0
D/LeakCanary: |   mTop = 0
D/LeakCanary: |   mBottom = 736
D/LeakCanary: |   mTouchSlop = 11
D/LeakCanary: |   mBackgroundSizeChanged = false
D/LeakCanary: |   mBackgroundResource = 0
D/LeakCanary: |   mAccessibilityViewId = -1
D/LeakCanary: |   mUserPaddingBottom = 0
D/LeakCanary: |   mUserPaddingEnd = -1
D/LeakCanary: |   mUserPaddingLeft = 0
D/LeakCanary: |   mUserPaddingRelative = false
D/LeakCanary: |   mUserPaddingRight = 0
D/LeakCanary: |   mUserPaddingStart = -1
D/LeakCanary: |   mVerticalScrollFactor = 0.0
D/LeakCanary: |   mVerticalScrollbarPosition = 0
D/LeakCanary: |   mViewFlags = -1744830336
D/LeakCanary: |   mWindowAttachCount = 1
D/LeakCanary: * Instance of com.squareup.leakcanary.internal.DisplayLeakActivity
D/LeakCanary: |   static $staticOverhead = byte[] [id=0x412db3f9;length=48;size=64]
D/LeakCanary: |   static SHOW_LEAK_EXTRA = java.lang.String [id=0x413554a0]
D/LeakCanary: |   static TAG = java.lang.String [id=0x413554f0]
D/LeakCanary: |   actionButton = android.widget.Button [id=0x413bc4e0]
D/LeakCanary: |   failureView = android.widget.TextView [id=0x413bbe28]
D/LeakCanary: |   leaks = java.util.ArrayList [id=0x413c08e0]
D/LeakCanary: |   listView = android.widget.ListView [id=0x413ba508]
D/LeakCanary: |   visibleLeakRefKey = null
D/LeakCanary: |   maxStoredLeaks = 7
D/LeakCanary: |   mActionBar = com.android.internal.app.ActionBarImpl [id=0x413bcef8]
D/LeakCanary: |   mActivityInfo = android.content.pm.ActivityInfo [id=0x41381390]
D/LeakCanary: |   mAllLoaderManagers = android.util.SparseArray [id=0x413bd5f0]
D/LeakCanary: |   mApplication = <stripped> [id=0x4126ffe8]
D/LeakCanary: |   mWindowManager = android.view.Window$LocalWindowManager [id=0x41369a18]
D/LeakCanary: |   mWindow = com.android.internal.policy.impl.PhoneWindow [id=0x4135eb20]
D/LeakCanary: |   mUiThread = java.lang.Thread [id=0x40a67460]
D/LeakCanary: |   mComponent = android.content.ComponentName [id=0x41381180]
D/LeakCanary: |   mToken = android.os.BinderProxy [id=0x41381330]
D/LeakCanary: |   mCurrentConfig = android.content.res.Configuration [id=0x4135ea98]
D/LeakCanary: |   mDecor = null
D/LeakCanary: |   mTitle = java.lang.String [id=0x41337a28]
D/LeakCanary: |   mDefaultKeySsb = null
D/LeakCanary: |   mEmbeddedID = null
D/LeakCanary: |   mSearchManager = null
D/LeakCanary: |   mFragments = android.app.FragmentManagerImpl [id=0x41355640]
D/LeakCanary: |   mHandler = android.os.Handler [id=0x41355700]
D/LeakCanary: |   mResultData = null
D/LeakCanary: |   mInstanceTracker = android.os.StrictMode$InstanceTracker [id=0x412c8bb0]
D/LeakCanary: |   mInstrumentation = android.app.Instrumentation [id=0x41253628]
D/LeakCanary: |   mIntent = android.content.Intent [id=0x41381088]
D/LeakCanary: |   mLastNonConfigurationInstances = null
D/LeakCanary: |   mLoaderManager = null
D/LeakCanary: |   mParent = null
D/LeakCanary: |   mMainThread = android.app.ActivityThread [id=0x4124fd18]
D/LeakCanary: |   mManagedCursors = java.util.ArrayList [id=0x413556a0]
D/LeakCanary: |   mManagedDialogs = null
D/LeakCanary: |   mMenuInflater = android.view.MenuInflater [id=0x41343d08]
D/LeakCanary: |   mLoadersStarted = false
D/LeakCanary: |   mResultCode = 0
D/LeakCanary: |   mIdent = 1095051472
D/LeakCanary: |   mResumed = false
D/LeakCanary: |   mFinished = true
D/LeakCanary: |   mStartedActivity = false
D/LeakCanary: |   mStopped = true
D/LeakCanary: |   mTemporaryPause = false
D/LeakCanary: |   mDefaultKeyMode = 0
D/LeakCanary: |   mTitleColor = 0
D/LeakCanary: |   mTitleReady = true
D/LeakCanary: |   mConfigChangeFlags = 0
D/LeakCanary: |   mCheckedForLoaderManager = true
D/LeakCanary: |   mVisibleFromClient = true
D/LeakCanary: |   mVisibleFromServer = true
D/LeakCanary: |   mChangingConfigurations = false
D/LeakCanary: |   mWindowAdded = true
D/LeakCanary: |   mCalled = true
D/LeakCanary: |   mBase = android.app.ContextImpl [id=0x41355720]
D/LeakCanary: |   mInflater = com.android.internal.policy.impl.PhoneLayoutInflater [id=0x41369870]
D/LeakCanary: |   mTheme = android.content.res.Resources$Theme [id=0x41350dd8]
D/LeakCanary: |   mThemeResource = 2131492897
D/LeakCanary: |   mBase = android.app.ContextImpl [id=0x41355720]
@pyricau
Copy link
Member

pyricau commented Sep 19, 2016

Thank you for your report, it looks like this might be a leak in the Android SDK.

Please read the following entry in our FAQ: Can a leak be caused by the Android SDK?.

We don't have enough time to do the investigative work on this type of issue, so I will close this issue for now. We'll happily take contributions to AndroidExcludedRefs.java, if the leak is demonstrated and the fix provided to AOSP.

@pyricau pyricau closed this as completed Sep 19, 2016
@koral--
Copy link
Author

koral-- commented Sep 19, 2016

@pyricau I don't have that device anymore and error wasn't observed anywhere else. It seems that it is introduced by manufacturer and do not need to be fixed in AOSP.
So the only thing to do is to add PR with exclusion similar to this one: bbec432#diff-5e887a071f8a7dbdcac77674147c5f07R160
There is nothing to demonstrate and do with AOSP.
Would it be sufficient for you?

@jrodbx
Copy link
Collaborator

jrodbx commented Apr 6, 2017

Closed per #647

@jrodbx jrodbx reopened this Apr 6, 2017
@jrodbx jrodbx closed this as completed Apr 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants