Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1001050: telegram-desktop: Image preview is (again) broken

143 views
Skip to first unread message

Andreas Tille

unread,
Dec 3, 2021, 2:10:03 AM12/3/21
to
Package: telegram-desktop
Version: 3.1.8+ds-1
Severity: normal

Hi,

after upgrading telegram-desktop from the version in testing (I'm using
a testing system) to the version in unstable (due to a warning by
telegram that version 2.6.1 will not be supported any more soon) to the
version in unstable the "old problem" that image preview does not work
any more is back now. I would be really happy if this could be solved
soon and I can happily test anything you want me to test.

Kind regards

Andreas.


-- Package-specific info:

-- System Information:
Debian Release: 11.0
APT prefers testing
APT policy: (501, 'testing'), (50, 'buildd-unstable'), (50, 'unstable'), (5, 'experimental'), (1, 'buildd-experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-8-amd64 (SMP w/4 CPU threads)
Kernel taint flags: TAINT_WARN
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=de_DE:de
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages telegram-desktop depends on:
ii libavcodec-extra58 [libavcodec58] 7:4.4.1-2+b1
ii libavformat58 7:4.4.1-2+b1
ii libavutil56 7:4.4.1-2+b1
ii libc6 2.32-4
ii libdbusmenu-qt5-2 0.9.3+16.04.20160218-2+b1
ii libgcc-s1 10.2.1-6
ii libglib2.0-0 2.68.4-1
ii libglibmm-2.4-1v5 2.66.2-1
ii libhunspell-1.7-0 1.7.0-3
ii libjpeg62-turbo 1:2.0.6-4
ii libkf5waylandclient5 4:5.78.0-2
ii liblz4-1 1.9.3-2
ii libminizip1 1.1-8+b1
ii libopenal1 1:1.19.1-2
ii libopus0 1.3.1-0.1
ii libqrcodegencpp1 1.6.0-1
ii libqt5core5a [qtbase-abi-5-15-2] 5.15.2+dfsg-9
ii libqt5dbus5 5.15.2+dfsg-9
ii libqt5gui5 5.15.2+dfsg-9
ii libqt5network5 5.15.2+dfsg-9
ii libqt5svg5 5.15.2-3
ii libqt5waylandclient5 [qtwayland-client-abi-5-15- 5.15.2-3
ii libqt5widgets5 5.15.2+dfsg-9
ii librlottie0-1 0.1+dfsg-2
ii libsigc++-2.0-0v5 2.10.4-2
ii libssl1.1 1.1.1k-1
ii libstdc++6 11.2.0-12
ii libswresample3 7:4.4.1-2+b1
ii libswscale5 7:4.4.1-2+b1
ii libx11-6 2:1.7.2-1
ii libxcb-keysyms1 0.4.0-1+b2
ii libxcb-record0 1.14-3
ii libxcb-screensaver0 1.14-3
ii libxcb1 1.14-3
ii libxcomposite1 1:0.4.5-1
ii libxdamage1 1:1.1.5-2
ii libxext6 2:1.3.3-1.1
ii libxfixes3 1:5.0.3-2
ii libxrandr2 2:1.5.1-1
ii libxtst6 2:1.2.3-1
ii libxxhash0 0.8.0-2
ii qt5-image-formats-plugins 5.15.2-2
ii zlib1g 1:1.2.11.dfsg-2

Versions of packages telegram-desktop recommends:
ii fonts-open-sans 1.11-1.1

telegram-desktop suggests no packages.

-- debconf-show failed
log.txt

Andreas Tille

unread,
Dec 18, 2021, 3:10:03 AM12/18/21
to
Hi again,

I'd like to add an observation I do on another computer. At this
computer there is some preview of the images. However, the navigation
inside the file selection dialogue is broken. Usually the file
selection remembers the last directory and starts the selection process
there. Unfortunately this is not the case on that computer: It simply
presents a list of the last selected files and since I usually want to
send some new file I have to navigate starting from my home directory to
the place where I usually keep some images. I admit I prefered the
"clasical" way to start from the last directory where I picked files
from.

I have no idea why the file selection works differently on different
computers.

Kind regards

Andreas.

--
http://fam-tille.de

Nicholas Guriev

unread,
Dec 18, 2021, 7:00:04 AM12/18/21
to
Hello!

Telegram Desktop relies on xdg-desktop-portal to show a file dialog if
the org.freedesktop.portal.FileChooser interface is available. If not,
tdesktop fallbacks to QFileDialog from Qt. A distinctive attribute is
that the latter one has no preview. Upstream patched[1] Qt to display
the preview panel. A similar patch could be applied to system-wide Qt.

Most bugs you reported are not related directly to Telegram Desktop
source code. For instance, Telegram does remember a directory of last
chosen file but is not able to provide the directory to the integration
portals due to limitations[3] of their API.

Unfortunately, Telegram Desktop does not write to the log.txt file any
indications which file dialog is in use.

[1]: https://github.com/desktop-app/patches/blob/master/qtbase_5_15_2/0011-add-preview-support-to-gtk-file-dialog.patch
[2]: https://salsa.debian.org/debian/telegram-desktop/-/blob/a9ad183b61a1431180c4648f2271c3a801853995/Telegram/SourceFiles/platform/linux/linux_xdp_file_dialog.cpp#L292
[3]: https://flatpak.github.io/xdg-desktop-portal/#gdbus-method-org-freedesktop-portal-FileChooser.OpenFile

signature.asc

Andreas Tille

unread,
Dec 19, 2021, 6:10:04 AM12/19/21
to
Hi,

Am Sat, Dec 18, 2021 at 02:42:39PM +0300 schrieb Nicholas Guriev:
> Telegram Desktop relies on xdg-desktop-portal to show a file dialog if
> the org.freedesktop.portal.FileChooser interface is available. If not,
> tdesktop fallbacks to QFileDialog from Qt. A distinctive attribute is
> that the latter one has no preview. Upstream patched[1] Qt to display
> the preview panel. A similar patch could be applied to system-wide Qt.
>
> Most bugs you reported are not related directly to Telegram Desktop
> source code. For instance, Telegram does remember a directory of last
> chosen file but is not able to provide the directory to the integration
> portals due to limitations[3] of their API.

I admit I'm very confused: A file selection dialog is something that is
established for "ages" in computer science and should simply work.
While telegram-desktop is the only program where *I* am confused on
upgrades several times this might be since I'm not using many Qt based
programs (knowingly). In case you consider Qt beeing the source of the
issues I'm facing it would be great if you could forward the issue to
the relevant package since I do not feel competent to spot the correct
code that causes this confusion. For me it simply becomes visible in
telegram-desktop - thus reporting it here.

Thanks a lot for your explanation and maintaining telegram-desktop anyway

Andreas.
--
http://fam-tille.de

Nicholas Guriev

unread,
Dec 27, 2021, 6:40:03 AM12/27/21
to
It is okay. The code related to file dialogs was being rewritten several
times in the near past. So from an end user's perspective, it looks like
regression of the similar bug. And it is maintainer's duty to sort the
issue out and forward bug to appropriate sub-system if needed.

May I ask you to retest version 3.3.0+ds-2 of Telegram Desktop what is
going on your two computers where different behavior was observed? In
that version, yesterday I have extended logging[1]. And I would be
grateful if you send back the log.txt file to check my guesses in the
previous message.

Please also tell me which versions of the following packages are
installed if any: xdg-desktop-portal xdg-desktop-portal-gtk xdg-desktop-
portal-gnome xdg-desktop-portal-kde

Reportbug is preferable (but not mandatory), it will automatically
gather mentioned information.

[1]: https://sources.debian.org/src/telegram-desktop/3.3.0+ds-2/debian/patches/File-dialogs-logging.patch/

signature.asc

Andreas Tille

unread,
Dec 28, 2021, 6:00:04 AM12/28/21
to
Hi Nicholas,

Am Mon, Dec 27, 2021 at 02:32:49PM +0300 schrieb Nicholas Guriev:
> It is okay. The code related to file dialogs was being rewritten several
> times in the near past. So from an end user's perspective, it looks like
> regression of the similar bug. And it is maintainer's duty to sort the
> issue out and forward bug to appropriate sub-system if needed.

:-)

> May I ask you to retest version 3.3.0+ds-2 of Telegram Desktop what is
> going on your two computers where different behavior was observed?

Both computers remain with the different and to my user experience
uncomfortable behaviour (= no change compared to the previous version
3.1.8+ds-1)

> In
> that version, yesterday I have extended logging[1]. And I would be
> grateful if you send back the log.txt file to check my guesses in the
> previous message.

Where can I find this log.txt file?

> Please also tell me which versions of the following packages are
> installed if any: xdg-desktop-portal xdg-desktop-portal-gtk xdg-desktop-
> portal-gnome xdg-desktop-portal-kde

Computer with no preview but remembering the latest dir that was browsed
$ dpkg --get-selections | grep ^xdg
xdg-dbus-proxy install
xdg-user-dirs install
xdg-utils install

Computer with preview but forgetting the latest dir that was browsed:
$ dpkg --get-selections | grep ^xdg
xdg-dbus-proxy install
xdg-desktop-portal install
xdg-desktop-portal-gtk install
xdg-user-dirs install
xdg-utils install

I'm using xfce on both computers.

> Reportbug is preferable (but not mandatory), it will automatically
> gather mentioned information.

I can for sure open a new bug report (or simply forward the information
created by reportbug here) if this helps.

Thanks a lot for maintaining telegram-desktop

Andreas.

> [1]: https://sources.debian.org/src/telegram-desktop/3.3.0+ds-2/debian/patches/File-dialogs-logging.patch/

--
http://fam-tille.de
0 new messages