We have an app that is hooked up to Fabric/Crashltyics. One of our top reported crashes is being triggered on the following lines of code:
DateTimeFormatter mMonthPattern = DateTimeFormat.forPattern("MMM");
mMonthPattern.parseDateTime(monthString).monthOfYear().get(); // monthString="feb"
We are seeing this in the logs:
Non-fatal Exception: java.lang.IllegalArgumentException: Invalid format: "feb"
..with a stack trace that follows, and then below that we see:
Crashed: IntentService[OurServiceClassThatCallsAboveCode]: 0 0 0x0000000000000000
Seemingly it's an issue with 3-character months being fed into the DateTimeFormatter. However, when I manually run the app with a hard-coded string such as "feb" or "may" or "mar", etc, it parses it just fine with no warnings or crashes. When I put log statements in there to see what it's feeding into the formatter (without any hard-coded strings), I'm seeing it go through and use the month strings without issue. See logs for reference:
07-08 13:56:42.966 3251-3375/our.app D/Log: monthString: may
07-08 13:56:42.966 3251-3375/our.app D/Log: monthString: jun
07-08 13:56:42.966 3251-3375/our.app D/Log: monthString: jul
07-08 13:56:42.966 3251-3375/our.app D/Log: monthString: aug
07-08 13:56:42.966 3251-3375/our.app D/Log: monthString: sep
07-08 13:56:42.966 3251-3375/our.app D/Log: monthString: oct
07-08 13:56:42.966 3251-3375/our.app D/Log: monthString: nov
07-08 13:56:42.966 3251-3375/our.app D/Log: monthString: dec
07-08 13:56:42.966 3251-3375/our.app D/Log: monthString: feb
The Crashlytics logs indicate we are using the latest/correct version of the app, and this spans across multiple OS levels and device types. I am scratching my head as to why we are seeing so many crashes out there for an issue that cannot be reproduced.
I see that it says Non-Fatal, but then below the stacktrace it shows "Crashed", so I'm assuming this is something that needs to be addressed..
Has anyone seen something like this before, by chance? Thanks in advance!