java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.LinearLayout.invalidate()' on a null object reference

Appcelerator JIRA | Shawn Lan | 1 year ago
  1. 0

    Use the test case [here|https://jira.appcelerator.org/browse/TIMOB-19257]. Right after launch (during splash), click "back" to exit the app. Repeat several times and sometimes you'll see the crash. {code} [ERROR] : TiApplication: (main) [1,485] Sending event: exception on thread: main msg:java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.LinearLayout.invalidate()' on a null object reference; Titanium 4.1.0,2015/07/06 11:15,d57aa7d [ERROR] : TiApplication: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.LinearLayout.invalidate()' on a null object reference [ERROR] : TiApplication: at ti.modules.titanium.ui.widget.TiUIActivityIndicator.processProperties(TiUIActivityIndicator.java:98) [ERROR] : TiApplication: at org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:1209) [ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:501) [ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:492) [ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:470) [ERROR] : TiApplication: at ti.modules.titanium.ui.ActivityIndicatorProxy.handleShow(ActivityIndicatorProxy.java:82) [ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:254) [ERROR] : TiApplication: at ti.modules.titanium.ui.ActivityIndicatorProxy.handleMessage(ActivityIndicatorProxy.java:67) [ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:98) [ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:155) [ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5696) [ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Native Method) [ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Method.java:372) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1028) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823) [ERROR] : AndroidRuntime: FATAL EXCEPTION: main [ERROR] : AndroidRuntime: Process: cc.forerunner.test, PID: 11388 [ERROR] : AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.LinearLayout.invalidate()' on a null object reference [ERROR] : AndroidRuntime: at ti.modules.titanium.ui.widget.TiUIActivityIndicator.processProperties(TiUIActivityIndicator.java:98) [ERROR] : AndroidRuntime: at org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:1209) [ERROR] : AndroidRuntime: at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:501) [ERROR] : AndroidRuntime: at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:492) [ERROR] : AndroidRuntime: at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:470) [ERROR] : AndroidRuntime: at ti.modules.titanium.ui.ActivityIndicatorProxy.handleShow(ActivityIndicatorProxy.java:82) [ERROR] : AndroidRuntime: at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:254) [ERROR] : AndroidRuntime: at ti.modules.titanium.ui.ActivityIndicatorProxy.handleMessage(ActivityIndicatorProxy.java:67) [ERROR] : AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:98) [ERROR] : AndroidRuntime: at android.os.Looper.loop(Looper.java:155) [ERROR] : AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5696) [ERROR] : AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) [ERROR] : AndroidRuntime: [ERROR] : AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1028) [ERROR] : AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823) {code}

    Appcelerator JIRA | 1 year ago | Shawn Lan
    java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.LinearLayout.invalidate()' on a null object reference
  2. 0

    Use the test case [here|https://jira.appcelerator.org/browse/TIMOB-19257]. Right after launch (during splash), click "back" to exit the app. Repeat several times and sometimes you'll see the crash. {code} [ERROR] : TiApplication: (main) [1,485] Sending event: exception on thread: main msg:java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.LinearLayout.invalidate()' on a null object reference; Titanium 4.1.0,2015/07/06 11:15,d57aa7d [ERROR] : TiApplication: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.LinearLayout.invalidate()' on a null object reference [ERROR] : TiApplication: at ti.modules.titanium.ui.widget.TiUIActivityIndicator.processProperties(TiUIActivityIndicator.java:98) [ERROR] : TiApplication: at org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:1209) [ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:501) [ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:492) [ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:470) [ERROR] : TiApplication: at ti.modules.titanium.ui.ActivityIndicatorProxy.handleShow(ActivityIndicatorProxy.java:82) [ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:254) [ERROR] : TiApplication: at ti.modules.titanium.ui.ActivityIndicatorProxy.handleMessage(ActivityIndicatorProxy.java:67) [ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:98) [ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:155) [ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5696) [ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Native Method) [ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Method.java:372) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1028) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823) [ERROR] : AndroidRuntime: FATAL EXCEPTION: main [ERROR] : AndroidRuntime: Process: cc.forerunner.test, PID: 11388 [ERROR] : AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.LinearLayout.invalidate()' on a null object reference [ERROR] : AndroidRuntime: at ti.modules.titanium.ui.widget.TiUIActivityIndicator.processProperties(TiUIActivityIndicator.java:98) [ERROR] : AndroidRuntime: at org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:1209) [ERROR] : AndroidRuntime: at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:501) [ERROR] : AndroidRuntime: at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:492) [ERROR] : AndroidRuntime: at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:470) [ERROR] : AndroidRuntime: at ti.modules.titanium.ui.ActivityIndicatorProxy.handleShow(ActivityIndicatorProxy.java:82) [ERROR] : AndroidRuntime: at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:254) [ERROR] : AndroidRuntime: at ti.modules.titanium.ui.ActivityIndicatorProxy.handleMessage(ActivityIndicatorProxy.java:67) [ERROR] : AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:98) [ERROR] : AndroidRuntime: at android.os.Looper.loop(Looper.java:155) [ERROR] : AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5696) [ERROR] : AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) [ERROR] : AndroidRuntime: [ERROR] : AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1028) [ERROR] : AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823) {code}

    Appcelerator JIRA | 1 year ago | Shawn Lan
    java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.LinearLayout.invalidate()' on a null object reference
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    GitHub comment 343#168741977

    GitHub | 11 months ago | negue
    java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v4.widget.SwipeRefreshLayout.setRefreshing(boolean)' on a null object reference
  5. 0

    Accessing SharedPreferences from Dialog CheckBox

    Stack Overflow | 11 months ago | Michael Zhang
    java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.CheckBox.setChecked(boolean)' on a null object reference

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

      Attempt to invoke virtual method 'void android.widget.LinearLayout.invalidate()' on a null object reference

      at ti.modules.titanium.ui.widget.TiUIActivityIndicator.processProperties()
    2. ti.modules.titanium
      TiUIActivityIndicator.processProperties
      1. ti.modules.titanium.ui.widget.TiUIActivityIndicator.processProperties(TiUIActivityIndicator.java:98)
      1 frame
    3. org.appcelerator.kroll
      KrollProxy.setModelListener
      1. org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:1209)
      1 frame
    4. org.appcelerator.titanium
      TiViewProxy.getOrCreateView
      1. org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:501)
      2. org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:492)
      3. org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:470)
      3 frames
    5. ti.modules.titanium
      ActivityIndicatorProxy.handleShow
      1. ti.modules.titanium.ui.ActivityIndicatorProxy.handleShow(ActivityIndicatorProxy.java:82)
      1 frame
    6. org.appcelerator.titanium
      TiViewProxy.handleMessage
      1. org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:254)
      1 frame
    7. ti.modules.titanium
      ActivityIndicatorProxy.handleMessage
      1. ti.modules.titanium.ui.ActivityIndicatorProxy.handleMessage(ActivityIndicatorProxy.java:67)
      1 frame
    8. Android Platform
      ActivityThread.main
      1. android.os.Handler.dispatchMessage(Handler.java:98)
      2. android.os.Looper.loop(Looper.java:155)
      3. android.app.ActivityThread.main(ActivityThread.java:5696)
      3 frames
    9. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:372)
      2 frames
    10. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1028)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823)
      2 frames