java.lang.NullPointerException

Appcelerator JIRA | Eduardo Gomez | 5 years ago
  1. 0

    h6.Issue Error when trying to get the events between 2 dates. h6.To reproduce 1. Run code below 2. Monitor console output i.e. eGomez-MacBook-Pro:platform-tools egomez$ ./adb -d logcat h6.Repro sequence {code:title=app.js} var startDate = new Date(2012, 03, 10, 12, 0, 0); var endDate = new Date(2012, 03, 19, 14, 0, 0); var out = []; var calendars = Ti.Android.Calendar.allCalendars; Ti.API.info('-> '+JSON.stringify(calendars)); for (var i=0; i < calendars.length; i++) { Ti.API.info('=> '+JSON.stringify(calendars[i])); var cal_events = calendars[i].getEventsBetweenDates(startDate,endDate); for (var j=0; j < cal_events.length; j++) { out.push(cal_events[j]); }; }; {code} h6.Console output Ti SDK 2.0 {code:title=Android OS 2.2} =com.appcelerator.com/.T15422Activity } I/ActivityManager( 1345): Start proc com.appcelerator.com for activity com.appcelerator.com/.T15422Activity: pid=6674 uid=10071 gids={1015, 3003} I/TiApplication( 6674): (main) [0,0] checkpoint, app created. I/TiApplication( 6674): (main) [247,247] Titanium 2.0.0 (2012/03/18 15:48 fc5c94a) I/TiDbHelper( 6674): (main) [2020,2267] No value in database for platform key: 'unique_machine_id' returning supplied default '' I/TiDbHelper( 6674): (main) [18,2285] No value in database for platform key: 'hardware_machine_id' returning supplied default '' I/TiApplication( 6674): (main) [197,2482] Titanium Javascript runtime: v8 I/TiRootActivity( 6674): (main) [0,0] checkpoint, on root activity create, savedInstanceState: null D/TiAnalyticsDb( 6674): (main) [100,100] Creating Database tianalytics.db I/TiAnalyticsDb( 6674): (main) [227,327] Upgrading Database from 1 to 4 D/WifiStateTracker( 1345): WifiStateTracker.requestConnectionStatus() reply is null init values. E/TiApplication( 6674): (KrollRuntimeThread) [1972,2299] APP PROXY: ti.modules.titanium.app.AppModule@44a689d8 I/TiAPI ( 6674): -> [{"hidden":false,"id":"1","selected":true,"name":"eduardo.www@gmail.com"}] I/TiAPI ( 6674): => {"hidden":false,"id":"1","selected":true,"name":"eduardo.www@gmail.com"} {code} {code:title=Android OS 3.2} 03-19 10:01:22.375: W/System.err(22687): java.lang.NullPointerException 03-19 10:01:22.375: W/System.err(22687): at ti.modules.titanium.android.calendar.EventProxy.queryEventsBetweenDates(EventProxy.java:86) 03-19 10:01:22.375: W/System.err(22687): at ti.modules.titanium.android.calendar.EventProxy.queryEventsBetweenDates(EventProxy.java:210) 03-19 10:01:22.380: W/System.err(22687): at ti.modules.titanium.android.calendar.CalendarProxy.getEventsBetweenDates(CalendarProxy.java:146) 03-19 10:01:22.380: W/System.err(22687): at org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method) 03-19 10:01:22.380: W/System.err(22687): at org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:60) 03-19 10:01:22.380: W/System.err(22687): at org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:494) 03-19 10:01:22.380: W/System.err(22687): at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:675) 03-19 10:01:22.380: W/System.err(22687): at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:392) 03-19 10:01:22.380: W/System.err(22687): at android.os.Handler.dispatchMessage(Handler.java:95) 03-19 10:01:22.380: W/System.err(22687): at android.os.Looper.loop(Looper.java:132) 03-19 10:01:22.380: W/System.err(22687): at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:104) 03-19 10:01:22.390: E/TiJSError(22687): (main) [7740,11480] ----- Titanium Javascript Runtime Error ----- 03-19 10:01:22.395: E/TiJSError(22687): (main) [0,11480] - In helpers/calendar_helper.js:62,35 03-19 10:01:22.395: E/TiJSError(22687): (main) [0,11480] - Message: Uncaught Error: Java Exception occurred 03-19 10:01:22.395: E/TiJSError(22687): (main) [0,11480] - Source: var cal_events = calendars[i].getEventsBetweenDates(startDate,endDate); {code}

    Appcelerator JIRA | 5 years ago | Eduardo Gomez
    java.lang.NullPointerException
  2. 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
  3. 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.android.calendar.EventProxy.queryEventsBetweenDates()
    2. ti.modules.titanium
      CalendarProxy.getEventsBetweenDates
      1. ti.modules.titanium.android.calendar.EventProxy.queryEventsBetweenDates(EventProxy.java:86)
      2. ti.modules.titanium.android.calendar.EventProxy.queryEventsBetweenDates(EventProxy.java:210)
      3. ti.modules.titanium.android.calendar.CalendarProxy.getEventsBetweenDates(CalendarProxy.java:146)
      3 frames
    3. org.appcelerator.kroll
      KrollProxy.handleMessage
      1. org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method)
      2. org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:60)
      3. org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:494)
      4. org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:675)
      4 frames
    4. org.appcelerator.titanium
      TiViewProxy.handleMessage
      1. org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:392)
      1 frame
    5. Android Platform
      Looper.loop
      1. android.os.Handler.dispatchMessage(Handler.java:95)
      2. android.os.Looper.loop(Looper.java:132)
      2 frames
    6. org.appcelerator.kroll
      KrollRuntime$KrollRuntimeThread.run
      1. org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:104)
      1 frame