java.lang.RuntimeException: An error occured while executing doInBackground()

JIRA | Arnt Gulbrandsen | 1 year ago
  1. 0

    On my Nexus 5 with locale set to en-GB, starting Music NPEs at once. I tried an upgrade to the latest nightly (from the September 1 snapshot), but the problem persists (some of the line numbers in the stack trace change, that's all). The following logcat includes an illuminating stack trace. D/LocaleSetManager( 7787): Locale Changed from: null to en-GB --------- beginning of crash E/AndroidRuntime( 7787): FATAL EXCEPTION: ModernAsyncTask #1 E/AndroidRuntime( 7787): Process: com.cyanogenmod.eleven, PID: 7787 E/AndroidRuntime( 7787): java.lang.RuntimeException: An error occured while executing doInBackground() E/AndroidRuntime( 7787): at android.support.v4.content.ModernAsyncTask$3.done(ModernAsyncTask.java:137) E/AndroidRuntime( 7787): at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355) E/AndroidRuntime( 7787): at java.util.concurrent.FutureTask.setException(FutureTask.java:222) E/AndroidRuntime( 7787): at java.util.concurrent.FutureTask.run(FutureTask.java:242) E/AndroidRuntime( 7787): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) E/AndroidRuntime( 7787): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) E/AndroidRuntime( 7787): at java.lang.Thread.run(Thread.java:818) E/AndroidRuntime( 7787): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference E/AndroidRuntime( 7787): at com.cyanogenmod.eleven.locale.LocaleUtils$LocaleUtilsBase.getBucketIndex(LocaleUtils.java:131) E/AndroidRuntime( 7787): at com.cyanogenmod.eleven.locale.LocaleUtils.getBucketIndex(LocaleUtils.java:466) E/AndroidRuntime( 7787): at com.cyanogenmod.eleven.provider.LocalizedStore.updateAlbumData(LocalizedStore.java:293) E/AndroidRuntime( 7787): at com.cyanogenmod.eleven.provider.LocalizedStore.updateLocalizedStore(LocalizedStore.java:252) E/AndroidRuntime( 7787): at com.cyanogenmod.eleven.provider.LocalizedStore.addIds(LocalizedStore.java:521) E/AndroidRuntime( 7787): at com.cyanogenmod.eleven.provider.LocalizedStore.updateDiscrepancies(LocalizedStore.java:469) E/AndroidRuntime( 7787): at com.cyanogenmod.eleven.provider.LocalizedStore.getLocalizedSort(LocalizedStore.java:442) E/AndroidRuntime( 7787): at com.cyanogenmod.eleven.loaders.SongLoader.makeSongCursor(SongLoader.java:206) E/AndroidRuntime( 7787): at com.cyanogenmod.eleven.loaders.SongLoader.makeSongCursor(SongLoader.java:162) E/AndroidRuntime( 7787): at com.cyanogenmod.eleven.loaders.SongLoader.getCursor(SongLoader.java:134) E/AndroidRuntime( 7787): at com.cyanogenmod.eleven.loaders.SongLoader.loadInBackground(SongLoader.java:80) E/AndroidRuntime( 7787): at com.cyanogenmod.eleven.loaders.SongLoader.loadInBackground(SongLoader.java:40) E/AndroidRuntime( 7787): at com.cyanogenmod.eleven.sectionadapter.SectionCreator.loadInBackground(SectionCreator.java:69) E/AndroidRuntime( 7787): at com.cyanogenmod.eleven.sectionadapter.SectionCreator.loadInBackground(SectionCreator.java:30) E/AndroidRuntime( 7787): at android.support.v4.content.AsyncTaskLoader.onLoadInBackground(AsyncTaskLoader.java:242) E/AndroidRuntime( 7787): at android.support.v4.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:51) E/AndroidRuntime( 7787): at android.support.v4.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:40) E/AndroidRuntime( 7787): at android.support.v4.content.ModernAsyncTask$2.call(ModernAsyncTask.java:123) E/AndroidRuntime( 7787): at java.util.concurrent.FutureTask.run(FutureTask.java:237) E/AndroidRuntime( 7787): ... 3 more W/ActivityManager( 2333): Force finishing activity 1 com.cyanogenmod.eleven/.ui.activities.HomeActivity

    JIRA | 1 year ago | Arnt Gulbrandsen
    java.lang.RuntimeException: An error occured while executing doInBackground()
  2. 0

    On my Nexus 5 with locale set to en-GB, starting Music NPEs at once. I tried an upgrade to the latest nightly (from the September 1 snapshot), but the problem persists (some of the line numbers in the stack trace change, that's all). The following logcat includes an illuminating stack trace. D/LocaleSetManager( 7787): Locale Changed from: null to en-GB --------- beginning of crash E/AndroidRuntime( 7787): FATAL EXCEPTION: ModernAsyncTask #1 E/AndroidRuntime( 7787): Process: com.cyanogenmod.eleven, PID: 7787 E/AndroidRuntime( 7787): java.lang.RuntimeException: An error occured while executing doInBackground() E/AndroidRuntime( 7787): at android.support.v4.content.ModernAsyncTask$3.done(ModernAsyncTask.java:137) E/AndroidRuntime( 7787): at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355) E/AndroidRuntime( 7787): at java.util.concurrent.FutureTask.setException(FutureTask.java:222) E/AndroidRuntime( 7787): at java.util.concurrent.FutureTask.run(FutureTask.java:242) E/AndroidRuntime( 7787): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) E/AndroidRuntime( 7787): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) E/AndroidRuntime( 7787): at java.lang.Thread.run(Thread.java:818) E/AndroidRuntime( 7787): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference E/AndroidRuntime( 7787): at com.cyanogenmod.eleven.locale.LocaleUtils$LocaleUtilsBase.getBucketIndex(LocaleUtils.java:131) E/AndroidRuntime( 7787): at com.cyanogenmod.eleven.locale.LocaleUtils.getBucketIndex(LocaleUtils.java:466) E/AndroidRuntime( 7787): at com.cyanogenmod.eleven.provider.LocalizedStore.updateAlbumData(LocalizedStore.java:293) E/AndroidRuntime( 7787): at com.cyanogenmod.eleven.provider.LocalizedStore.updateLocalizedStore(LocalizedStore.java:252) E/AndroidRuntime( 7787): at com.cyanogenmod.eleven.provider.LocalizedStore.addIds(LocalizedStore.java:521) E/AndroidRuntime( 7787): at com.cyanogenmod.eleven.provider.LocalizedStore.updateDiscrepancies(LocalizedStore.java:469) E/AndroidRuntime( 7787): at com.cyanogenmod.eleven.provider.LocalizedStore.getLocalizedSort(LocalizedStore.java:442) E/AndroidRuntime( 7787): at com.cyanogenmod.eleven.loaders.SongLoader.makeSongCursor(SongLoader.java:206) E/AndroidRuntime( 7787): at com.cyanogenmod.eleven.loaders.SongLoader.makeSongCursor(SongLoader.java:162) E/AndroidRuntime( 7787): at com.cyanogenmod.eleven.loaders.SongLoader.getCursor(SongLoader.java:134) E/AndroidRuntime( 7787): at com.cyanogenmod.eleven.loaders.SongLoader.loadInBackground(SongLoader.java:80) E/AndroidRuntime( 7787): at com.cyanogenmod.eleven.loaders.SongLoader.loadInBackground(SongLoader.java:40) E/AndroidRuntime( 7787): at com.cyanogenmod.eleven.sectionadapter.SectionCreator.loadInBackground(SectionCreator.java:69) E/AndroidRuntime( 7787): at com.cyanogenmod.eleven.sectionadapter.SectionCreator.loadInBackground(SectionCreator.java:30) E/AndroidRuntime( 7787): at android.support.v4.content.AsyncTaskLoader.onLoadInBackground(AsyncTaskLoader.java:242) E/AndroidRuntime( 7787): at android.support.v4.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:51) E/AndroidRuntime( 7787): at android.support.v4.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:40) E/AndroidRuntime( 7787): at android.support.v4.content.ModernAsyncTask$2.call(ModernAsyncTask.java:123) E/AndroidRuntime( 7787): at java.util.concurrent.FutureTask.run(FutureTask.java:237) E/AndroidRuntime( 7787): ... 3 more W/ActivityManager( 2333): Force finishing activity 1 com.cyanogenmod.eleven/.ui.activities.HomeActivity

    JIRA | 1 year ago | Arnt Gulbrandsen
    java.lang.RuntimeException: An error occured while executing doInBackground()
  3. 0

    ANAND Gupta - Google+

    google.com | 8 months ago
    java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    DatePickerDialog NullPointerException

    GitHub | 1 year ago | don11995
    java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
  6. 0

    "Unfortunately <Appname> has stopped" error while running my small Android code

    Stack Overflow | 1 year ago | anubha
    java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' 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 'int java.lang.String.length()' on a null object reference

      at com.cyanogenmod.eleven.locale.LocaleUtils$LocaleUtilsBase.getBucketIndex()
    2. com.cyanogenmod.eleven
      SectionCreator.loadInBackground
      1. com.cyanogenmod.eleven.locale.LocaleUtils$LocaleUtilsBase.getBucketIndex(LocaleUtils.java:131)
      2. com.cyanogenmod.eleven.locale.LocaleUtils.getBucketIndex(LocaleUtils.java:466)
      3. com.cyanogenmod.eleven.provider.LocalizedStore.updateAlbumData(LocalizedStore.java:293)
      4. com.cyanogenmod.eleven.provider.LocalizedStore.updateLocalizedStore(LocalizedStore.java:252)
      5. com.cyanogenmod.eleven.provider.LocalizedStore.addIds(LocalizedStore.java:521)
      6. com.cyanogenmod.eleven.provider.LocalizedStore.updateDiscrepancies(LocalizedStore.java:469)
      7. com.cyanogenmod.eleven.provider.LocalizedStore.getLocalizedSort(LocalizedStore.java:442)
      8. com.cyanogenmod.eleven.loaders.SongLoader.makeSongCursor(SongLoader.java:206)
      9. com.cyanogenmod.eleven.loaders.SongLoader.makeSongCursor(SongLoader.java:162)
      10. com.cyanogenmod.eleven.loaders.SongLoader.getCursor(SongLoader.java:134)
      11. com.cyanogenmod.eleven.loaders.SongLoader.loadInBackground(SongLoader.java:80)
      12. com.cyanogenmod.eleven.loaders.SongLoader.loadInBackground(SongLoader.java:40)
      13. com.cyanogenmod.eleven.sectionadapter.SectionCreator.loadInBackground(SectionCreator.java:69)
      14. com.cyanogenmod.eleven.sectionadapter.SectionCreator.loadInBackground(SectionCreator.java:30)
      14 frames
    3. Android Support v4
      ModernAsyncTask$2.call
      1. android.support.v4.content.AsyncTaskLoader.onLoadInBackground(AsyncTaskLoader.java:242)
      2. android.support.v4.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:51)
      3. android.support.v4.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:40)
      4. android.support.v4.content.ModernAsyncTask$2.call(ModernAsyncTask.java:123)
      4 frames
    4. Java RT
      Thread.run
      1. java.util.concurrent.FutureTask.run(FutureTask.java:237)
      2. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
      3. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
      4. java.lang.Thread.run(Thread.java:818)
      4 frames