Summary: Unable to download multiple files simultaneously
Creator:rayven Date:2002-11-12 20:00:38
Project:K-Meleon Owner:jeff
Status:Closed Severity:Critical
Version:Unknow Target Version:Unknow

1. begin downloading file01.

2. while first download is still in progress, begin downloading file02.

3. look at the download dialog for file01. The progress bar has stopped, and no further progress will be shown.

4. look at the download dialog for file02. The download appears to be proceeding, however it is reporting the file size of file01!

5. after the "file02" download completes, check your download directory. Only file01 has been downloaded.

Comments
jeff  2002-12-08 13:53:38
[Changed Owner from "Brian" to "jeff"]
amutch  2003-01-29 23:19:40
Upping priority due to data loss.
[Changed Severity from "Normal" to "Very Important"]
[Changed Status from "Unconfirmed" to "Open"]
amutch  2003-02-03 16:34:40
[Changed Summary from "Download Problem" to "Unable to download multiple files"]
amutch  2003-02-03 16:35:12
[Changed Summary from "Unable to download multiple files" to "Unable to download multiple files simultaneously"]
asmpgmr  2003-03-01 19:40:59
Using K-Meleon 0.7.1 and Mozilla 1.2 final I'm now getting a hang when downloading multiple files simultaneously as opposed to the data loss.
Additionally it seems if multiple files are simultaneously downloaded from different browser windows then everything works ok and all downloads completely successfully with no data loss. If multiple files are simultaneously downloaded from the same browser window then the problem occurs with the previous download(s) hanging and only the last download proceeding to completion. Any preceeding concurrent downloads have to be cancelled.
asmpgmr  2003-03-03 08:48:26
The problem seems to stem from the InitPersist function using the same nsIWebBrowserPersist value on its call from URISaveAs in BrowserViewUtils.cpp when it's called from the same browser window. There needs to be a way to make an instance of this value and use the instance in the InitPersist function in UnknownContentTypeHandler.cpp and destroy the instance when the download is completed or canceled.
MonkeeSage  2003-03-03 16:03:06
In BrowserViewUtils.cpp, in the function ::URISaveAs, if these lines...
nsCOMPtr<nsIWebBrowserPersist> persist(do_QueryInterface(mWebBrowser));
if(!persist)
return NS_ERROR_FAILURE;
Are changed to...
nsresult rv;
nsCOMPtr<nsIWebBrowserPersist> persist(do_CreateInstance(NS_WEBBROWSERPERSIST_CONTRACTID, &rv));
if(!persist)
return NS_ERROR_FAILURE;
And NS_WEBBROWSERPERSIST_CONTRACTID is defined above as follows:
#define NS_WEBBROWSERPERSIST_CONTRACTID \
"@mozilla.org/embedding/browser/nsWebBrowserPersist;1"
The bug is fixed. The problem is that for some unknown reason, if the persist variable is not attached to mWebBrowser then for some reason the ::URISaveAs fuction will not set bSaveAll, no matter what I try, so you always hit the condition of bDocument && !bSaveAll, which goes to the persist->SaveURI with a nsnull being passed as its first param., and the result is that you can only save links or images by right clicking and calling SaveLinkAs (BrowserView.cpp), but File SaveAs and FrameSaveAs (since they pass bDocument), never save anything.
[This information is assuming asmpgmr's updated URISaveAs function; though the exact same behaviour is encountered with the default FileSaveAs function, when do_CreateInstance is used instead of do_QueryInterface.]
Shelumi`El
Jordan
S.D.G
Ulf  2003-07-23 15:05:03
Thanks. Patch submitted to CVS.
[Changed Status from "Open" to "Fixed"]
Ulf  2003-12-16 02:35:00

[Changed Status from "Fixed" to "Closed"]

SourceForge Logo