Closed
Bug 492316
Opened 16 years ago
Closed 16 years ago
Firefox does not release file locks
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: dev, Unassigned)
References
()
Details
Attachments
(1 file)
406 bytes,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10
Firefox locks the file while uploading to remote server and most of the time does not release the lock after upload. As a result, user cannot move/delete the file.
Reproducible: Sometimes
Steps to Reproduce:
1.Select a file from local disk to upload
2.Submit the upload form
3.Wait until to finish upload
Actual Results:
Firefox does not release shared lock after upload.
Expected Results:
Firefox should release all locks.
In Adobe Flash based applications, the problem almost always reproducable; but does not semm to be related to Flash directly.
Comment 1•16 years ago
|
||
Did you search before filing your bug ?
Do you use livehttpheaders or Firebug ?
Comment 2•16 years ago
|
||
This attachment reproduces the bug
1. select a local file
2. Submit the form
3. Try to move/rename/delete the file
After a quick look the bug appears to be in nsHTMLInputElement.cpp
somewhere after line 2466 // Submit file if it's input type=file and this encoding method accepts files
I havent coded in cpp for a couple of years and I dont feel like downloading microsofts SDK since I only have limited mobile broadband downloads.
But my guess is the fileinputstream create on line 2503
nsCOMPtr<nsIInputStream> fileStream;
rv = NS_NewLocalFileInputStream(getter_AddRefs(fileStream),
file, -1, -1,
nsIFileInputStream::CLOSE_ON_EOF |
nsIFileInputStream::REOPEN_ON_REWIND);
or the file create on line 2472
or both need to be destroyed after the file has been sent. line 2522
This should resolve the locking problem.
I hope someone see's this and can use it to quickly resolve this :) If not I may be back to do it myself.
Comment 3•16 years ago
|
||
ok, appears firebug needs to be enabled to feel the affects of this bug.
I don't know how firebug works, but my guess is that firebug may be stopping the trash collector from cleaning up the html layout objects if this is the case destroying the fileinputstream(or maybe file) in the place I indicated in my previous post should still resolve this.
Comment 4•16 years ago
|
||
ok, final comment for the day before posting my second comment I disabled firebug, after reading the comment by Matthias Versen, this stopped the bug and I believed it was due to firebug causing the problem however, now I cant seem to reproduce the bug whatever I do. This unpredictability still leads me to believe its a garbage collection problem.
Good luck to anyone working on this.
Comment 5•16 years ago
|
||
Please disregard my ramblings: This is a fire bug issue that has be resolved.
See: http://code.google.com/p/fbug/source/browse/branches/firebug1.4/docs/ReleaseNotes_1.4.txt
* Issue 1468: File Locking on File upload when firebug is installed
Comment 6•16 years ago
|
||
marking wfm in that case :-)
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•