Opened 4 years ago

Closed 4 years ago

#1976 closed defect (fixed)

BuildTime.EARLIEST datetime string is unparseable on older Android devices

Reported by: str4d Owned by: zzz
Priority: critical Milestone: 0.9.30
Component: api/utils Version: 0.9.28
Keywords: Cc: zzz
Parent Tickets: Sensitive: no


Spotted this error on Google Play. Several variants depending on entry point, but all centered on Clock initialization:

	at net.i2p.util.Clock.<init>(
	at net.i2p.router.RouterClock.<init>(
	at net.i2p.router.RouterContext.initializeClock(
	at net.i2p.I2PAppContext.clock(
	at net.i2p.router.util.EventLog.addEvent(
	at net.i2p.router.Router.runRouter(
	at net.i2p.router.Router.main(
	at net.i2p.router.RouterLaunch.main(
Caused by: java.lang.RuntimeException: BuildTime FAIL
	at net.i2p.time.BuildTime.<clinit>(
	... 10 more
Caused by: java.text.ParseException: Unparseable date: "2016-02-19 12:00:00 UTC"
	at java.text.DateFormat.parse(
	at net.i2p.time.BuildTime.<clinit>(
	... 10 more

Only occurring since the 0.9.28 Android release. 20 reports in total, 19 from Android 2.3.3 - 2.3.7, one from Android 3.2.


Change History (5)

comment:1 Changed 4 years ago by str4d

Cc: zzz added

I spotted this after pushing 0.9.29, but have continued doing so as this is a problem inside i2p.jar (which is already on Maven Central) and therefore not something that can be fixed before 0.9.30.

comment:2 Changed 4 years ago by str4d

Hmm, the code in question was added in February 2016, and there have been three Android releases since then without reports. So maybe it was a problem before, but there weren't any reports (or any users with those older devices).

Last edited 4 years ago by str4d (previous) (diff)

comment:3 Changed 4 years ago by zzz

It's certainly the time zone. Will try to chase it down.

comment:4 Changed 4 years ago by zzz

Owner: set to zzz
Status: newaccepted

'z' supported since API 1

Whatever the issue, clearly we need to not throw a RuntimeException?, but just deal with it and fail soft. I'll fix it somehow.

comment:5 Changed 4 years ago by zzz

Resolution: fixed
Status: acceptedclosed

In 49f1abae144331c6e28f68959401284ead7621da 0.9.29-12

Sorry about that, don't know what I was thinking throwing a RuntimeException? from a static block.

It would be helpful if we check the GPlay reports before each desktop release so we can fix things in the next release, or come up with some automated way of pulling new reports.

Note: See TracTickets for help on using tickets.