ArrayIndexOutOfBoundsException ZoneRules.isFixedOffset
See original GitHub issueAfter updating to kotlinx-datetime:0.3.0 I am seeing crashes on Android with the following stacktrace:
java.lang.ArrayIndexOutOfBoundsException: length=0; index=-1 at j$.time.zone.ZoneRules.isFixedOffset at kotlinx.datetime.TimeZone$Companion.ofZone$kotlinx_datetime(SourceFile:47) at kotlinx.datetime.TimeZone$Companion.currentSystemDefault(SourceFile:34)
I am not totally sure where to report this, the crash is introduced due to 0.3.0 making calls to ZoneRules.isFixedOffset.
Though by looking at the source code of java.time.zone.ZoneRules here, I can’t see how an ArrayIndexOutOfBoundsException can happen.
I have coreLibraryDesugaring enabled, using com.android.tools:desugar_jdk_libs:1.1.5
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:13 (5 by maintainers)
Top Results From Across the Web
ZoneRules - Android Developers
Obtains an instance of ZoneRules that has fixed zone rules. ... public boolean isFixedOffset (). Checks of the zone rules are fixed, such...
Read more >ZoneRules (Java Platform SE 8 ) - Oracle Help Center
Checks if the specified instant is in daylight savings. boolean, isFixedOffset(). Checks of the zone rules are fixed, such that the offset never...
Read more >jdk8/jdk8/jdk: 5435f112e5ea - OpenJDK Mercurial Repositories
Pattern; /** - * A builder that can read the TZDB time-zone files and build {@code ZoneRules} instances. + * A compiler that...
Read more >Diff - platform/frameworks/base - Google Git
ZoneRules getRules(); + method public int getTotalSeconds(); + method public ... Instant); + method public boolean isFixedOffset(); + method public boolean ...
Read more >java.time.zone.ZoneRules.isFixedOffset java code examples
JdkBasedDateTimeZone.isFixed(). @Override public boolean isFixed() { return zoneRules.isFixedOffset(); }. origin: com.github.seratch/java-time-backport ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Thanks! I managed to reproduce it on an emulator with the API level 24. With the API level 30, everything is fine.
I suppose it’s really up to us to work around this to support older versions, as Google seems to have fixed this already in the newer SDKs.
Hi guys, could please give some estimate for the next release which fixes this? iosSimulatorArm64 is important to us, but we cannot upgrade to 0.3.0 until this issue is fixed - it generates a lot of crashes in Android production. Thanks!