Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avatar is not being sent when there's an ongoing file transfer to contact #39

Closed
ghost opened this issue Nov 12, 2015 · 9 comments
Closed

Comments

@ghost
Copy link

ghost commented Nov 12, 2015

Fom qTox/qTox#1702:

Description:
In a case where there is an active file transfer between qTox S and qTox R, when qTox S changes its avatar, qTox R doesn't receive it until ongoing file transfer is finished / paused.
Basically an extension of qTox/qTox#1693

Info:
OS: Hardened Gentoo Linux x86_64
qTox version: qTox/qTox@a841224

Reproducible: Always

Steps to reproduce:

  1. Start sending big file from one qTox instance to another
  2. Set / change avatar

What happened:
qTox S doesn't send avatar to qTox R while there is an ongoing file transfer with qTox R.

What should happen:
qTox S should send avatar to qTox R while there is an ongoing file transfer with qTox R.

Tested with the latest uTox binaries against latests qTox binaries and can reproduce.

Could you confirm that this is indeed not a uTox bug?

@LittleVulpix
Copy link
Contributor

@kehugter I believe avatars are just another form of file transfers. Since the previous api break (the new tox api from quite a while ago, not the toxav api that was merged recently), there can only be one filetransfer to one contact in one direction at a time. So that means your avatar will get sent only after the filetransfer is done.

tl;dr - toxcore "works as intended" behavior

@fcore117
Copy link

and there is no rush to get new avatar, when file sending ends then avatar goes.

@GrayHatter
Copy link
Member

@LittleVulpix

there can only be one filetransfer to one contact in one direction at a time.

This is incorrect. uTox will support 64 active file transfers, with 32 in each direction.

@kehugter

I've read your issue a few times and I'm having trouble understanding what the problem with uTox is...

Is uTox not sending the avatar when there's a FT in progress? Or is qTox simply not accepting the FT?

@GrayHatter
Copy link
Member

works as it should in uTox, this is a qTox only issue...

If I'm wrong I need some more information as I couldn't dup this one.

@ghost
Copy link
Author

ghost commented Nov 12, 2015

Ok, tried it from uTox to uTox and could reproduce. Both instances in Linux, the receiver in a VM. So the answer would be that uTox is not sending the avatar when there's a FT in progress.

Steps:
sender had an avatar set, receiver could see it. sender sends a 2GB file, receiver starts the transfer. sender changes the avatar twice, but receiver doesn't get them until the file transfer is paused/cancelled.

uTox will support 64 active file transfers, with 32 in each direction.

I couldn't get more than one active.

@GrayHatter
Copy link
Member

@kehugter I'm going to need the debug output from both...

@GrayHatter GrayHatter reopened this Nov 12, 2015
@ghost
Copy link
Author

ghost commented Nov 12, 2015

Test scenario for the original issue, ie, sending a file and updating the avatar.

sender

$ ./utox
Read 84 bytes (/home/sender/.config/tox/utox_save)
0
have GTK
new tox object ipv6: 1 udp: 1 proxy: 0 0
Meta Data not found (/home/sender/.config/tox/xxx.fmetadata)
File not found (/home/sender/.config/tox/xxx.txt)
File not found (xxx.txt)
Meta Data not found (/home/sender/.config/tox/xxx.fmetadata)
File not found (/home/sender/.config/tox/xxx.txt)
File not found (xxx.txt)
Meta Data not found (/home/sender/.config/tox/xxx.fmetadata)
Meta Data not found (/home/sender/.config/tox/xxx.fmetadata)
Tox ID: xxx
Tox Avatar Hash: xxx
Toxav thread init
Audio Filtering and Echo cancellation enabled in this build
frame size: xxx
desktop: xxx xxx
uTox audio input device list:
xxx
xxx
xxx
uTox audio output device list:
xxx
xxx
filter audio on
Video size: xxx xxx
Writing tox_save to: '/home/sender/.config/tox/tox_save.tox.tmp': Saved data! Trying to chmod: success!
uTox: Connected to DHT!
FileTransfer: Starting avatar to friend 3.
Friend-3: Online (TCP)
FileTransfer: New Avatar from friend (3)
FileTransfer: Avatar Unset from friend(3).
FileTransfer: We just killed file (3 & 65536)
Friend-3 Name: test-pclinuxos-utox
Friend-3 Status Message: Toxing on uTox
Friend-3 State: 0
Friend-3 Typing: 0
FileTransfer: Friend (3) rejected avatar
FileTransfer: Cleaning up file transfers! (3 & 0)
enter
drop
SelectionNotify
Type: STRING
Property: XdndDATA
FileTransfer: Starting outgoing file to friend 3. (filename, Fedora-Live-Workstation-x86_64-22-3.iso)
FileTransfer: .ftinfo for file Fedora-Live-Workstation-x86_64-22-3.iso set; ready to resume!
FileTransfer: Friend (3) has resumed file (0)
FileTransfer: Starting avatar to friend 0.
FileTransfer: Starting avatar to friend 2.
FileTransfer: Starting avatar to friend 3.
FileTransfer: Friend (2) has resumed file (0)
FileTransfer: Outgoing transfer is done (2 & 0)
FileTransfer: Incoming transfer is done (2 & 0)
Removing. /home/sender/.config/tox/xxx.ftoutfo
FileTransfer: Cleaning up file transfers! (2 & 0)
Writing tox_save to: '/home/sender/.config/tox/tox_save.tox.tmp': Saved data! Trying to chmod: success!
FileTransfer: Friend (3) has resumed file (1)
FileTransfer: Starting avatar to friend 0.
FileTransfer: Starting avatar to friend 2.
FileTransfer: Starting avatar to friend 3.
FileTransfer: Friend (2) has resumed file (0)
FileTransfer: Outgoing transfer is done (2 & 0)
FileTransfer: Incoming transfer is done (2 & 0)
Removing. /home/sender/.config/tox/xxx.ftoutfo
FileTransfer: Cleaning up file transfers! (2 & 0)
FileTransfer: Friend (3) has resumed file (2)
Writing tox_save to: '/home/sender/.config/tox/tox_save.tox.tmp': Saved data! Trying to chmod: success!
FileTransfer: Friend (3) has paused file (0)
FileTransfer: File now paused by them.
FileTransfer: Outgoing transfer is done (3 & 1)
FileTransfer: Incoming transfer is done (3 & 1)
Removing. /home/sender/.config/tox/xxx.ftoutfo
FileTransfer: Cleaning up file transfers! (3 & 1)
FileTransfer: Outgoing transfer is done (3 & 2)
FileTransfer: Incoming transfer is done (3 & 2)
Removing. /home/sender/.config/tox/xxx.ftoutfo
FileTransfer: Cleaning up file transfers! (3 & 2)
FileTransfer: Friend (3) has canceled file (0)
Removing. /home/sender/.config/tox/xxx.ftoutfo
FileTransfer: Cleaning up file transfers! (3 & 0)
FileTransfer: Friend 3 has gone offline, breaking transfers
FileTransfer: Cleaning up file transfers! (0 & 0)
Friend-3: Offline
Writing uTox Save ::
UTOX VIDEO: Clean thread exit!
UTOX AUDIO: Clean thread exit!
Writing tox_save to: '/home/sender/.config/tox/tox_save.tox.tmp': Saved data! Trying to chmod: success!
UTOXAV: Clean thread exit!
av_thread exit, tox thread ending
Tox tread: Clean exit!
XLIB main: Clean exit

