Closed schrmh closed 1 year ago
Have you checked other Qt applications? tdesktop doesn't touch Qt's clipboard APIs when not needed, so I assume it's a Qt bug.
CopyQ (a clipboard manager) for example is not hanging. (Also CopyQ is not involved here, I had it closed before)
Are both CopyQ and tdesktop using the same Qt version (there's Qt 6 and Qt 5)?
Hm, looks like CopyQ only uses Qt5: https://archlinux.org/packages/community/x86_64/copyq/ telegram-desktop uses some Qt6 stuff: https://archlinux.org/packages/community/x86_64/telegram-desktop/
For Qt5, I have 5.15.8 installed (output of qmake --version
).
For Qt6 I guess 6.4.3, judging by the package versions of qt6 packages I have.
I tried it with https://archlinux.org/packages/community/x86_64/tiled/ now. This has a freezing problem, however it is only for a few seconds (guess when the image is copied to the clipboard) and then the application works. So there is really a Qt bug but there is likely a issue in Telegram as well.
https://archlinux.org/packages/community/x86_64/jami-qt/ has the problem as well
Interestingly https://archlinux.org/packages/community/x86_64/gpxsee/ doesn't have this problem.
For calibre I will edit this comment after a restart (it requires a newer Qt6 version than I have installed)
Edit: Calibre (https://archlinux.org/packages/community/x86_64/calibre/) is not affected!
3. Copy any "huge" (1MB+) image outside of telegram to the clipboard selection:
xclip -selection clipboard -target image/png -i bigimage.png
I've tried to execute this command using this image in my VM using Manjaro Xfce (I have shutted down clipman first), but I'm unable to reproduce the bug using Telegram from official website.
Yeah, it seems to happen with that as well on my system... Hm. I noticed that I get this when I run the telegram binary from the extracted .tar.xz from the website:
Warning in file "/home/duda/.local/share/applications/wine-extension-cmo.desktop": usage of MIME type "x-application/cmo" is discouraged (the use of "x-application" as media type is strongly discouraged in favor of a subtype of the "application" media type)
Warning in file "/home/duda/.local/share/applications/wine-extension-cmp.desktop": usage of MIME type "x-application/cmp" is discouraged (the use of "x-application" as media type is strongly discouraged in favor of a subtype of the "application" media type)
Warning in file "/home/duda/.local/share/applications/wine-extension-can.desktop": usage of MIME type "x-application/can" is discouraged (the use of "x-application" as media type is strongly discouraged in favor of a subtype of the "application" media type)
Warning in file "/home/duda/.local/share/applications/wine-extension-canx.desktop": usage of MIME type "x-application/canx" is discouraged (the use of "x-application" as media type is strongly discouraged in favor of a subtype of the "application" media type)
Warning in file "/home/duda/.local/share/applications/wine-extension-cmox.desktop": usage of MIME type "x-application/cmox" is discouraged (the use of "x-application" as media type is strongly discouraged in favor of a subtype of the "application" media type)
QPainter::begin: Paint device returned engine == 0, type: 2
QWidget::render: Cannot render with an inactive painter
qt.gui.imageio.jpeg: Corrupt JPEG data: premature end of data segment
qt.gui.imageio.jpeg: Corrupt JPEG data: premature end of data segment
qt.gui.imageio.jpeg: Corrupt JPEG data: premature end of data segment
And when I run telegram-desktop from Arch's repo:
QPainter::begin: Paint device returned engine == 0, type: 2
QWidget::render: Cannot render with an inactive painter
qt.svg: Error while inflating gzip file: SVG format check failed
qt.svg: Error while inflating gzip file: SVG format check failed
qt.svg: Error while inflating gzip file: SVG format check failed
qt.svg: Error while inflating gzip file: SVG format check failed
qt.svg: Error while inflating gzip file: SVG format check failed
qt.svg: Error while inflating gzip file: SVG format check failed
qt.svg: Error while inflating gzip file: SVG format check failed
qt.svg: Error while inflating gzip file: SVG format check failed
qt.svg: Error while inflating gzip file: SVG format check failed
qt.svg: Error while inflating gzip file: SVG format check failed
qt.svg: Error while inflating gzip file: SVG format check failed
qt.svg: Error while inflating gzip file: SVG format check failed
qt.svg: Error while inflating gzip file: SVG format check failed
qt.svg: Error while inflating gzip file: SVG format check failed
qt.svg: Error while inflating gzip file: SVG format check failed
qt.svg: Error while inflating gzip file: SVG format check failed
qt.svg: Error while inflating gzip file: SVG format check failed
qt.svg: Error while inflating gzip file: SVG format check failed
qt.svg: Error while inflating gzip file: SVG format check failed
qt.svg: Error while inflating gzip file: SVG format check failed
qt.svg: Error while inflating gzip file: SVG format check failed
qt.svg: Error while inflating gzip file: SVG format check failed
qt.svg: Error while inflating gzip file: SVG format check failed
qt.svg: Error while inflating gzip file: SVG format check failed
qt.gui.imageio.jpeg: Corrupt JPEG data: premature end of data segment
qt.gui.imageio.jpeg: Corrupt JPEG data: premature end of data segment
qt.gui.imageio.jpeg: Corrupt JPEG data: premature end of data segment
qt.gui.imageio.jpeg: Corrupt JPEG data: premature end of data segment
Maybe related then... However, it will be a pain to find the cause of the problem then I guess. Do you have any ideas to make finding it easier?
Maybe related then...
Do you mean the static binary doesn't hang?
Do you have any ideas to make finding it easier?
You can launch tdesktop in gdb and try to get a backtrace when it hangs (i.e. ctrl+c in terminal in that moment, thread all apply bt
or thread apply all bt
, I misremember every time). But you would have to rebuild tdesktop with debug symbols.
Do you mean the static binary doesn't hang?
Both hang.
Will try gdb later!
Both hang.
I fail to see how these errors are related then
I faced a similar issue with 4.7.1
/ Windows 11, but in my case, in addition to the lag, tdesktop
actually pastes the image as huge text. I faced this a few times, but now I accidentally hit enter during app hang, so I sent a hires image copied from Google Chrome via thousands of text messages. It was in a private chat with a couple dozens members, I saw only a few first messages and didn't understand the frustration of other members until I restarted the app.
@yurikoles your issue sounds completely different, I don't think it's a good idea to mix those in one issue.
Ok, I'm sorry for hijack, I'll create a new issue.
Edit: Nvm, ignore this comment, this docker-related problem was a /etc/hosts issue:
Kinda stuck at building it with docker (to get a debug build I can use with gdb) right now:
poetry run gen_dockerfile | DOCKER_BUILDKIT=1 docker build -t tdesktop:centos_env -
[+] Building 16.5s (7/140)
=> [internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 29.74kB 0.0s
=> [internal] load .dockerignore 0.1s
=> => transferring context: 2B 0.0s
=> resolve image config for docker.io/docker/dockerfile:1 6.4s
=> CACHED docker-image://docker.io/docker/dockerfile:1@sha256:39b85bbfa7536a5feceb7372a0817649ecb2724562a38360f4d6a7782a409b14 0.0s
=> [internal] load metadata for docker.io/library/centos:7 3.3s
=> CACHED [builder-base 1/6] FROM docker.io/library/centos:7@sha256:be65f488b7764ad3638f236b7b515b3678369a5124c47b8d32916d6487418ea4 0.0s
=> ERROR [builder-base 2/6] RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_6 6.5s
------
> [builder-base 2/6] RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm && yum -y install centos-release-scl && yum -y install git rh-python38-python-pip autoconf automake libtool patch gperf fontconfig-devel freetype-devel libX11-devel at-spi2-core-devel alsa-lib-devel pulseaudio-libs-devel mesa-libGL-devel mesa-libEGL-devel mesa-libgbm-devel libdrm-devel vulkan-devel gtk3-devel perl-XML-Parser pkgconfig bison yasm file which xorg-x11-util-macros devtoolset-10-make devtoolset-10-gcc devtoolset-10-gcc-c++ devtoolset-10-binutils llvm-toolset-7.0 llvm-toolset-7.0-clang-devel llvm-toolset-7.0-llvm-devel && yum clean all:
#0 5.698 Loaded plugins: fastestmirror, ovl
#0 6.453 Cannot open: https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm. Skipping.
#0 6.453 Error: Nothing to do
------
Dockerfile:9
--------------------
8 |
9 | >>> RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
10 | >>> && yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm \
11 | >>> && yum -y install centos-release-scl \
12 | >>> && yum -y install git rh-python38-python-pip autoconf automake libtool patch gperf \
13 | >>> fontconfig-devel freetype-devel libX11-devel at-spi2-core-devel alsa-lib-devel \
14 | >>> pulseaudio-libs-devel mesa-libGL-devel mesa-libEGL-devel mesa-libgbm-devel \
15 | >>> libdrm-devel vulkan-devel gtk3-devel \
16 | >>> perl-XML-Parser pkgconfig bison yasm file which xorg-x11-util-macros \
17 | >>> devtoolset-10-make devtoolset-10-gcc devtoolset-10-gcc-c++ \
18 | >>> devtoolset-10-binutils llvm-toolset-7.0 llvm-toolset-7.0-clang-devel \
19 | >>> llvm-toolset-7.0-llvm-devel \
20 | >>> && yum clean all
21 |
--------------------
ERROR: failed to solve: process "/bin/sh -c yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \t&& yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm \t&& yum -y install centos-release-scl \t&& yum -y install git rh-python38-python-pip autoconf automake libtool patch gperf \t\tfontconfig-devel freetype-devel libX11-devel at-spi2-core-devel alsa-lib-devel \t\tpulseaudio-libs-devel mesa-libGL-devel mesa-libEGL-devel mesa-libgbm-devel \t\tlibdrm-devel vulkan-devel gtk3-devel \t\tperl-XML-Parser pkgconfig bison yasm file which xorg-x11-util-macros \t\tdevtoolset-10-make devtoolset-10-gcc devtoolset-10-gcc-c++ \t\tdevtoolset-10-binutils llvm-toolset-7.0 llvm-toolset-7.0-clang-devel \t\tllvm-toolset-7.0-llvm-devel \t&& yum clean all" did not complete successfully: exit code: 1
Looks like network in Docker doesn't work on your machine due to whatever reason
Yeah, my /etc/hosts was blocking it.
However, I will have to put this on hold for a while since it takes way to much storage to compile at the moment. I had about 60 gigabyte of free storage when I started... Will continue it in a few months when I have more free space (or earlier if I can get somehow else a debug build)...
Can't you just use your distro's debuginfod support for distro's package?
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.
Steps to reproduce
xclip -selection clipboard -target image/png -i bigimage.png
Expected behaviour
No pasting or copying is done to telegram so it should not freeze at all.
Actual behaviour
It will freeze after a short moment for several seconds, might unfreeze for a short moment and freeze again
Operating system
Arch Linux x86_64; FVWM
Version of Telegram Desktop
4.7.1
Installation source
Other (unofficial) source
Crash ID
No response
Logs