Closed
Bug 1272817
Opened 9 years ago
Closed 9 years ago
Crash in java.lang.IllegalArgumentException: Expected buffer size larger than 0. Got: 0 at org.mozilla.gecko.util.FileUtils.readStringFromInputStreamAndCloseStream(FileUtils.java)
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(firefox49 fixed)
RESOLVED
FIXED
Firefox 49
Tracking | Status | |
---|---|---|
firefox49 | --- | fixed |
People
(Reporter: dbaron, Assigned: mcomella)
References
Details
(Keywords: crash, topcrash)
Crash Data
Attachments
(1 file)
This bug was filed from the Socorro interface and is
report bp-195f2b3a-8359-4d04-8714-90bd02160513.
=============================================================
There are 5 of these crashes:
java.lang.IllegalArgumentException: Expected buffer size larger than 0. Got: 0
at org.mozilla.gecko.util.FileUtils.readStringFromInputStreamAndCloseStream(FileUtils.java:147)
at org.mozilla.gecko.telemetry.stores.TelemetryJSONFilePingStore.lockAndReadFileAndCloseStream(TelemetryJSONFilePingStore.java:235)
at org.mozilla.gecko.telemetry.stores.TelemetryJSONFilePingStore.getAllPings(TelemetryJSONFilePingStore.java:158)
at org.mozilla.gecko.telemetry.stores.TelemetryJSONFilePingStore.getAllPings(TelemetryJSONFilePingStore.java:55)
at org.mozilla.gecko.telemetry.TelemetryUploadService.uploadPendingPingsFromStore(TelemetryUploadService.java:87)
at org.mozilla.gecko.telemetry.TelemetryUploadService.onHandleIntent(TelemetryUploadService.java:70)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.os.HandlerThread.run(HandlerThread.java:61)
probably from 2 different users, in the May 12 nightly builds.
(I got a little confused trying to track down blame for this, but I think all the possibilities point to mcomella.)
Flags: needinfo?(michael.l.comella)
Assignee | ||
Comment 1•9 years ago
|
||
Regression from bug 1243585.
We pass the file length to a method that uses that to set the buffer size. When the buffer size is 0, we throw (i.e. that API does not gracefully handle empty files.
The solution is to return early if we try to read empty files.
That being said, it's curious we're reading an empty file – we probably crashed while trying to write the file in the first place.
Blocks: 1243585
Flags: needinfo?(michael.l.comella)
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → michael.l.comella
Assignee | ||
Comment 2•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/52603/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/52603/
Attachment #8752413 -
Flags: review?(s.kaspari)
Updated•9 years ago
|
Attachment #8752413 -
Flags: review?(s.kaspari) → review+
Comment 3•9 years ago
|
||
Comment on attachment 8752413 [details]
MozReview Request: Bug 1272817 - Return early if file is empty + regression test. r=sebastian
https://reviewboard.mozilla.org/r/52603/#review49563
Assignee | ||
Comment 4•9 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/3368c35a942e3fbd83a394a15d8afd735bc965e2
Bug 1272817 - Return early if file is empty + regression test. r=sebastian
Comment 5•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 49
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•