Closed Bug 970340 Opened 6 years ago Closed 6 years ago

[Downloads API] A file with a size >1GB is not displayed successfully

Categories

(Firefox OS Graveyard :: General, defect)

Other
Gonk (Firefox OS)
defect
Not set

Tracking

(blocking-b2g:1.4+, b2g-v1.4 verified)

VERIFIED FIXED
1.4 S2 (28feb)
blocking-b2g 1.4+
Tracking Status
b2g-v1.4 --- verified

People

(Reporter: rafael.marquez, Assigned: tedders1)

References

Details

(Whiteboard: [systemsfe][p=1])

Attachments

(3 files)

Attached image GB file.png
*Procedure
1. Open https://owd.tid.es/dm/
2. Download a file 1GB "ocupamucho.tgz"
3. Open download list during the download

*Expected Result
The file is displayed successfull. File size is displayed as GB

*Actual Result
The file is not displayed successfull. File size is displayed as B.  See the attached file
blocking-b2g: --- → 1.4?
Whiteboard: [systemsfe]
Assignee: nobody → crdlc
Status: NEW → ASSIGNED
Attached file Patch v1
I would like to add this unit test to confirm that the algorithm used to calculate the formatted size is ok in Gaia
Attachment #8373396 - Flags: review?(borja.bugzilla)
When I try to download the file described in the bug, the API is saying to us what totalBytes is "-1519423257". I don't know if the bug is in the download manager API or the server is sending a wrong info. 

Aus, could you check it? Thanks a lot
Assignee: crdlc → nobody
Status: ASSIGNED → NEW
Component: Gaia::Settings → General
Flags: needinfo?(aus)
Attachment #8373396 - Flags: review?(kaze)
That would be a bug somewhere in the gecko side of things. Looks like we're converting from a 64 bit int somewhere into a 32 bit value or something like that. Which is lame. Should be easy to fix though. This isn't your bug though. :)
Flags: needinfo?(aus)
Whiteboard: [systemsfe] → [systemsfe][p=1]
Assignee: nobody → aus
Summary: [Download Manager]A file with a size >1GB is not displayed successfully → [Downloads API] A file with a size >1GB is not displayed successfully
ok, thanks Ghislain, glad to hear "easy fix" ;)
Comment on attachment 8373396 [details]
Patch v1

Great to see more tests coming!!! R+ for sure!
Attachment #8373396 - Flags: review?(borja.bugzilla) → review+
blocking-b2g: 1.4? → 1.4+
Comment on attachment 8373396 [details]
Patch v1

I agree with Borja. Moar tests.
Attachment #8373396 - Flags: review?(kaze) → review+
Ted, could you have a look at this? I'll be able to give you some more information once I'm online and in MV. This is most likely a bug on the Gecko side of things.
Assignee: aus → tclancy
Sure, I'll have a look.
Attached patch bug-370340.patchSplinter Review
Attachment #8381774 - Flags: review?(khuey)
Keywords: checkin-needed
Keywords: verifyme
https://hg.mozilla.org/mozilla-central/rev/be2df65a1347
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.4 S2 (28feb)
Verified in master branch(1.4)
Status: RESOLVED → VERIFIED
Keywords: verifyme
You need to log in before you can comment on or make changes to this bug.