Last Comment Bug 736007 - java.lang.NullPointerException: at org.mozilla.gecko.sync.repositories.Server11RepositorySession$RecordUploadRunnable.handleRequestSuccess(Server11RepositorySession.java)
: java.lang.NullPointerException: at org.mozilla.gecko.sync.repositories.Server...
Status: RESOLVED FIXED
[native-crash], sync
: crash, regression
Product: Android Background Services
Classification: Client Software
Component: Android Sync (show other bugs)
: unspecified
: ARM Android
: P1 major
: mozilla14
Assigned To: Nick Alexander :nalexander
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-15 01:44 PDT by Scoobidiver (away)
Modified: 2013-04-04 13:48 PDT (History)
5 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
fixed
fixed


Attachments

Description Scoobidiver (away) 2012-03-15 01:44:12 PDT
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
Comment 1 Richard Newman [:rnewman] 2012-03-16 10:15:58 PDT
   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…
Comment 2 Richard Newman [:rnewman] 2012-03-16 16:48:12 PDT
Here's a band-aid:

https://github.com/mozilla-services/android-sync/pull/114
Comment 3 Richard Newman [:rnewman] 2012-03-16 17:08:09 PDT
http://hg.mozilla.org/integration/mozilla-inbound/rev/09a8bb521a07
Comment 4 Phil Ringnalda (:philor, back in August) 2012-03-17 17:24:56 PDT
https://hg.mozilla.org/mozilla-central/rev/09a8bb521a07
Comment 5 Mark Finkle (:mfinkle) (use needinfo?) 2012-03-24 09:03:38 PDT
https://hg.mozilla.org/releases/mozilla-aurora/rev/6cde306c16ba

Note You need to log in before you can comment on or make changes to this bug.