receiver

$ ./utox
File not found (/home/receiver/.config/tox/utox_save)
File not found (utox_save)
File not found (utox_save)
0
have GTK
new tox object ipv6: 1 udp: 1 proxy: 0 0
Meta Data not found (/home/receiver/.config/tox/xxx.fmetadata)
Tox ID: xxx
Audio Filtering and Echo cancellation enabled in this build
frame size: xxx
desktop: xxx xxx
Toxav thread init
uTox audio input device list:
Built-in Audio Analog Stereo
Monitor of Built-in Audio Analog Stereo
uTox audio output device list:
Built-in Audio Analog Stereo
filter audio on
Writing tox_save to: '/home/receiver/.config/tox/tox_save.tox.tmp': Saved data! Trying to chmod: success!
uTox: Connected to DHT!
FileTransfer: Starting avatar to friend 0.
Friend-0: Online (TCP)
FileTransfer: New Avatar from friend (0)
FileTransfer: Avatar from friend (0) rejected: Same as Current
FileTransfer: We just killed file (0 & 65536)
FileTransfer: Cleaning up file transfers! (0 & 0)
Friend-0 Name: test-utox
Friend-0 Status Message: Toxing on uTox
Friend-0 State: 0
Friend-0 Typing: 0
FileTransfer: Friend (0) has canceled file (0)
FileTransfer: Unable to load saved info... uTox can't resume file
FileTransfer: New incoming file from friend (0) file number (65536)
FileTransfer: filename: Fedora-Live-Workstation-x86_64-22-3.iso
name: /home/receiver/Downloads/Fedora-Live-Workstation-x86_64-22-3.iso
path: /home/receiver/Downloads/Fedora-Live-Workstation-x86_64-22-3.iso
FileTransfer: We just resumed file (0 & 65536)
FileTransfer: .ftinfo for file Fedora-Live-Workstation-x86_64-22-3.iso set; ready to resume!
FileTransfer: New Avatar from friend (0)
FileTransfer: We just resumed file (0 & 131072)
FileTransfer: .ftinfo for file set; ready to resume!
FileTransfer: New Avatar from friend (0)
FileTransfer: We just resumed file (0 & 196608)
FileTransfer: .ftinfo for file set; ready to resume!
FileTransfer: We just paused file (0 & 65536)
FileTransfer: File now paused by us.
FileTransfer: Incoming transfer is done (0 & 131072)
Removing. /home/receiver/.config/tox/xxx.ftinfo
FileTransfer: Incoming transfer is done (0 & 196608)
Removing. /home/receiver/.config/tox/xxx.ftinfo
FileTransfer: We just killed file (0 & 65536)
Removing. /home/receiver/.config/tox/xxx.ftinfo
FileTransfer: Cleaning up file transfers! (0 & 65536)
Writing uTox Save ::
UTOX VIDEO: Clean thread exit!
UTOX AUDIO: Clean thread exit!
Writing tox_save to: '/home/receiver/.config/tox/tox_save.tox.tmp': Saved data! Trying to chmod: success!
UTOXAV: Clean thread exit!
av_thread exit, tox thread ending
Tox tread: Clean exit!
XLIB main: Clean exit

Some unrelated info from other friends in sender stripped.

Perhaps interesting fact: after pausing, all pending avatars are updated, one after the other.

@GrayHatter
Copy link
Member

OH... yeah... I understand what's going on. @LittleVulpix is correct, toxcore tries to finish files in order, and an avatar is just a file as far as toxcore is concerned, so it just waits until it's turn...

Open this issue at https://github.com/irungentoo/toxcore/issues/

@ghost
Copy link
Author

ghost commented Nov 12, 2015

Ok, thanks all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants