Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 807586 - media-libs/tg_owt: segmentation fault when start screen sharing due USE="-X"
Summary: media-libs/tg_owt: segmentation fault when start screen sharing due USE="-X"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Esteve Varela Colominas
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2021-08-10 15:41 UTC by Dmitriy Baranov
Modified: 2021-09-17 09:43 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitriy Baranov 2021-08-10 15:41:35 UTC
This flag violates the logic of the application.
1. tg_owt is not able to find picture sources when the TG_OWT_USE_X11=OFF (tested on Gnome/wayland)
2. tg_owt is not able to handle it properly (cause to segfault error).
More info: https://github.com/telegramdesktop/tdesktop/issues/16781
Comment 1 Esteve Varela Colominas 2021-08-11 15:16:02 UTC
As discussed in the github issue, please test USE="screencast -X" and rebuild telegram-desktop afterwards. This should be a valid configuration.
Comment 2 Dmitriy Baranov 2021-08-11 19:04:56 UTC
(In reply to Esteve Varela Colominas from comment #1)
> As discussed in the github issue, please test USE="screencast -X" and
> rebuild telegram-desktop afterwards. This should be a valid configuration.

Rechecked twice:
USE="-screencast -X" emerge tg_owt telegram-desktop ### segfault
USE="screencast -X" emerge tg_owt telegram-desktop ### valid configuration
Comment 3 Esteve Varela Colominas 2021-08-12 13:46:50 UTC
Bug status: mostly fixed. Any change to the tg_owt USE flags now requires a telegram-desktop rebuild, resulting in fixing the ABI compatibility issue, and the crash resulting from having no available screen capture backends (or having one that doesn't work on the current display server) has been fixed in net-im/telegram-desktop-2.9.3.
Since USE="-X -screencast" is valid and doesn't cause a crash in 2.9.3, this configuration is still allowed. A postinst message has been added to warn users about this, since it's more likely that someone running wayland-only forgot to enable USE=screencast rather than it being an intentional configuration.

This bug will remain open for the time being, since having no screen sharing backends (or one that doesn't work on the current display server) will still crash net-im/telegram-desktop-2.8.11. I'm too tired and have too little time to backport the fix and test it, as I'm unclear on the scope of the change, so it's likely to remain unfixed on that version for the time being, or until a newer version is stabilized. I hope that the ABI compatibility fix and postinst message will go a long way in preventing others from hitting the issue.

A PR for the above has been submitted. Please allow proxy-maint some time to review and merge it. Thanks for bringing the issue to light.
Comment 4 Larry the Git Cow gentoo-dev 2021-08-12 17:56:07 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d925ddf1a2ce41caa3aca9344e9561419f71d598

commit d925ddf1a2ce41caa3aca9344e9561419f71d598
Author:     Esteve Varela Colominas <esteve.varela@gmail.com>
AuthorDate: 2021-08-12 09:15:58 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2021-08-12 17:39:12 +0000

    net-im/telegram-desktop: Add screen sharing message
    
    Just in case someone's running wayland-only without the screencast flag.
    
    Bug: https://bugs.gentoo.org/807586
    Signed-off-by: Esteve Varela Colominas <esteve.varela@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/21961
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 net-im/telegram-desktop/telegram-desktop-2.8.11-r2.ebuild | 3 +++
 net-im/telegram-desktop/telegram-desktop-2.9.3.ebuild     | 3 +++
 2 files changed, 6 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f02a6813a0fce67287cc49bf1ddcd2712da2389

commit 5f02a6813a0fce67287cc49bf1ddcd2712da2389
Author:     Esteve Varela Colominas <esteve.varela@gmail.com>
AuthorDate: 2021-08-12 09:03:28 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2021-08-12 17:39:12 +0000

    net-im/telegram-desktop: Rebuild whenever tg_owt flags change
    
    The different USE flags of tg_owt affect the ABI compatibility of the
    library. Additionally, tdesktop itself uses some of the variables
    controlled by USE flags of the tg_owt package during compilation.
    
    As such, telegram-desktop should be rebuilt when *anything* about tg_owt
    changes...
    
    Bug: https://bugs.gentoo.org/807586
    See-also: https://github.com/telegramdesktop/tdesktop/issues/16781
    Thanks-to: Dmitry Baranov <reagentoo@gmail.com>
    Signed-off-by: Esteve Varela Colominas <esteve.varela@gmail.com>
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 net-im/telegram-desktop/metadata.xml                                  | 1 +
 ...ram-desktop-2.8.11-r1.ebuild => telegram-desktop-2.8.11-r2.ebuild} | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
Comment 5 Esteve Varela Colominas 2021-09-17 09:43:19 UTC
Affected packages left the tree. Closing.