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

Appcelerator JIRA | Shawn Lan | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  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 | 2 years 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 | 2 years 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

    Attempt to invoke virtual method on a null object reference - Android - java

    developer-works.com | 1 year ago
    java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.ArrayList foto.studio.SQLiteDataSource.getAllImageItems()' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2693) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2758) at android.app.ActivityThread.access$900(ActivityThread.java:177) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1448) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:5942) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)
  5. 0

    Attempt to invoke virtual method on a null object reference

    xluat.com | 1 year ago
    java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.ArrayList foto.studio.SQLiteDataSource.getAllImageItems()' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2693) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2758) at android.app.ActivityThread.access$900(ActivityThread.java:177) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1448) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:5942) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)

    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