android.view.WindowLeaked: Activity org.appcelerator.titanium.TiActivity has leaked window android.widget.ZoomButtonsController$Container{428cdc18 V.E..... ......I. 0,0-768,97} that was originally added here

Appcelerator JIRA | Dylan Rolfe | 1 year ago
  1. 0

    To reproduce: Create a new app. *index.xml* {code:java} <Alloy> <Window id="window"></Window> </Alloy> {code} *index.js* {code:java} var html = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory + 'webview.html').read().text; var webview = Titanium.UI.createWebView({ html: html, }); $.window.add(webview); $.window.open(); {code} Create a local html file in assets: webview.html (I used https://raw.githubusercontent.com/cbracco/html5-test-page/master/test.html as a test html) Run the app and hit the back button. The app crashes with this error: {noformat} [WARN] : UnimplementedWebViewApi: Unimplemented WebView method onKeyDown called from: android.webkit.WebView.onKeyDown(WebView.java:2178) [WARN] : IInputConnectionWrapper: showStatusIcon on inactive InputConnection [DEBUG] : Window: Window is closed normally. [ERROR] : WindowManager: [ERROR] : WindowManager: android.view.WindowLeaked: Activity org.appcelerator.titanium.TiActivity has leaked window android.widget.ZoomButtonsController$Container{428cdc18 V.E..... ......I. 0,0-768,97} that was originally added here [ERROR] : WindowManager: at android.view.ViewRootImpl.<init>(ViewRootImpl.java:346) [ERROR] : WindowManager: at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:248) [ERROR] : WindowManager: at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69) [ERROR] : WindowManager: at android.widget.ZoomButtonsController.setVisible(ZoomButtonsController.java:371) [ERROR] : WindowManager: at com.android.org.chromium.android_webview.AwZoomControls.invokeZoomPicker(AwZoomControls.java:29) [ERROR] : WindowManager: at com.android.org.chromium.content.browser.ContentViewCore.invokeZoomPicker(ContentViewCore.java:2818) [ERROR] : WindowManager: at com.android.org.chromium.content.browser.ContentViewGestureHandler$1.onScroll(ContentViewGestureHandler.java:380) [ERROR] : WindowManager: at com.android.org.chromium.content.browser.third_party.GestureDetector.onTouchEvent(GestureDetector.java:588) [ERROR] : WindowManager: at com.android.org.chromium.content.browser.ContentViewGestureHandler.processTouchEvent(ContentViewGestureHandler.java:957) [ERROR] : WindowManager: at com.android.org.chromium.content.browser.ContentViewGestureHandler.confirmTouchEvent(ContentViewGestureHandler.java:1007) [ERROR] : WindowManager: at com.android.org.chromium.content.browser.ContentViewCore.confirmTouchEvent(ContentViewCore.java:1363) [ERROR] : WindowManager: at com.android.org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method) [ERROR] : WindowManager: at com.android.org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:24) [ERROR] : WindowManager: at android.os.Handler.dispatchMessage(Handler.java:102) [ERROR] : WindowManager: at android.os.Looper.loop(Looper.java:136) [ERROR] : WindowManager: at android.app.ActivityThread.main(ActivityThread.java:5001) [ERROR] : WindowManager: at java.lang.reflect.Method.invokeNative(Native Method) [ERROR] : WindowManager: at java.lang.reflect.Method.invoke(Method.java:515) [ERROR] : WindowManager: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) [ERROR] : WindowManager: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) [ERROR] : WindowManager: at dalvik.system.NativeStart.main(Native Method) {noformat}

    Appcelerator JIRA | 1 year ago | Dylan Rolfe
    android.view.WindowLeaked: Activity org.appcelerator.titanium.TiActivity has leaked window android.widget.ZoomButtonsController$Container{428cdc18 V.E..... ......I. 0,0-768,97} that was originally added here
  2. 0

    To reproduce: Create a new app. *index.xml* {code:java} <Alloy> <Window id="window"></Window> </Alloy> {code} *index.js* {code:java} var html = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory + 'webview.html').read().text; var webview = Titanium.UI.createWebView({ html: html, }); $.window.add(webview); $.window.open(); {code} Create a local html file in assets: webview.html (I used https://raw.githubusercontent.com/cbracco/html5-test-page/master/test.html as a test html) Run the app and hit the back button. The app crashes with this error: {noformat} [WARN] : UnimplementedWebViewApi: Unimplemented WebView method onKeyDown called from: android.webkit.WebView.onKeyDown(WebView.java:2178) [WARN] : IInputConnectionWrapper: showStatusIcon on inactive InputConnection [DEBUG] : Window: Window is closed normally. [ERROR] : WindowManager: [ERROR] : WindowManager: android.view.WindowLeaked: Activity org.appcelerator.titanium.TiActivity has leaked window android.widget.ZoomButtonsController$Container{428cdc18 V.E..... ......I. 0,0-768,97} that was originally added here [ERROR] : WindowManager: at android.view.ViewRootImpl.<init>(ViewRootImpl.java:346) [ERROR] : WindowManager: at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:248) [ERROR] : WindowManager: at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69) [ERROR] : WindowManager: at android.widget.ZoomButtonsController.setVisible(ZoomButtonsController.java:371) [ERROR] : WindowManager: at com.android.org.chromium.android_webview.AwZoomControls.invokeZoomPicker(AwZoomControls.java:29) [ERROR] : WindowManager: at com.android.org.chromium.content.browser.ContentViewCore.invokeZoomPicker(ContentViewCore.java:2818) [ERROR] : WindowManager: at com.android.org.chromium.content.browser.ContentViewGestureHandler$1.onScroll(ContentViewGestureHandler.java:380) [ERROR] : WindowManager: at com.android.org.chromium.content.browser.third_party.GestureDetector.onTouchEvent(GestureDetector.java:588) [ERROR] : WindowManager: at com.android.org.chromium.content.browser.ContentViewGestureHandler.processTouchEvent(ContentViewGestureHandler.java:957) [ERROR] : WindowManager: at com.android.org.chromium.content.browser.ContentViewGestureHandler.confirmTouchEvent(ContentViewGestureHandler.java:1007) [ERROR] : WindowManager: at com.android.org.chromium.content.browser.ContentViewCore.confirmTouchEvent(ContentViewCore.java:1363) [ERROR] : WindowManager: at com.android.org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method) [ERROR] : WindowManager: at com.android.org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:24) [ERROR] : WindowManager: at android.os.Handler.dispatchMessage(Handler.java:102) [ERROR] : WindowManager: at android.os.Looper.loop(Looper.java:136) [ERROR] : WindowManager: at android.app.ActivityThread.main(ActivityThread.java:5001) [ERROR] : WindowManager: at java.lang.reflect.Method.invokeNative(Native Method) [ERROR] : WindowManager: at java.lang.reflect.Method.invoke(Method.java:515) [ERROR] : WindowManager: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) [ERROR] : WindowManager: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) [ERROR] : WindowManager: at dalvik.system.NativeStart.main(Native Method) {noformat}

    Appcelerator JIRA | 1 year ago | Dylan Rolfe
    android.view.WindowLeaked: Activity org.appcelerator.titanium.TiActivity has leaked window android.widget.ZoomButtonsController$Container{428cdc18 V.E..... ......I. 0,0-768,97} that was originally added here
  3. 0

    com.mopub.common.MoPubBrowser has leaked window

    GitHub | 2 years ago | pablo-navarro
    android.view.WindowLeaked: Activity com.mopub.common.MoPubBrowser has leaked window android.widget.ZoomButtonsController$Container{42a1ce88 V.E..... ......I. 0,0-768,97} that was originally added here
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Leaked window

    GitHub | 2 years ago | neosimsim
    android.view.WindowLeaked: Activity com.microsoft.aad.adal.AuthenticationActivity has leaked window android.widget.ZoomButtonsController$Container{2d3d94ca V.E..... ......I. 0,0-2048,97} that was originally added here
  6. 0

    Window leak

    GitHub | 1 year ago | yaminorito
    android.view.WindowLeaked: Activity com.erakk.lnreader.UI.activity.DisplayLightNovelContentActivity has leaked window android.widget.ZoomButtonsController$Container{422cb888 V.E..... ......I. 0,0-480,73} that was originally added here
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. android.view.WindowLeaked

    Activity org.appcelerator.titanium.TiActivity has leaked window android.widget.ZoomButtonsController$Container{428cdc18 V.E..... ......I. 0,0-768,97} that was originally added here

    at android.view.ViewRootImpl.<init>()
  2. Android Platform
    ZoomButtonsController.setVisible
    1. android.view.ViewRootImpl.<init>(ViewRootImpl.java:346)
    2. android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:248)
    3. android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
    4. android.widget.ZoomButtonsController.setVisible(ZoomButtonsController.java:371)
    4 frames
  3. com.android.org
    SystemMessageHandler.handleMessage
    1. com.android.org.chromium.android_webview.AwZoomControls.invokeZoomPicker(AwZoomControls.java:29)
    2. com.android.org.chromium.content.browser.ContentViewCore.invokeZoomPicker(ContentViewCore.java:2818)
    3. com.android.org.chromium.content.browser.ContentViewGestureHandler$1.onScroll(ContentViewGestureHandler.java:380)
    4. com.android.org.chromium.content.browser.third_party.GestureDetector.onTouchEvent(GestureDetector.java:588)
    5. com.android.org.chromium.content.browser.ContentViewGestureHandler.processTouchEvent(ContentViewGestureHandler.java:957)
    6. com.android.org.chromium.content.browser.ContentViewGestureHandler.confirmTouchEvent(ContentViewGestureHandler.java:1007)
    7. com.android.org.chromium.content.browser.ContentViewCore.confirmTouchEvent(ContentViewCore.java:1363)
    8. com.android.org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
    9. com.android.org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:24)
    9 frames
  4. Android Platform
    ActivityThread.main
    1. android.os.Handler.dispatchMessage(Handler.java:102)
    2. android.os.Looper.loop(Looper.java:136)
    3. android.app.ActivityThread.main(ActivityThread.java:5001)
    3 frames
  5. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invokeNative(Native Method)
    2. java.lang.reflect.Method.invoke(Method.java:515)
    2 frames
  6. Android
    ZygoteInit.main
    1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
    2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
    2 frames
  7. Android Platform
    NativeStart.main
    1. dalvik.system.NativeStart.main(Native Method)
    1 frame