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

RESOLVED FIXED in Firefox 13

Status

Android Background Services
Android Sync
P1
major
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: Scoobidiver (away), Assigned: nalexander)

Tracking

({crash, regression})

unspecified
mozilla14
ARM
Android
crash, regression

Firefox Tracking Flags

(firefox13 fixed, firefox14 fixed)

Details

(Whiteboard: [native-crash], sync, crash signature)

(Reporter)

Description

5 years ago
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

Updated

5 years ago
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
http://hg.mozilla.org/integration/mozilla-inbound/rev/09a8bb521a07
Target Milestone: --- → mozilla14
https://hg.mozilla.org/mozilla-central/rev/09a8bb521a07
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
(Reporter)

Updated

5 years ago
status-firefox13: --- → affected
https://hg.mozilla.org/releases/mozilla-aurora/rev/6cde306c16ba
status-firefox13: affected → fixed
status-firefox14: --- → fixed
Component: Android Sync → Android Sync
Product: Mozilla Services → Android Background Services
You need to log in before you can comment on or make changes to this bug.