java.lang.IllegalArgumentException: View not attached to window manager

Appcelerator JIRA | Radamantis Torres-Lechuga | 5 years ago
  1. 0

    h3. Expected behavior The window opens , push the button to open another window, push the hardware back android button, we need to be able to do this so many times without problems. h3. Actual behavior The window opens, push the button to open another window, push the hardware back android button, wait 2 seconds, an error alert goes up h3. Test Case {code:title=app.js|borderStyle=solid} var win1 = Ti.UI.createWindow({ fullscreen : false }); win1.add(Ti.UI.createLabel({ top : '0dp', text : 'Win1' })); win2Button = Ti.UI.createButton({ title : 'Open Win2' }); win2Button.addEventListener('click', function(){ var win2 = Ti.UI.createWindow({ fullscreen : false }); win2.add(Ti.UI.createLabel({ top : '0dp', text : 'Win2' })); var win2BackButton = Ti.UI.createButton({ title : 'Go Back' }); win2BackButton.addEventListener('click', function(){ win2.close(); }); win2.add(win2BackButton); win2.open(); }); win1.add(win2Button); win1.addEventListener('focus', function(){ var actInd = Ti.UI.createActivityIndicator({ bottom : 10, height : 50, width : 10, message : 'Loading...' }); actInd.show(); setTimeout(function(){ actInd.hide(); }, 2000); }); win1.open(); {code} h3. Log {code:title=log|borderStyle=solid} D/AndroidRuntime( 724): Shutting down VM W/dalvikvm( 724): threadid=1: thread exiting with uncaught exception (group=0x40015560) E/TiApplication( 724): (main) [1675,11364] Sending event: exception on thread: main msg:java.lang.IllegalArgumentException: View not attached to window manager; Titanium 1.8.0.1,2011/12/17 19:53,c903964 E/TiApplication( 724): java.lang.IllegalArgumentException: View not attached to window manager E/TiApplication( 724): at android.view.WindowManagerImpl.findViewLocked(WindowManagerImpl.java:355) E/TiApplication( 724): at android.view.WindowManagerImpl.removeView(WindowManagerImpl.java:200) E/TiApplication( 724): at android.view.Window$LocalWindowManager.removeView(Window.java:432) E/TiApplication( 724): at android.app.Dialog.dismissDialog(Dialog.java:278) E/TiApplication( 724): at android.app.Dialog.access$000(Dialog.java:71) E/TiApplication( 724): at android.app.Dialog$1.run(Dialog.java:111) E/TiApplication( 724): at android.app.Dialog.dismiss(Dialog.java:268) E/TiApplication( 724): at ti.modules.titanium.ui.widget.TiUIActivityIndicator.handleHide(TiUIActivityIndicator.java:217) E/TiApplication( 724): at ti.modules.titanium.ui.widget.TiUIActivityIndicator.handleMessage(TiUIActivityIndicator.java:77) E/TiApplication( 724): at android.os.Handler.dispatchMessage(Handler.java:95) E/TiApplication( 724): at android.os.Looper.loop(Looper.java:130) E/TiApplication( 724): at android.app.ActivityThread.main(ActivityThread.java:3683) E/TiApplication( 724): at java.lang.reflect.Method.invokeNative(Native Method) E/TiApplication( 724): at java.lang.reflect.Method.invoke(Method.java:507) E/TiApplication( 724): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) E/TiApplication( 724): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) E/TiApplication( 724): at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime( 724): FATAL EXCEPTION: main E/AndroidRuntime( 724): java.lang.IllegalArgumentException: View not attached to window manager E/AndroidRuntime( 724): at android.view.WindowManagerImpl.findViewLocked(WindowManagerImpl.java:355) E/AndroidRuntime( 724): at android.view.WindowManagerImpl.removeView(WindowManagerImpl.java:200) E/AndroidRuntime( 724): at android.view.Window$LocalWindowManager.removeView(Window.java:432) E/AndroidRuntime( 724): at android.app.Dialog.dismissDialog(Dialog.java:278) E/AndroidRuntime( 724): at android.app.Dialog.access$000(Dialog.java:71) E/AndroidRuntime( 724): at android.app.Dialog$1.run(Dialog.java:111) E/AndroidRuntime( 724): at android.app.Dialog.dismiss(Dialog.java:268) E/AndroidRuntime( 724): at ti.modules.titanium.ui.widget.TiUIActivityIndicator.handleHide(TiUIActivityIndicator.java:217) E/AndroidRuntime( 724): at ti.modules.titanium.ui.widget.TiUIActivityIndicator.handleMessage(TiUIActivityIndicator.java:77) E/AndroidRuntime( 724): at android.os.Handler.dispatchMessage(Handler.java:95) E/AndroidRuntime( 724): at android.os.Looper.loop(Looper.java:130) E/AndroidRuntime( 724): at android.app.ActivityThread.main(ActivityThread.java:3683) E/AndroidRuntime( 724): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 724): at java.lang.reflect.Method.invoke(Method.java:507) E/AndroidRuntime( 724): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) E/AndroidRuntime( 724): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) E/AndroidRuntime( 724): at dalvik.system.NativeStart.main(Native Method) W/ActivityManager( 64): Force finishing activity com.appcelerator.app562821/org.appcelerator.titanium.TiActivity D/dalvikvm( 724): GC_CONCURRENT freed 254K, 47% free 3104K/5831K, external 1497K/1828K, paused 5ms+4ms W/ActivityManager( 64): Activity pause timeout for HistoryRecord{40753b30 com.appcelerator.app562821/org.appcelerator.titanium.TiActivity} {code}

    Appcelerator JIRA | 5 years ago | Radamantis Torres-Lechuga
    java.lang.IllegalArgumentException: View not attached to window manager
  2. 0

    h3. Expected behavior The window opens , push the button to open another window, push the hardware back android button, we need to be able to do this so many times without problems. h3. Actual behavior The window opens, push the button to open another window, push the hardware back android button, wait 2 seconds, an error alert goes up h3. Test Case {code:title=app.js|borderStyle=solid} var win1 = Ti.UI.createWindow({ fullscreen : false }); win1.add(Ti.UI.createLabel({ top : '0dp', text : 'Win1' })); win2Button = Ti.UI.createButton({ title : 'Open Win2' }); win2Button.addEventListener('click', function(){ var win2 = Ti.UI.createWindow({ fullscreen : false }); win2.add(Ti.UI.createLabel({ top : '0dp', text : 'Win2' })); var win2BackButton = Ti.UI.createButton({ title : 'Go Back' }); win2BackButton.addEventListener('click', function(){ win2.close(); }); win2.add(win2BackButton); win2.open(); }); win1.add(win2Button); win1.addEventListener('focus', function(){ var actInd = Ti.UI.createActivityIndicator({ bottom : 10, height : 50, width : 10, message : 'Loading...' }); actInd.show(); setTimeout(function(){ actInd.hide(); }, 2000); }); win1.open(); {code} h3. Log {code:title=log|borderStyle=solid} D/AndroidRuntime( 724): Shutting down VM W/dalvikvm( 724): threadid=1: thread exiting with uncaught exception (group=0x40015560) E/TiApplication( 724): (main) [1675,11364] Sending event: exception on thread: main msg:java.lang.IllegalArgumentException: View not attached to window manager; Titanium 1.8.0.1,2011/12/17 19:53,c903964 E/TiApplication( 724): java.lang.IllegalArgumentException: View not attached to window manager E/TiApplication( 724): at android.view.WindowManagerImpl.findViewLocked(WindowManagerImpl.java:355) E/TiApplication( 724): at android.view.WindowManagerImpl.removeView(WindowManagerImpl.java:200) E/TiApplication( 724): at android.view.Window$LocalWindowManager.removeView(Window.java:432) E/TiApplication( 724): at android.app.Dialog.dismissDialog(Dialog.java:278) E/TiApplication( 724): at android.app.Dialog.access$000(Dialog.java:71) E/TiApplication( 724): at android.app.Dialog$1.run(Dialog.java:111) E/TiApplication( 724): at android.app.Dialog.dismiss(Dialog.java:268) E/TiApplication( 724): at ti.modules.titanium.ui.widget.TiUIActivityIndicator.handleHide(TiUIActivityIndicator.java:217) E/TiApplication( 724): at ti.modules.titanium.ui.widget.TiUIActivityIndicator.handleMessage(TiUIActivityIndicator.java:77) E/TiApplication( 724): at android.os.Handler.dispatchMessage(Handler.java:95) E/TiApplication( 724): at android.os.Looper.loop(Looper.java:130) E/TiApplication( 724): at android.app.ActivityThread.main(ActivityThread.java:3683) E/TiApplication( 724): at java.lang.reflect.Method.invokeNative(Native Method) E/TiApplication( 724): at java.lang.reflect.Method.invoke(Method.java:507) E/TiApplication( 724): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) E/TiApplication( 724): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) E/TiApplication( 724): at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime( 724): FATAL EXCEPTION: main E/AndroidRuntime( 724): java.lang.IllegalArgumentException: View not attached to window manager E/AndroidRuntime( 724): at android.view.WindowManagerImpl.findViewLocked(WindowManagerImpl.java:355) E/AndroidRuntime( 724): at android.view.WindowManagerImpl.removeView(WindowManagerImpl.java:200) E/AndroidRuntime( 724): at android.view.Window$LocalWindowManager.removeView(Window.java:432) E/AndroidRuntime( 724): at android.app.Dialog.dismissDialog(Dialog.java:278) E/AndroidRuntime( 724): at android.app.Dialog.access$000(Dialog.java:71) E/AndroidRuntime( 724): at android.app.Dialog$1.run(Dialog.java:111) E/AndroidRuntime( 724): at android.app.Dialog.dismiss(Dialog.java:268) E/AndroidRuntime( 724): at ti.modules.titanium.ui.widget.TiUIActivityIndicator.handleHide(TiUIActivityIndicator.java:217) E/AndroidRuntime( 724): at ti.modules.titanium.ui.widget.TiUIActivityIndicator.handleMessage(TiUIActivityIndicator.java:77) E/AndroidRuntime( 724): at android.os.Handler.dispatchMessage(Handler.java:95) E/AndroidRuntime( 724): at android.os.Looper.loop(Looper.java:130) E/AndroidRuntime( 724): at android.app.ActivityThread.main(ActivityThread.java:3683) E/AndroidRuntime( 724): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 724): at java.lang.reflect.Method.invoke(Method.java:507) E/AndroidRuntime( 724): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) E/AndroidRuntime( 724): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) E/AndroidRuntime( 724): at dalvik.system.NativeStart.main(Native Method) W/ActivityManager( 64): Force finishing activity com.appcelerator.app562821/org.appcelerator.titanium.TiActivity D/dalvikvm( 724): GC_CONCURRENT freed 254K, 47% free 3104K/5831K, external 1497K/1828K, paused 5ms+4ms W/ActivityManager( 64): Activity pause timeout for HistoryRecord{40753b30 com.appcelerator.app562821/org.appcelerator.titanium.TiActivity} {code}

    Appcelerator JIRA | 5 years ago | Radamantis Torres-Lechuga
    java.lang.IllegalArgumentException: View not attached to window manager
  3. 0

    Error when dismissing dialog from ObaRegionTask (AsyncTask)

    GitHub | 2 years ago | barbeau
    java.lang.IllegalArgumentException: View not attached to window manager
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Rotation bug

    GitHub | 6 years ago | abarisain
    java.lang.IllegalArgumentException: View not attached to window manager
  6. 0

    progress dialogue box giving exception in asynchtask

    Stack Overflow | 4 years ago | Bansal_Sneha
    java.lang.IllegalArgumentException: View not attached to window manager

  1. dealloc 2 times, last 2 weeks ago
  2. Ranjana Dangol 1 times, last 5 months ago
  3. Riyaz 1 times, last 6 months ago
  4. syntech16 1 times, last 7 months ago
  5. Macapon 1 times, last 9 months ago
