Closed Bug 172778 Opened 22 years ago Closed 21 years ago

progress percentage in download sidebar differs from the real one

Categories

(Toolkit :: Downloads API, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: Vincent.Grigorieff, Assigned: noririty)

References

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2b) Gecko/20021004 Phoenix/0.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2b) Gecko/20021004 Phoenix/0.3

The progress percentage displayed in the download sidebar is very different from
the one in the download's window. Right now I'm at 88% of a download and in the
sidebar a -9 is displayed.

Reproducible: Couldn't Reproduce

Steps to Reproduce:
1.
2.
3.
I just had the same bug. Everything was fine till the progressbar reached ~80%
in the downloads sidebar. Then it suddenly became -92% (with progressbar
becoming gray, like it is when less than 1% of the download is done). The
download finished when it reached -50%.

I'm using the latest build (20021007) on w2k.
Confirming as per the two reports and others in the forum.
Status: UNCONFIRMED → NEW
Ever confirmed: true
*** Bug 176557 has been marked as a duplicate of this bug. ***
I just got this downloading the full Netscape 7 Win32 executable. Could it be
something wrapping around?
0.5 releases notes say "a bug that caused -1 to be displayed as the progress"
was fixed. This bug mentions negative progress as well. Is it still happening?
Yeah, the problem still occurs... Right now, I'm downloading Eclipse, and a -11
appeared.

Steps to reproduce (I guess) :
- In preferences, check only "Downloads | Open Downloads Sidebar";
- Download Eclipse (http://www.eclipse.org);
- Navigate (tried http://www.w3c.org);
- Incorrect percentage appears;
I can still confirm this bug.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3a) Gecko/20030130 Phoenix/0.5

The bug seems file-size driven.
It happened when downloading file, point of 20MB are loaded.
e.g.
http://ftp.mozilla.org/pub/mozilla/releases/mozilla1.0/src/mozilla-source-1.0.tar.bz2
I also found that this never outbreak with smaller files.

Divided after overflowed?  May be caused by this file:
http://lxr.mozilla.org/mozilla/source/browser/components/downloads/content/downloadPanel.js
*** Bug 200631 has been marked as a duplicate of this bug. ***
*** Bug 208185 has been marked as a duplicate of this bug. ***
*** Bug 208837 has been marked as a duplicate of this bug. ***
I am still seeing this, but I have only been able to get it to occur when both
the progress dialog and the sidebar are open. I've reproduced twice on two
different downloads. In both cases I opened the sidebar started the long
download (1.0 tarball and 0.6.1 fb tarball) and went about surfing. Both wrapped
right around 70%. Further investigation with the download statusbar (insert plug
for the extension here) didn't duplicate the bug. I tried on the tarballs and a
video file with both the dialog and the statusbar displayed. 
Seems to be nsDownloadManager.cpp, line 939:
overflow in a PRInt32 when it gets multiplied by 100 before dividing.  Patch
attached follows the form used 4 lines down, converting it to a PRFloat64
before multiplying / dividing, and converting back.

First attachment on bugzilla, so please tell me if I should do this some other
way; diff -u attached.
I am using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5a)
Gecko/20030728 Mozilla Firebird/0.6.1

Definitely seems to be filesize related. I get the same thing consistently with
large files. Here are files that cause a negative value to occur; also, these
files caused it to wrap around several time during the download:

http://www.linuxiso.org/download.php/524/i686-1.4-20030806-cd1.iso      454Meg
http://www.linuxiso.org/download.php/525/i686-1.4-20030803-cd2.iso      490Meg
http://www.linuxiso.org/download.php/521/gentoo-basic-1.4-20030806.iso   79Meg

And here is one that did NOT cause it to happen:

http://www.searchalot.com/netscape.exe   12Meg
With this file:

http://www.netbeans.org/download/release351/night/build200307302351/NetBeansIDE-release351-win32.exe

(29.1 MB)

The progress meter got to 69%, quickly switched over to -70%, and began counting
up. So the files might not need to be quite as large as the files that David
pointed out.
Mook, diff -u7 is better usually.  Going to build from trunk with this patch to
test tonight.
QA Contact: asa → mpconnor
FIXED
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Verified using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b)
Gecko/20030913 Firebird/0.6.1+
Status: RESOLVED → VERIFIED
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: