Closed Bug 282119 Opened 20 years ago Closed 20 years ago

Download manager shows negtive file size and download speed for very large files.

Categories

(Toolkit :: Downloads API, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 228968

People

(Reporter: jdstrickler, Assigned: bugs)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

While downloading a very large file (>2.3 GB), noticed that download manager
showed negtive (and decrementing) file size and download speed.  

Reproducible: Didn't try

Steps to Reproduce:
1.  Go to the URL noted above.
2.  Download FC3-i386-DVD.iso
3.  Observe DL manager window when filesize gets to about 2.1 GB

Actual Results:  
Filesize displayed as a negative number, download speed also negative.

Expected Results:  
Should have displayed positive numbers.

It looks like the DL manager is using a 32-bit integer to record the size of the
file being downloaded.  A 32-bit int becomes a negative number when you exceed a
value of 2,147,483,647 (2^31 - 1).  You could double it by going to an unsigned
integer for a short term fix, but I think you really should use 64-bit
arithmetic when performing these calculations.
Duplicate of bug 228968.

*** This bug has been marked as a duplicate of 228968 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Status: RESOLVED → VERIFIED
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.