1 more registered users
13 unregistered visitors
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. java.lang.IllegalArgumentException

    View not attached to window manager

    at android.view.WindowManagerImpl.findViewLocked()
  2. Android Platform
    Dialog.dismiss
    1. android.view.WindowManagerImpl.findViewLocked(WindowManagerImpl.java:355)
    2. android.view.WindowManagerImpl.removeView(WindowManagerImpl.java:200)
    3. android.view.Window$LocalWindowManager.removeView(Window.java:432)
    4. android.app.Dialog.dismissDialog(Dialog.java:278)
    5. android.app.Dialog.access$000(Dialog.java:71)
    6. android.app.Dialog$1.run(Dialog.java:111)
    7. android.app.Dialog.dismiss(Dialog.java:268)
    7 frames
  3. ti.modules.titanium
    TiUIActivityIndicator.handleMessage
    1. ti.modules.titanium.ui.widget.TiUIActivityIndicator.handleHide(TiUIActivityIndicator.java:217)
    2. ti.modules.titanium.ui.widget.TiUIActivityIndicator.handleMessage(TiUIActivityIndicator.java:77)
    2 frames
  4. Android Platform
    ActivityThread.main
    1. android.os.Handler.dispatchMessage(Handler.java:95)
    2. android.os.Looper.loop(Looper.java:130)
    3. android.app.ActivityThread.main(ActivityThread.java:3683)
    3 frames
  5. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invokeNative(Native Method)
    2. java.lang.reflect.Method.invoke(Method.java:507)
    2 frames
  6. Android
    ZygoteInit.main
    1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
    2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
    2 frames
  7. Android Platform
    NativeStart.main
    1. dalvik.system.NativeStart.main(Native Method)
    1 frame