Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1242] Webview zoomcontrol leaks window

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionCannot Reproduce
Resolution Date2015-03-27T07:17:10.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
LabelsTCSupportTriage
ReporterJelmer Jellema
AssigneeRadamantis Torres-Lechuga
Created2014-08-25T13:05:35.000+0000
Updated2016-03-08T07:37:37.000+0000

Description

I have a view containing a webview (not a full screen thing). We have ZoomControlsEnabled= true; When the view closes (for example through the back button), while the zoomcontrols are visible, this gives the following error: ERROR] : WindowManager: android.view.WindowLeaked: Activity org.appcelerator.titanium.TiActivity has leaked window android.widget.ZoomButtonsController$Container{42b5c6e8 V.E..... ......I. 0,0-1080,146} that was originally added here [ERROR] : WindowManager: at android.view.ViewRootImpl.(ViewRootImpl.java:457) [ERROR] : WindowManager: at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:267) [ERROR] : WindowManager: at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69) [ERROR] : WindowManager: at android.widget.ZoomButtonsController.setVisible(ZoomButtonsController.java:373) [ERROR] : WindowManager: at com.android.org.chromium.android_webview.AwZoomControls.invokeZoomPicker(AwZoomControls.java:28) [ERROR] : WindowManager: at com.android.org.chromium.content.browser.ContentViewCore.invokeZoomPicker(ContentViewCore.java:2607) [ERROR] : WindowManager: at com.android.org.chromium.content.browser.ContentViewGestureHandler$1.onScroll(ContentViewGestureHandler.java:429) [ERROR] : WindowManager: at com.android.org.chromium.content.browser.third_party.GestureDetector.onTouchEvent(GestureDetector.java:582) [ERROR] : WindowManager: at com.android.org.chromium.content.browser.ContentViewGestureHandler.processTouchEvent(ContentViewGestureHandler.java:970) [ERROR] : WindowManager: at com.android.org.chromium.content.browser.ContentViewGestureHandler.confirmTouchEvent(ContentViewGestureHandler.java:1021) [ERROR] : WindowManager: at com.android.org.chromium.content.browser.ContentViewCore.confirmTouchEvent(ContentViewCore.java:1271) [ERROR] : WindowManager: at com.android.org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method) [ERROR] : WindowManager: at com.android.org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:27) [ERROR] : WindowManager: at android.os.Handler.dispatchMessage(Handler.java:102) [ERROR] : WindowManager: at android.os.Looper.loop(Looper.java:157) [ERROR] : WindowManager: at android.app.ActivityThread.main(ActivityThread.java:5356) [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:1265) [ERROR] : WindowManager: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081) [ERROR] : WindowManager: at dalvik.system.NativeStart.main(Native Method) This error does not appear when the zoom controls have faded away while closing the view. [I hope I put this issue in the right place, Jira might be fine for the developpers, it's like a dark forest for us simple Titanium users]

Comments

  1. Mauro Parra-Miranda 2014-08-25

    Hello! Can you please provide a testcase in the form of app.js that reproduces this issue? Best Regards, Mauro
  2. Jelmer Jellema 2014-08-26

       // this sets the background color of the master UIView (when there are no windows/tab groups on it)
       Titanium.UI.setBackgroundColor('#000');
       
       //
       // create base UI tab and root window
       //
       var win1 = Titanium.UI.createWindow({  
           title:'Win 1',
           backgroundColor:'#fff'
       });
       
       var win2 = Titanium.UI.createWindow({  
           title:'Win 2',
           backgroundColor:'#fff'
       });
       var btn = Titanium.UI.createButton({
       	title: 'Open web'
       });
       
       btn.addEventListener('click',
       	function()
       	{
       		win2.open();		
       	});
       	
       win1.add(btn);
       
       var webview = Titanium.UI.createWebView({
       	url: 'http://spininhetweb.nl',
       	height: '50%',
       	enableZoomControls: true
       });
       
       win2.addEventListener('close',function()
       {
       	win2.remove(webview);
       	win2 = null;
       });
       
       win2.add(webview);
       
       win1.open();
       
    When running, open the second window by clicking the button. Then try to zoom the webview, and while the zoom controls are still visibile, hit the Android back button. This happens on the Samsung Galaxy S4 (GT-I9505), not on the Galaxy Tab 2 (GT-P5110).
  3. Jelmer Jellema 2014-09-01

    I think this has to do with the new chromium webview in Android 4.4?
  4. Jelmer Jellema 2015-03-27

    That's all? Right. Thanks for the help guys.

JSON Source