java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference

Stack Overflow | James | 3 months ago
  1. 0

    Android AsyncTask getting JSON but not returning/crashing only on actual device

    Stack Overflow | 3 months ago | James
    java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference
  2. 0

    TiDownloadManager doesn't seem to properly handle redirects on Android Lollipop. This is the exception I get: {code} ERROR] TiDownloadManager: (pool-4-thread-1) [916,916] Exception downloading https://graph.facebook.com/100008778152788/picture?width=200&height=200 [ERROR] TiDownloadManager: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.startsWith(java.lang.String)' on a null object reference [ERROR] TiDownloadManager: at com.android.okhttp.internal.http.StatusLine.<init>(StatusLine.java:24) [ERROR] TiDownloadManager: at com.android.okhttp.Response$Builder.statusLine(Response.java:419) [ERROR] TiDownloadManager: at com.android.okhttp.internal.http.JavaApiConverter.createOkResponse(JavaApiConverter.java:116) [ERROR] TiDownloadManager: at com.android.okhttp.internal.http.ResponseCacheAdapter.get(ResponseCacheAdapter.java:53) [ERROR] TiDownloadManager: at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:190) [ERROR] TiDownloadManager: at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:373) [ERROR] TiDownloadManager: at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:323) [ERROR] TiDownloadManager: at com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:190) [ERROR] TiDownloadManager: at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210) [ERROR] TiDownloadManager: at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:25) [ERROR] TiDownloadManager: at java.net.URL.openStream(URL.java:470) [ERROR] TiDownloadManager: at org.appcelerator.titanium.util.TiDownloadManager$DownloadJob.run(TiDownloadManager.java:135) [ERROR] TiDownloadManager: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) [ERROR] TiDownloadManager: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) [ERROR] TiDownloadManager: at java.lang.Thread.run(Thread.java:818) {code} Attached you can find a single window application in which two image views are used to display remote images. The second of the two uses some facebook redirect to get the actual image url, and TiDownloadManager crashes while fetching the data.

    Appcelerator JIRA | 2 years ago | Matteo Landi
    java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.startsWith(java.lang.String)' on a null object reference
  3. 0

    TiDownloadManager doesn't seem to properly handle redirects on Android Lollipop. This is the exception I get: {code} ERROR] TiDownloadManager: (pool-4-thread-1) [916,916] Exception downloading https://graph.facebook.com/100008778152788/picture?width=200&height=200 [ERROR] TiDownloadManager: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.startsWith(java.lang.String)' on a null object reference [ERROR] TiDownloadManager: at com.android.okhttp.internal.http.StatusLine.<init>(StatusLine.java:24) [ERROR] TiDownloadManager: at com.android.okhttp.Response$Builder.statusLine(Response.java:419) [ERROR] TiDownloadManager: at com.android.okhttp.internal.http.JavaApiConverter.createOkResponse(JavaApiConverter.java:116) [ERROR] TiDownloadManager: at com.android.okhttp.internal.http.ResponseCacheAdapter.get(ResponseCacheAdapter.java:53) [ERROR] TiDownloadManager: at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:190) [ERROR] TiDownloadManager: at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:373) [ERROR] TiDownloadManager: at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:323) [ERROR] TiDownloadManager: at com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:190) [ERROR] TiDownloadManager: at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210) [ERROR] TiDownloadManager: at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:25) [ERROR] TiDownloadManager: at java.net.URL.openStream(URL.java:470) [ERROR] TiDownloadManager: at org.appcelerator.titanium.util.TiDownloadManager$DownloadJob.run(TiDownloadManager.java:135) [ERROR] TiDownloadManager: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) [ERROR] TiDownloadManager: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) [ERROR] TiDownloadManager: at java.lang.Thread.run(Thread.java:818) {code} Attached you can find a single window application in which two image views are used to display remote images. The second of the two uses some facebook redirect to get the actual image url, and TiDownloadManager crashes while fetching the data.

    Appcelerator JIRA | 2 years ago | Matteo Landi
    java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.startsWith(java.lang.String)' on a null object reference
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    support.v7.app.AlertDialog throws NullPointerException on dismiss

    Stack Overflow | 2 years ago
    java.lang.NullPointerException: attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference
  6. 0

    java.lang.NullPointerException in getPushEventListener - Pushwoosh Community

    pushwoosh.com | 3 months ago
    java.lang.RuntimeException: Error receiving broadcast Intent { act=fr.mandark.www.com.arellomobile.android.push.REGISTER_BROAD_CAST_ACTION flg=0x10 pkg=fr.mandark.www (has extras) } in com.arellomobile.android.push.fragment.PushFragment$1@5c7df2c

    1 unregistered visitors
    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 'java.lang.Class java.lang.Object.getClass()' on a null object reference

      at com.android.okhttp.internal.http.SBServiceAPI.getService()
    2. Android
      HttpsURLConnectionImpl.getInputStream
      1. com.android.okhttp.internal.http.SBServiceAPI.getService(SBServiceAPI.java:641)
      2. com.android.okhttp.internal.http.HttpEngine.<init>(HttpEngine.java:211)
      3. com.android.okhttp.internal.http.HttpURLConnectionImpl.newHttpEngine(HttpURLConnectionImpl.java:332)
      4. com.android.okhttp.internal.http.HttpURLConnectionImpl.initHttpEngine(HttpURLConnectionImpl.java:283)
      5. com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:342)
      6. com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:203)
      7. com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210)
      8. com.android.okhttp.internal.http.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:25)
      8 frames
    3. com.example.schadtj
      UpdateUtilitiesDialogFragment$UpdateUtilities.doInBackground
      1. com.example.schadtj.portalapp.Dialogs.UpdateUtilitiesDialogFragment$UpdateUtilities.doInBackground(UpdateUtilitiesDialogFragment.java:119)
      2. com.example.schadtj.portalapp.Dialogs.UpdateUtilitiesDialogFragment$UpdateUtilities.doInBackground(UpdateUtilitiesDialogFragment.java:105)
      2 frames
    4. Android Platform
      AsyncTask$2.call
      1. android.os.AsyncTask$2.call(AsyncTask.java:288)
      1 frame
    5. Java RT
      FutureTask.run
      1. java.util.concurrent.FutureTask.run(FutureTask.java:237)
      1 frame
    6. Android Platform
      AsyncTask$SerialExecutor$1.run
      1. android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
      1 frame
    7. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
      3. java.lang.Thread.run(Thread.java:818)
      3 frames