hungdluit / flowlib

Automatically exported from code.google.com/p/flowlib
0 stars 0 forks source link

Unable to download big files #21

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
*What steps will reproduce the problem?*
1. Join hub
2. Start downloading big (more 20 Mb) file

*What is the expected output?*
Expecting file download. 
*What do you see instead?*
{"Process unable to access file {file name} because it used by another 
process."}

*What version of the product are you using?*
Flowlib 20090203 SVN + Share file from Issue 19

*On what operating system?*
Windows Vista SP1, UAC active

*Call Stack?*
   в System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   в System.IO.FileStream.Init(String path, FileMode mode, FileAccess 
access, Int32 rights, Boolean useRights, FileShare share, Int32 
bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String 
msgPath, Boolean bFromProxy)
   в System.IO.FileStream..ctor(String path, FileMode mode, FileAccess 
access, FileShare share)
   в System.IO.File.OpenWrite(String path)
   в FlowLib.Protocols.TransferNmdcProtocol.ParseRaw(Byte[] b, Int32 
length) в C:\Users\Erty Hackward\Documents\Visual Studio 2008\Projects
\FlowLib\FlowLib\Protocols\transfernmdcprotocol.cs:line 274
   в FlowLib.Connections.TcpConnection.OnRecievedData(IAsyncResult ar) в C:
\Users\Erty Hackward\Documents\Visual Studio 2008\Projects\FlowLib\FlowLib
\Connections\TcpConnection.cs:line 518
   в System.Net.LazyAsyncResult.Complete(IntPtr userToken)
   в System.Net.ContextAwareResult.CompleteCallback(Object state)
   в System.Threading.ExecutionContext.runTryCode(Object userData)
   в 
System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup
(TryCode code, CleanupCode backoutCode, Object userData)

File transfernmdcprotocol.cs line 274 column 40

*Please provide any additional information below.*
fadil.khodabuccus found this bug too at 2009-02-10 (FAQ section)

Original issue reported on code.google.com by hackw...@gmail.com on 19 Feb 2009 at 9:35

GoogleCodeExporter commented 8 years ago
Im currently missing code to test this on...
I guess i have to implement share and downloading in Xmpl.. but that will take 
some
time.. :(

Original comment by blomman84 on 19 Feb 2009 at 9:05

GoogleCodeExporter commented 8 years ago
svn updated. please test code and come back with feedback :)

Original comment by blomman84 on 20 Feb 2009 at 11:58

GoogleCodeExporter commented 8 years ago
Still throws an exception: The process cannot access the file '{file name}' 
because 
it is being used by another process.

at line
                                `using (System.IO.FileStream fs = new 
System.IO.FileStream(trans.DownloadItem.ContentInfo.Get(ContentInfo.STORAGEPATH)
, 
System.IO.FileMode.OpenOrCreate, System.IO.FileAccess.Write, 
System.IO.FileShare.Write))` line 276 column 1
Tested on windows 7 7022

Original comment by hackw...@gmail.com on 22 Feb 2009 at 5:55

GoogleCodeExporter commented 8 years ago
exception thrown then i'm try to open destination folder. It is possible 
because 
windows open my avi file to make thumbinal

Original comment by hackw...@gmail.com on 22 Feb 2009 at 1:38

GoogleCodeExporter commented 8 years ago
Oooh. That info narrows it down alot :)
What happens if you change FileShare.Write to FileShare.ReadWrite ?

Original comment by blomman84 on 22 Feb 2009 at 2:08

GoogleCodeExporter commented 8 years ago
nothing changes. I solve this broblem using special extension for incomplete 
files.

Original comment by hackw...@gmail.com on 24 Feb 2009 at 4:19

GoogleCodeExporter commented 8 years ago
The DC++ way...
I guess there was a reason DC++ developers did it this way :)

Issue closed.

Original comment by blomman84 on 24 Feb 2009 at 11:26

GoogleCodeExporter commented 8 years ago
Issue 4 has been merged into this issue.

Original comment by blomman84 on 24 Feb 2009 at 11:34