Discussion:
Bug#983365: linphone-desktop: chat messages
Add Reply
David Pirotte
2021-02-23 01:40:02 UTC
Reply
Permalink
Package: linphone-desktop
Version: 4.2.5-3
Severity: grave
Justification: causes non-serious data loss

Dear Maintainer,

1- chat messages (history) are not displayed when I launch the app,
although I can see they are in the .local/share/linphone/linphone.db
file (using sqliteb or sqlitebrowser);

2- when someone sends me a message, it 'pops' a notification with the
message text (even if I am in front of the app) but the message is not
displayed by the application itself, nor the little numbered circle that
appears (on the appimage 4.2.5 version, to compare) i the left panel,
in(on top of) the user 'entry', nor in the user chat 'room'.

I also verified that the message isn't added in the chat_message_content
of the linphone.db table, and i can see the following 'trace' in the
terminal i used to launchh the app:

[22:11:12:653][0x1ff9eb0][Info]components/sip-addresses/SipAddressesModel.cpp:485: "Update (`sip:***@sip.linphone.org`, `sip:***@sip.linphone.org`) from chat message."

Thanks,
David


-- System Information:
Debian Release: bullseye/sid
APT prefers testing
APT policy: (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-3-amd64 (SMP w/8 CPU threads)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages linphone-desktop depends on:
ii libbctoolbox1 4.4.13-2
ii libbelcard1 4.4.13-2
ii libc6 2.31-9
ii libgcc-s1 10.2.1-6
ii liblinphone++10 4.4.21-1
ii liblinphone10 4.4.21-1
ii libmediastreamer11 1:4.4.21-3
ii libqt5core5a 5.15.2+dfsg-4
ii libqt5dbus5 5.15.2+dfsg-4
ii libqt5gui5 5.15.2+dfsg-4
ii libqt5network5 5.15.2+dfsg-4
ii libqt5qml5 [qtdeclarative-abi-5-15-2] 5.15.2+dfsg-4
ii libqt5quick5 5.15.2+dfsg-4
ii libqt5quickcontrols2-5 5.15.2+dfsg-2
ii libqt5svg5 5.15.2-2
ii libqt5widgets5 5.15.2+dfsg-4
ii libstdc++6 10.2.1-6
ii linphone-common 4.4.21-1
ii qml-module-qt-labs-platform 5.15.2+dfsg-2
ii qml-module-qtgraphicaleffects 5.15.2-2
ii qml-module-qtquick-controls 5.15.2-2
ii qml-module-qtquick-controls2 5.15.2+dfsg-2
ii qml-module-qtquick-dialogs 5.15.2-2
ii qml-module-qtquick-layouts 5.15.2+dfsg-4
ii qml-module-qtquick-window2 5.15.2+dfsg-4
ii qml-module-qtquick2 5.15.2+dfsg-4

linphone-desktop recommends no packages.

linphone-desktop suggests no packages.

-- no debconf information
Debian Bug Tracking System
2021-02-23 20:00:01 UTC
Reply
Permalink
tags -1 help
Bug #983365 [linphone-desktop] linphone-desktop: chat messages
Added tag(s) help.
--
983365: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983365
Debian Bug Tracking System
Contact ***@bugs.debian.org with problems
Debian Bug Tracking System
2021-02-25 18:10:01 UTC
Reply
Permalink
tag -1 + confirmed sid bullseye
Bug #983365 [linphone-desktop] linphone-desktop: chat messages
Added tag(s) sid, bullseye, and confirmed.
--
983365: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983365
Debian Bug Tracking System
Contact ***@bugs.debian.org with problems
Bernhard Schmidt
2021-02-26 16:00:02 UTC
Reply
Permalink
Am 26.02.21 um 15:19 schrieb Bill Blough:

Hi Bill,
Hi,
Have you reached out to the SOCI maintainer in private already? I don't
see a bug report on this. If we can get a targeted fix uploaded for this
within the next days (next step of the freeze is on March 10th, with a
migration time of 10 days right now) I will attempt to push through a
new src:linphone upload. Do you know whether we need a new
src:linphone-desktop upload as well?
I'm the SOCI maintainer. Dennis did email me and explain the
situation, and I don't see an issue making the change.
I'll prepare the upload today. If someone would please file a bug
against SOCI regarding this, I would appreciate it.
Thanks, I've opened Bug#983572 for this.

Bernhard
Bernhard Schmidt
2021-02-28 22:10:02 UTC
Reply
Permalink
Hi,

an updated liblinphone has been uploaded to sid yesterday. Could you
please try liblinphone10 and liblinphone++10 from sid (4.4.21-2) and
report back? If it does not work you might need libsoci-core4.0 and
libsoci-sqlite3-4.0 from unstable as well (4.0.1-4).

Thanks,
Bernhard
Dennis Filder
2021-03-01 22:10:03 UTC
Reply
Permalink
I haven't found the bug yet, but at least somewhat cornered in
linphone-desktop/linphone-app/src/components/chat/ChatModel.cpp in
ChatModel::setSipAddress():

...
for (auto &message : mChatRoom->getHistory(0))
mEntries << qMakePair(
QVariantMap{
{ "type", EntryType::MessageEntry },
{ "timestamp", QDateTime::fromMSecsSinceEpoch(message->getTime() * 1000) }
},
static_pointer_cast<void>(message)
);
...

The call to mChatRoom->getHistory(0) should return a list of pointers
to all messages in that chatroom (peerAddress, localAddress) to
iterate over, but it returns nothing, even though it should.

Finding that out is going to be difficult because linphone-desktop
invokes the DB code through C++ wrappers around C bindings which are
written against the C++ code in
liblinphone/-/blob/master/src/db/main-db.cpp. I'll try next to get
the liblinphone test suite to run, and hopefully it will produce a
failure that is easier to debug.

Regards,
Dennis.
Bernhard Schmidt
2021-03-02 08:10:02 UTC
Reply
Permalink
Hi David,
Thanks all for having worked on this. Sorry for the little delay in
answering, I actually thought the packages would 'find their way' to
bullseye, so I was (and still am) updating daily, a few times per day
actually, but now I see you said sid, not bullseye ...
Post by Bernhard Schmidt
an updated liblinphone has been uploaded to sid yesterday. Could you
please try liblinphone10 and liblinphone++10 from sid (4.4.21-2) and
report back? If it does not work you might need libsoci-core4.0 and
libsoci-sqlite3-4.0 from unstable as well (4.0.1-4).
I am using bullseye (n idea why reportbug says bullseye/sid), so I
don't have the right config to pick those 2 from sid, and so many years
I haven't done this that I forgot my 'apt/preferencesfu' to do that -
but by all means, the bug is in bullseye, won't you make these packages
available in bullseye?
There is a ten day migration period from sid to bullseye. If no
regression shows up th new linphone version should migrate to bullseye
about March 9th. I hope it doesn't get delayed, because on 10th the
freeze starts for real.

The easiest way to just install one or two packages from sid would
probably be

- duplicate bullseye line in /etc/apt/sources.list and replace bullseye
with sid
- apt update
- apt install liblinphone10 liblinphone++10
- disable new line from /etc/apt/sources.list
- apt update

Bernhard
David Pirotte
2021-03-03 01:40:02 UTC
Reply
Permalink
Hi Bernhard,
Post by Bernhard Schmidt
The easiest way to just install one or two packages from sid would
probably be ...
Done [1] (i updated linphone-common as well. I was surprise though to
not see a new linphone and linphone-desktop, saying this because I did
see someone fixed the 'wrong version number in the prefs dialog' but
not only the version numbers are still wrong, but despite the updates
to core 4.4.21-2, the app still displays 4.4.21-1 in the 'about' dialog ..

Now, unfortunately these updates didn't solve the problem:

a- no history is uploaded from linphone,db when opening the app,
for none of my contacts;

b- when I write a chat msg to someone:

it displays the message in the right middle (biggest)
panel), after I hit enter;

but if i click on another contact then 'click back' to
the contact I sent a chat msg to test, the msg is not
displayed [as if it 'disappeared', which make sense,
given a- here above - i don't think 'the fix' updates
the chat msgs db;

[ unfortunately, I can see the msg was also not delivered,
[ which could well be due to a push notification problem
[ on their (my contact) 'side' ...

It would really be 'nice', not to say essential, that you and Dennis
(for example) could test those fixes 'between you' ...

Thanks,
David

[1]

;; here is what I have on my laptop after the suggested updates:

ii liblinphone++10:amd64 4.4.21-2 amd64 Linphone's shared library part (supporting the SIP protocol)
ii liblinphone10:amd64 4.4.21-2 amd64 Linphone's shared library part (supporting the SIP protocol)
ii linphone 4.2.5-3 all SIP softphone - graphical client (transitional package)
ii linphone-common 4.4.21-2 all Shared components of the linphone SIP softphone
ii linphone-desktop 4.2.5-3 amd64 SIP softphone - graphical client
Debian Bug Tracking System
2021-03-03 18:00:02 UTC
Reply
Permalink
tag -1 + patch upstream - help
Bug #983365 [linphone-desktop] linphone-desktop: chat messages
Added tag(s) upstream and patch.
Bug #983365 [linphone-desktop] linphone-desktop: chat messages
Removed tag(s) help.
reassign -1 linphone
Bug #983365 [linphone-desktop] linphone-desktop: chat messages
Bug reassigned from package 'linphone-desktop' to 'linphone'.
No longer marked as found in versions linphone-desktop/4.2.5-3.
Ignoring request to alter fixed versions of bug #983365 to the same values previously set
--
983365: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983365
Debian Bug Tracking System
Contact ***@bugs.debian.org with problems
Bernhard Schmidt
2021-03-03 23:40:02 UTC
Reply
Permalink
Am 03.03.21 um 18:55 schrieb Dennis Filder:

Hi Dennis,
Post by Bernhard Schmidt
an updated liblinphone has been uploaded to sid yesterday. Could you
please try liblinphone10 and liblinphone++10 from sid (4.4.21-2) and
report back? If it does not work you might need libsoci-core4.0 and
libsoci-sqlite3-4.0 from unstable as well (4.0.1-4).
I finally found the bug: libsoci_sqlite3 sometimes returns string
where liblinphone unconditionally expects int, long, double etc. which
led to silent std::bad_cast exceptions. I can't say who is actually
to blame (I feel soci should do that conversion already as it knows
what type the user requested, or at least not throw silently), but the
attached patches remedy the issue through some conditional string
conversion and make chat history actually work again in the GUI. They
should really have separated the sqlite3 database code better from the
MySQL code.
I put this in two separate patches to make it easier to remove the
changes to the code for the legacy DB migration in case it causes
problems.
Cool, thanks. Would you mind discussing your findings with upstream at
https://gitlab.linphone.org/BC/public/liblinphone ? We will need a
freeze exception for this, having this bug confirmed by upstream would
help a lot, cherry-picking a commit from upstream would be even better.

Right now I don't plan to upload src:linphone before 4.4.21-2 has
migrated to testing, in order to have a minimum amount of changes to be
discussed for the freeze exception.

Bernhard
David Pirotte
2021-03-04 17:10:02 UTC
Reply
Permalink
Hi Bernhard,
DEnnis,
I finally found the bug: ...
Excellent!

Please make sure you also test a file transfer, which is part of the
chat message interface [I couldn't try since the chat msgs itself
didn't work ...], The file transfer functionality is absolutely
essential as well, afaic at least ....

Thanks,
David
Dennis Filder
2021-03-04 19:30:01 UTC
Reply
Permalink
Post by Bernhard Schmidt
Cool, thanks. Would you mind discussing your findings with upstream at
https://gitlab.linphone.org/BC/public/liblinphone ? We will need a
freeze exception for this, having this bug confirmed by upstream would
help a lot, cherry-picking a commit from upstream would be even better.
Right now I don't plan to upload src:linphone before 4.4.21-2 has
migrated to testing, in order to have a minimum amount of changes to be
discussed for the freeze exception.
I'll talk to BC once my account is activated. Also I just filed
#984534 against soci with a two-line patch that would fix the issue,
too. The only change needed here then would be updated dependency
info.

Regards,
Dennis

Loading...