Not logged in. · Lost password · Register
Forum: MatriX and XmppDotNet RSS
Avatar
vishwa #1
Member since May 2013 · 22 posts
Group memberships: Members
Show profile · Link to this post
Subject: File is getting locked during transfer
Hi Alex,

I am doing file transfer, File is getting locked at receiver end.

1. Sender A : Send a file to Receiver B
2. Receiver B : Accept the file
3. Receiver B : Abort the file transfer in mid
4. Sender A: As soon as sender A got the Abort event, Again Re-send the same file.
Now At Receiver B end, It error exception fires. and transfer fails.

We have checked in folder, file was locked at receiver end, May be after abort, file is not releasing.

Is Matrix is locking the file during the transfer ?

Thanks
Vishwa
Avatar
vishwa #2
Member since May 2013 · 22 posts
Group memberships: Members
Show profile · Link to this post
This case is not producing first time, I have repeated the steps 10 times, on 11th go, file has been locked at receiver end.

Please help me to resolve this. If require I can share my Abort event code.


Thanks
Vishwa
Avatar
Alex #3
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
In reply to post #1
Quote by vishwa:
Is Matrix is locking the file during the transfer ?

yes, MatriX keeps a filestream object for writing data to the stream as it comes in. This is faster then open, append and close to the file for every chunk which gets received.

Are you re-sending the file automatically in your code? If yes I think you hit a race condition here. When the OnAbort fires on the sender, the receiver is still waiting for the reply packet until is closes the filestream.

I have attached a new build which closes the stream earlier now. Can you please test it and let me know if this solves your problem?
This post was edited on 2013-08-02, 08:40 by Alex.
Avatar
vishwa #4
Member since May 2013 · 22 posts
Group memberships: Members
Show profile · Link to this post
Hi Alex,

Thanks for updated .dll. We are facing the locking issue with  .rar file. which contains the exes and .dll. This file only get locked. We have tested on other extension files its working fine. I want to send the my sample .rar file for testing, but I am not finding any link to upload.
Please provide the link to upload the file.

One more issue, If at receiver end if any error generated then at sender end no events are raised.


Thanks
Viswa
Avatar
Alex #5
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
MatriX does not care about the file extension at all. It handles all file types exactly the same.
If only some file extensions get locked then this must be your virus scanner or similar other software on your machine.
Avatar
vishwa #6
Member since May 2013 · 22 posts
Group memberships: Members
Show profile · Link to this post
Thanks Alex, We have migrated our entire application to Matrix dll version 1.5.3.6. We are having the license for this version.
Can you provide the change log for new version 1.5.3.8.

Thanks
Vishwa
Avatar
Alex #7
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
changelog is always here:
http://www.ag-software.net/matrix-xmpp-sdk/changelog/
Avatar
vishwa #8
Member since May 2013 · 22 posts
Group memberships: Members
Show profile · Link to this post
In reply to post #6
Hi Alex,
We are facing new issues with new Matrix .dll
Case 1:
1.  User A send the file to User B
2.  User B accept the file, If User B call the Abort()  immediately after the accept(OnProgess event is not yet called), then no abort event generated at sender end. Problem is that at sender unable to trace the status of transfer.

Case 2:
1. User A send the file to User B
2. User B accept the file
3. During the transfer, If User A again transfer same file  to User B
4. And User B "Save as" this file to different location, in this case, this file transfer is not initiated.

Thanks
Vishwa
Avatar
Alex #9
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by vishwa:
Case 1:
1.  User A send the file to User B
2.  User B accept the file, If User B call the Abort()  immediately after the accept(OnProgess event is not yet called), then no abort event generated at sender end. Problem is that at sender unable to trace the status of transfer.

disable your Abort button until the file tranfer is initiated and you got the first OnProgress event. The FileTransferManager is currently not designed to abort earlier.

Quote by vishwa:
Case 2:
1. User A send the file to User B
2. User B accept the file
3. During the transfer, If User A again transfer same file  to User B
4. And User B "Save as" this file to different location, in this case, this file transfer is not initiated.

Can you please attach complete Xml logs of client A and B, then I can check whats wrong there.
Avatar
vishwa #10
Member since May 2013 · 22 posts
Group memberships: Members
Show profile · Link to this post
Hi Alex,

first case is resolved by disabling the abort button as you suggested.

But some other cases the file transfer is failing, at that time the file is still locked, is it possible to release that file when OnError event invoked or file transfer failed.

Thanks
Avatar
Alex #11
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by vishwa:
But some other cases the file transfer is failing, at that time the file is still locked, is it possible to release that file when OnError event invoked or file transfer failed.

Attached is a new build. Please let me know if this solves your problem. If not then please describe exactly how to cause the problems and attach logs of both clients.
The author has attached one file to this post:
MatriX.zip 447.4 kBytes
You have no permission to open this file.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters: