JakeWharton / ThreeTenABP

An adaptation of the JSR-310 backport for Android.
Apache License 2.0
3.54k stars 132 forks source link

checkValidValue DateTimeException in production #112

Closed saikiran91 closed 5 years ago

saikiran91 commented 5 years ago

It is happening in the device - Samsung Galaxy J1 (2016) (j1xlte), Android 5.1

java.lang.RuntimeException: 
  at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3133)
  at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3243)
  at android.app.ActivityThread.access$1000 (ActivityThread.java:218)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1718)
  at android.os.Handler.dispatchMessage (Handler.java:102)
  at android.os.Looper.loop (Looper.java:145)
  at android.app.ActivityThread.main (ActivityThread.java:6917)
  at java.lang.reflect.Method.invoke (Method.java)
  at java.lang.reflect.Method.invoke (Method.java:372)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1404)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1199)
Caused by: org.threeten.bp.DateTimeException: 
  at org.threeten.bp.temporal.ValueRange.checkValidValue (ValueRange.java)
  or                     .getMinimum (ValueRange.java)
  or                     .isValidValue (ValueRange.java)
  at org.threeten.bp.temporal.ChronoField.checkValidValue (ChronoField.java)
  or                     .getFrom (ChronoField.java)
  at org.threeten.bp.LocalTime.adjustInto (LocalTime.java)
  or                     .atOffset (LocalTime.java)
  or                     .compareTo (LocalTime.java)
  or                     .create (LocalTime.java)
  or                     .from (LocalTime.java)
  or                     .minus (LocalTime.java)
  or                     .ofSecondOfDay (LocalTime.java)
  or                     .plusHours (LocalTime.java)
  or                     .query (LocalTime.java)
  or                     .range (LocalTime.java)
  or                     .readExternal (LocalTime.java)
  or                     .with (LocalTime.java)
  or                     .withHour (LocalTime.java)
  or                     .writeExternal (LocalTime.java)
  at org.threeten.bp.LocalDateTime.adjustInto (LocalDateTime.java)
  or                     .atZone (LocalDateTime.java)
  or                     .compareTo (LocalDateTime.java)
  or                     .compareTo0 (LocalDateTime.java)
  or                     .from (LocalDateTime.java)
  or                     .minus (LocalDateTime.java)
  or                     .of (LocalDateTime.java)
  or                     .ofEpochSecond (LocalDateTime.java)
  or                     .plusDays (LocalDateTime.java)
  or                     .plusWithOverflow (LocalDateTime.java)
  or                     .query (LocalDateTime.java)
  or                     .range (LocalDateTime.java)
  or                     .readExternal (LocalDateTime.java)
  or                     .with (LocalDateTime.java)
  or                     .withHour (LocalDateTime.java)
  or                     .writeExternal (LocalDateTime.java)
  at org.threeten.bp.ZonedDateTime.create (ZonedDateTime.java)
  or                     .from (ZonedDateTime.java)
  or                     .minus (ZonedDateTime.java)
  or                     .now (ZonedDateTime.java)
  or                     .of (ZonedDateTime.java)
  or                     .ofInstant (ZonedDateTime.java)
  or                     .ofLocal (ZonedDateTime.java)
  or                     .plusDays (ZonedDateTime.java)
  or                     .query (ZonedDateTime.java)
  or                     .range (ZonedDateTime.java)
  or                     .readExternal (ZonedDateTime.java)
  or                     .resolveInstant (ZonedDateTime.java)
  or                     .resolveOffset (ZonedDateTime.java)
  or                     .with (ZonedDateTime.java)
  or                     .withHour (ZonedDateTime.java)
  or                     .withZoneSameLocal (ZonedDateTime.java)
  or                     .writeExternal (ZonedDateTime.java)
  at app.AlarmPrefs.getAlarmTime (AlarmPrefs.java)
  at app.job.ClockScheduler.access$getContext$p (NewAlarmClockScheduler.java)
  or                     .calculateAlarm (NewAlarmClockScheduler.java)
  or                     .cancelPreviousAlarm (NewAlarmClockScheduler.java)
  or                     .getAlarmPendingIntent (NewAlarmClockScheduler.java)
  or                     .getNextAlarmTime (NewAlarmClockScheduler.java)
  or                     .scheduleAlarm (NewAlarmClockScheduler.java)
  or                     .setAlarm (NewAlarmClockScheduler.java) 

API which caused the above crash is DateTimeUtils.toGregorianCalendar(...)

JakeWharton commented 5 years ago

This library is just a repackaging of the timezone database from threetenbp and this failure does not seem related to loading that database. You're better off reporting it https://github.com/ThreeTen/threetenbp, ideally with a bit more information as to the cause.