Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Assert: Group::updateUsername called for unknown peer #5838

Closed
anthonybilinski opened this issue Sep 16, 2019 · 2 comments · Fixed by #5919
Closed

Assert: Group::updateUsername called for unknown peer #5838

anthonybilinski opened this issue Sep 16, 2019 · 2 comments · Fixed by #5919
Labels
C-crash The issue contains a crash report D-easy We estimate that the issue is easy to fix P-medium U-high User Impact: High
Milestone

Comments

@anthonybilinski
Copy link
Member

anthonybilinski commented Sep 16, 2019

Brief Description

OS: Ubuntu 18.04
qTox version: v1.16.3+
Commit hash: bd034e1
toxcore: v0.2.10
Qt: 5.9.5
Hardware: Desktop

Reproducible: Often

Steps to reproduce
  1. Accept invitation to a group.
Observed Behavior
[21:46:59.694 UTC] core/core.cpp:1569 : Debug: "Trying to join AV groupchat invite sent by friend 5"                                                                                   
[21:46:59.694 UTC] persistence/profile.cpp:358 : Debug: Saving tox save to  "/home/abilinski/.config/tox/qTest2.tox"
[21:46:59.954 UTC] core/core.cpp:922 : Debug: "Group 3 peerlist changed"
[21:46:59.954 UTC] core/core.cpp:931 : Debug: "Group 3, Peer 0, name changed to Alice"
[21:46:59.954 UTC] core/core.cpp:922 : Debug: "Group 3 peerlist changed"
[21:46:59.954 UTC] core/core.cpp:931 : Debug: "Group 3, Peer 1, name changed to Bob"
[21:46:59.954 UTC] core/core.cpp:922 : Debug: "Group 3 peerlist changed"
[21:46:59.954 UTC] core/core.cpp:143 : Critical: Peer not found
[21:46:59.959 UTC] persistence/profile.cpp:358 : Debug: Saving tox save to  "/home/abilinski/.config/tox/qTest2.tox"
[21:47:00.147 UTC] core/core.cpp:931 : Debug: "Group 3, Peer 2, name changed to qTest2"
qtox: /home/abilinski/builds/qTox/src/model/group.cpp:129: void Group::updateUsername(ToxPk, QString): Assertion `peerDisplayNames.contains(pk)' failed.
Expected Behavior

We don't assert.

Additional Info

Since we don't usually hit this and I was using gdb at the time, we possibly have a race condition between different signals coming from Core working their ways up to Gorup.

@anthonybilinski anthonybilinski added U-low User Impact: Low D-easy We estimate that the issue is easy to fix C-crash The issue contains a crash report labels Sep 16, 2019
@Pigpog
Copy link

Pigpog commented Oct 29, 2019

I'm observing this issue on the latest commit (f7d82a4).

Brief Description
OS: Manjaro Linux
qTox version: v1.16.3-723-gf7d82a42
Commit hash: f7d82a4
toxcore: v0.2.10
Qt: 5.13.1
Hardware: Desktop

[03:47:12.743 UTC] core/core.cpp:923 : Debug: "Group 1 peerlist changed"
[03:47:13.993 UTC] core/core.cpp:932 : Debug: "Group 1, peer 13, name changed to SampleText"
qtox: /media/magic/qTox/qtox/src/model/group.cpp:129: void Group::updateUsername(ToxPk, QString): Assertion `peerDisplayNames.contains(pk)' failed.
Aborted (core dumped)

Additional Info
This has occurred twice today for me. I'm in three group chats.

@anthonybilinski
Copy link
Member Author

anthonybilinski commented Nov 8, 2019

I also hit this a lot more often than before - it seems much more common with a 4 person group compared to a 3 person group. I'm going to bump priority and bring it into the release milestone, since it made group calls almost unusable for me, especially when combined with TokTok/c-toxcore#961 (comment), which makes you mute in the group if you crash during a call. My friends and I were in a loop of creating new groups, crashing because of this, becoming mute, then having to repeat 😡

@anthonybilinski anthonybilinski added P-medium U-high User Impact: High and removed U-low User Impact: Low labels Nov 8, 2019
@anthonybilinski anthonybilinski added this to the v1.17.0 milestone Nov 8, 2019
sphaerophoria added a commit to sphaerophoria/qTox that referenced this issue Nov 9, 2019
The call to Core::getGroupPeerNames is expected to return a list where
the index in the list is the group member id. In any error case we were
previously breaking this constraint. It turns out that every time
someone joins a group we call this function before they have a valid
name resulting in their id not being added to the list.

This fix ensures that the list coming out of Core::getGroupPeerNames
always has a full list.

Fixes qTox#5838
anthonybilinski pushed a commit to anthonybilinski/qTox that referenced this issue Nov 12, 2019
The call to Core::getGroupPeerNames is expected to return a list where
the index in the list is the group member id. In any error case we were
previously breaking this constraint. It turns out that every time
someone joins a group we call this function before they have a valid
name resulting in their id not being added to the list.

This fix ensures that the list coming out of Core::getGroupPeerNames
always has a full list.

Fixes qTox#5838
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C-crash The issue contains a crash report D-easy We estimate that the issue is easy to fix P-medium U-high User Impact: High
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants