Closed Bug 736007 Opened 12 years ago Closed 12 years ago

java.lang.NullPointerException: at org.mozilla.gecko.sync.repositories.Server11RepositorySession$RecordUploadRunnable.handleRequestSuccess(Server11RepositorySession.java)

Categories

(Firefox for Android Graveyard :: Android Sync, defect, P1)

ARM
Android

Tracking

(firefox13 fixed, firefox14 fixed)

RESOLVED FIXED
mozilla14
Tracking Status
firefox13 --- fixed
firefox14 --- fixed

People

(Reporter: scoobidiver, Assigned: nalexander)

Details

(Keywords: crash, regression, Whiteboard: [native-crash], sync)

Crash Data

It first appeared in 13.0a1/20120313. The regression range is:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=5ec9524de1af&tochange=ee4e0c98cb02

java.lang.NullPointerException
	at org.mozilla.gecko.sync.repositories.Server11RepositorySession$RecordUploadRunnable.handleRequestSuccess(Server11RepositorySession.java:391)
	at org.mozilla.gecko.sync.net.SyncStorageRequest$SyncStorageResourceDelegate.handleHttpResponse(SyncStorageRequest.java:107)
	at org.mozilla.gecko.sync.net.BaseResource.execute(BaseResource.java:178)
	at org.mozilla.gecko.sync.net.BaseResource.go(BaseResource.java:200)
	at org.mozilla.gecko.sync.net.BaseResource.post(BaseResource.java:220)
	at org.mozilla.gecko.sync.net.SyncStorageRequest.post(SyncStorageRequest.java:171)
	at org.mozilla.gecko.sync.repositories.Server11RepositorySession$RecordUploadRunnable.run(Server11RepositorySession.java:493)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
	at java.lang.Thread.run(Thread.java:1019)

More reports at:
https://crash-stats.mozilla.com/report/list?signature=java.lang.NullPointerException%3A%20at%20org.mozilla.gecko.sync.repositories.Server11RepositorySession%24RecordUploadRunnable.handleRequestSuccess%28Server11RepositorySession.java%29
Whiteboard: [native-crash] → [native-crash], sync
   391       long modified = body.getTimestamp("modified");

   392       Log.i(LOG_TAG, "POST request success. Modified timestamp: " + modified);


It appears to be throwing there.

The only thing I can think of is that the response doesn't contain a modified time, and so the returned Long is null, which throws an NPE converting to a long.

Nick: your changeset is the only thing introduced in this regression range.

http://hg.mozilla.org/mozilla-central/rev/a64caf61fb62

Take a look? That timestamp code ought to be made safe, but I'd like to know if the body has been consumed when it ought not…
Component: General → Android Sync
Product: Fennec Native → Mozilla Services
QA Contact: general → android-sync
Version: Firefox 13 → unspecified
Here's a band-aid:

https://github.com/mozilla-services/android-sync/pull/114
Assignee: nobody → nalexander
Severity: critical → major
Status: NEW → ASSIGNED
Priority: -- → P1
https://hg.mozilla.org/mozilla-central/rev/09a8bb521a07
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Product: Mozilla Services → Android Background Services
Product: Android Background Services → Firefox for Android
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.