java.lang.NullPointerException

Appcelerator JIRA | Neville Dastur | 4 years ago
  1. 0

    *Problem* Using alloy listview templates on Android seems to cause a crash when a view is removed and then added again. Works on iOS. *Test case* As alloy involves multiple files rather than a single app.js I have placed example code in our public github repo [https://github.com/ClinicalSoftwareSolutions/DemoBug/tree/listview_android_crash] *Steps to reproduce* Click on any row, which will show view2, then click the close button. On iOS you can switch between views no problem. On android closing the second view results in a crash. *Note* I am using Alloy 1.2 from git source to compile the alloy app, but I don't think that is the issue as the resulting Resources files seem fine. *Log* {code}06-01 16:14:55.170: E/TiApplication(16676): (main) [675396,713363] Sending event: exception on thread: main msg:java.lang.NullPointerException; Titanium 3.1.0,2013/04/15 18:46,57634ef 06-01 16:14:55.170: E/TiApplication(16676): java.lang.NullPointerException 06-01 16:14:55.170: E/TiApplication(16676): at ti.modules.titanium.ui.widget.listview.ListSectionProxy.setTemplateType(ListSectionProxy.java:733) 06-01 16:14:55.170: E/TiApplication(16676): at ti.modules.titanium.ui.widget.listview.TiListView.processSection(TiListView.java:405) 06-01 16:14:55.170: E/TiApplication(16676): at ti.modules.titanium.ui.widget.listview.TiListView.processSections(TiListView.java:387) 06-01 16:14:55.170: E/TiApplication(16676): at ti.modules.titanium.ui.widget.listview.TiListView.processProperties(TiListView.java:301) 06-01 16:14:55.170: E/TiApplication(16676): at org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:1123) 06-01 16:14:55.170: E/TiApplication(16676): at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:469) 06-01 16:14:55.170: E/TiApplication(16676): at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:453) 06-01 16:14:55.170: E/TiApplication(16676): at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:421) 06-01 16:14:55.170: E/TiApplication(16676): at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:434) 06-01 16:14:55.170: E/TiApplication(16676): at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:485) 06-01 16:14:55.170: E/TiApplication(16676): at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:453) 06-01 16:14:55.170: E/TiApplication(16676): at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:421) 06-01 16:14:55.170: E/TiApplication(16676): at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:434) 06-01 16:14:55.170: E/TiApplication(16676): at org.appcelerator.titanium.proxy.TiViewProxy.handleAdd(TiViewProxy.java:569) 06-01 16:14:55.170: E/TiApplication(16676): at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:214) 06-01 16:14:55.170: E/TiApplication(16676): at android.os.Handler.dispatchMessage(Handler.java:95) 06-01 16:14:55.170: E/TiApplication(16676): at android.os.Looper.loop(Looper.java:137) 06-01 16:14:55.170: E/TiApplication(16676): at android.app.ActivityThread.main(ActivityThread.java:4898) 06-01 16:14:55.170: E/TiApplication(16676): at java.lang.reflect.Method.invokeNative(Native Method) 06-01 16:14:55.170: E/TiApplication(16676): at java.lang.reflect.Method.invoke(Method.java:511) 06-01 16:14:55.170: E/TiApplication(16676): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006) 06-01 16:14:55.170: E/TiApplication(16676): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773) 06-01 16:14:55.170: E/TiApplication(16676): at dalvik.system.NativeStart.main(Native Method){code}

    Appcelerator JIRA | 4 years ago | Neville Dastur
    java.lang.NullPointerException
  2. 0

    *Problem* Using alloy listview templates on Android seems to cause a crash when a view is removed and then added again. Works on iOS. *Test case* As alloy involves multiple files rather than a single app.js I have placed example code in our public github repo [https://github.com/ClinicalSoftwareSolutions/DemoBug/tree/listview_android_crash] *Steps to reproduce* Click on any row, which will show view2, then click the close button. On iOS you can switch between views no problem. On android closing the second view results in a crash. *Note* I am using Alloy 1.2 from git source to compile the alloy app, but I don't think that is the issue as the resulting Resources files seem fine. *Log* {code}06-01 16:14:55.170: E/TiApplication(16676): (main) [675396,713363] Sending event: exception on thread: main msg:java.lang.NullPointerException; Titanium 3.1.0,2013/04/15 18:46,57634ef 06-01 16:14:55.170: E/TiApplication(16676): java.lang.NullPointerException 06-01 16:14:55.170: E/TiApplication(16676): at ti.modules.titanium.ui.widget.listview.ListSectionProxy.setTemplateType(ListSectionProxy.java:733) 06-01 16:14:55.170: E/TiApplication(16676): at ti.modules.titanium.ui.widget.listview.TiListView.processSection(TiListView.java:405) 06-01 16:14:55.170: E/TiApplication(16676): at ti.modules.titanium.ui.widget.listview.TiListView.processSections(TiListView.java:387) 06-01 16:14:55.170: E/TiApplication(16676): at ti.modules.titanium.ui.widget.listview.TiListView.processProperties(TiListView.java:301) 06-01 16:14:55.170: E/TiApplication(16676): at org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:1123) 06-01 16:14:55.170: E/TiApplication(16676): at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:469) 06-01 16:14:55.170: E/TiApplication(16676): at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:453) 06-01 16:14:55.170: E/TiApplication(16676): at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:421) 06-01 16:14:55.170: E/TiApplication(16676): at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:434) 06-01 16:14:55.170: E/TiApplication(16676): at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:485) 06-01 16:14:55.170: E/TiApplication(16676): at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:453) 06-01 16:14:55.170: E/TiApplication(16676): at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:421) 06-01 16:14:55.170: E/TiApplication(16676): at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:434) 06-01 16:14:55.170: E/TiApplication(16676): at org.appcelerator.titanium.proxy.TiViewProxy.handleAdd(TiViewProxy.java:569) 06-01 16:14:55.170: E/TiApplication(16676): at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:214) 06-01 16:14:55.170: E/TiApplication(16676): at android.os.Handler.dispatchMessage(Handler.java:95) 06-01 16:14:55.170: E/TiApplication(16676): at android.os.Looper.loop(Looper.java:137) 06-01 16:14:55.170: E/TiApplication(16676): at android.app.ActivityThread.main(ActivityThread.java:4898) 06-01 16:14:55.170: E/TiApplication(16676): at java.lang.reflect.Method.invokeNative(Native Method) 06-01 16:14:55.170: E/TiApplication(16676): at java.lang.reflect.Method.invoke(Method.java:511) 06-01 16:14:55.170: E/TiApplication(16676): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006) 06-01 16:14:55.170: E/TiApplication(16676): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773) 06-01 16:14:55.170: E/TiApplication(16676): at dalvik.system.NativeStart.main(Native Method){code}

    Appcelerator JIRA | 4 years ago | Neville Dastur
    java.lang.NullPointerException
  3. 0

    Android: Saving Map State in Google map

    Stack Overflow | 11 months ago | Junie Negentien
    java.lang.RuntimeException: Unable to resume activity {com.ourThesis.junieNegentien2015/com.ourThesis.junieNegentien2015.MainActivity}: java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    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

      No message provided

      at ti.modules.titanium.ui.widget.listview.ListSectionProxy.setTemplateType()
    2. ti.modules.titanium
      TiListView.processProperties
      1. ti.modules.titanium.ui.widget.listview.ListSectionProxy.setTemplateType(ListSectionProxy.java:733)
      2. ti.modules.titanium.ui.widget.listview.TiListView.processSection(TiListView.java:405)
      3. ti.modules.titanium.ui.widget.listview.TiListView.processSections(TiListView.java:387)
      4. ti.modules.titanium.ui.widget.listview.TiListView.processProperties(TiListView.java:301)
      4 frames
    3. org.appcelerator.kroll
      KrollProxy.setModelListener
      1. org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:1123)
      1 frame
    4. org.appcelerator.titanium
      TiViewProxy.handleMessage
      1. org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:469)
      2. org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:453)
      3. org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:421)
      4. org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:434)
      5. org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:485)
      6. org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:453)
      7. org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:421)
      8. org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:434)
      9. org.appcelerator.titanium.proxy.TiViewProxy.handleAdd(TiViewProxy.java:569)
      10. org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:214)
      10 frames
    5. Android Platform
      ActivityThread.main
      1. android.os.Handler.dispatchMessage(Handler.java:95)
      2. android.os.Looper.loop(Looper.java:137)
      3. android.app.ActivityThread.main(ActivityThread.java:4898)
      3 frames
    6. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invokeNative(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:511)
      2 frames
    7. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
      2 frames
    8. Android Platform
      NativeStart.main
      1. dalvik.system.NativeStart.main(Native Method)
      1 frame