java.lang.IllegalStateException: call to getView on a Window

Appcelerator JIRA | Dawson Toth | 6 years ago
  1. 0

    Problem: The APIDocs do not say that [Titanium.UI.Window|http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.Window-object] cannot be added to other views on Android. For example, the following will work on iOS, but will break on Android: {code:lang=javascript} <code class= "javascript">var outer = Ti.UI.createWindow({ backgroundColor: 'white' }); var inner = Ti.UI.createWindow({ backgroundColor: 'blue', top: 50 }); outer.add(inner); outer.open(); {code} When it breaks on Android, it results in the following error: {code} [TRACE] E/AndroidRuntime( 419): FATAL EXCEPTION: main [TRACE] E/AndroidRuntime( 419): java.lang.IllegalStateException: call to getView on a Window [TRACE] E/AndroidRuntime( 419): at ti.modules.titanium.ui.WindowProxy.getView(WindowProxy.java:57) [TRACE] E/AndroidRuntime( 419): at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:377) [TRACE] E/AndroidRuntime( 419): at ti.modules.titanium.ui.WindowProxy.handleMessage(WindowProxy.java:64) [TRACE] E/AndroidRuntime( 419): at android.os.Handler.dispatchMessage(Handler.java:95) [TRACE] E/AndroidRuntime( 419): at android.os.Looper.loop(Looper.java:123) [TRACE] E/AndroidRuntime( 419): at android.app.ActivityThread.main(ActivityThread.java:4627) [TRACE] E/AndroidRuntime( 419): at java.lang.reflect.Method.invokeNative(Native Method) [TRACE] E/AndroidRuntime( 419): at java.lang.reflect.Method.invoke(Method.java:521) [TRACE] E/AndroidRuntime( 419): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) [TRACE] E/AndroidRuntime( 419): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) [TRACE] E/AndroidRuntime( 419): at dalvik.system.NativeStart.main(Native Method)</code> {code} Associated Helpdesk Ticket [http://developer.appcelerator.com/helpdesk/view/68881">http://developer.appcelerator.com/helpdesk/view/68881]

    Appcelerator JIRA | 6 years ago | Dawson Toth
    java.lang.IllegalStateException: call to getView on a Window
  2. 0

    Problem: The APIDocs do not say that [Titanium.UI.Window|http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.Window-object] cannot be added to other views on Android. For example, the following will work on iOS, but will break on Android: {code:lang=javascript} <code class= "javascript">var outer = Ti.UI.createWindow({ backgroundColor: 'white' }); var inner = Ti.UI.createWindow({ backgroundColor: 'blue', top: 50 }); outer.add(inner); outer.open(); {code} When it breaks on Android, it results in the following error: {code} [TRACE] E/AndroidRuntime( 419): FATAL EXCEPTION: main [TRACE] E/AndroidRuntime( 419): java.lang.IllegalStateException: call to getView on a Window [TRACE] E/AndroidRuntime( 419): at ti.modules.titanium.ui.WindowProxy.getView(WindowProxy.java:57) [TRACE] E/AndroidRuntime( 419): at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:377) [TRACE] E/AndroidRuntime( 419): at ti.modules.titanium.ui.WindowProxy.handleMessage(WindowProxy.java:64) [TRACE] E/AndroidRuntime( 419): at android.os.Handler.dispatchMessage(Handler.java:95) [TRACE] E/AndroidRuntime( 419): at android.os.Looper.loop(Looper.java:123) [TRACE] E/AndroidRuntime( 419): at android.app.ActivityThread.main(ActivityThread.java:4627) [TRACE] E/AndroidRuntime( 419): at java.lang.reflect.Method.invokeNative(Native Method) [TRACE] E/AndroidRuntime( 419): at java.lang.reflect.Method.invoke(Method.java:521) [TRACE] E/AndroidRuntime( 419): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) [TRACE] E/AndroidRuntime( 419): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) [TRACE] E/AndroidRuntime( 419): at dalvik.system.NativeStart.main(Native Method)</code> {code} Associated Helpdesk Ticket [http://developer.appcelerator.com/helpdesk/view/68881">http://developer.appcelerator.com/helpdesk/view/68881]

    Appcelerator JIRA | 6 years ago | Dawson Toth
    java.lang.IllegalStateException: call to getView on a Window
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Mocking InetAddress - how to mock getting a new local address?

    Google Groups | 6 years ago | Martin
    java.lang.IllegalStateException: no last call on a mock available
  5. 0

    java.lang.AbstractMethodError when run Utils - dependency issue?

    Google Groups | 1 year ago | Unknown author
    java.lang.IllegalStateException: Cannot call methods on a stopped SparkContext

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

      call to getView on a Window

      at ti.modules.titanium.ui.WindowProxy.getView()
    2. ti.modules.titanium
      WindowProxy.getView
      1. ti.modules.titanium.ui.WindowProxy.getView(WindowProxy.java:57)
      1 frame
    3. org.appcelerator.titanium
      TiViewProxy.realizeViews
      1. org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:377)
      1 frame
    4. ti.modules.titanium
      WindowProxy.handleMessage
      1. ti.modules.titanium.ui.WindowProxy.handleMessage(WindowProxy.java:64)
      1 frame
    5. Android Platform
      ActivityThread.main
      1. android.os.Handler.dispatchMessage(Handler.java:95)
      2. android.os.Looper.loop(Looper.java:123)
      3. android.app.ActivityThread.main(ActivityThread.java:4627)
      3 frames
    6. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invokeNative(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:521)
      2 frames
    7. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
      2 frames