FS#75551 - [telegram-desktop] Crash on resize below a certain width, when a full-width image is in it
Attached to Project:
Community Packages
Opened by Christian Sturm (Athaba) - Monday, 08 August 2022, 16:51 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Thursday, 08 December 2022, 22:59 GMT
Opened by Christian Sturm (Athaba) - Monday, 08 August 2022, 16:51 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Thursday, 08 December 2022, 22:59 GMT
|
Details
Description:
When resizing Telegram to a low width while in the "chat view" Telegram crashes. Version used: 4.0.2-4 I am pretty sure this has happened for a couple of versions This doesn't happen with the executable provided by Telegram. I was using i3, so it's kind of annoying, when telegram might crash right away on opening from the tray, when there was little space left for it. Steps to reproduce: * Open telegram-desktop * Make sure you are in a chat (so select a contact) and have a full-width/height image in the chat. Doesn't seem to happen when Telegram resized that image, because of its resolution. * Lower the width so it is very small (sorry not sure how to best get an exact number of pixels) until it crashes Crash: /usr/include/c++/12.1.0/bits/stl_algo.h:3623: constexpr const _Tp& std::clamp(const _Tp&, const _Tp&, const _Tp&) [with _Tp = int]: Assertion '!(__hi < __lo)' failed. [1] 9687 IOT instruction (core dumped) telegram-desktop |
This task depends upon
Closed by Sven-Hendrik Haase (Svenstaro)
Thursday, 08 December 2022, 22:59 GMT
Reason for closing: Upstream
Thursday, 08 December 2022, 22:59 GMT
Reason for closing: Upstream
EDIT: Nevermind, I'm blind.
Two things to notice here:
I use i3, a tiling window manager which seems to allow to make it smaller than usually possible.
As mentioned before it might take a bit of trying to get the right width. I wonder if elements in chats also make a difference. I'll try to experiment further.
* Have a YouTube link in Saved Message (so there is a preview of the video)
* Install wmctrl to set position and size of windows
* Open Telegram
* Run wmctrl -l to get the window id of Telegram (the very left value)
* If you are on a tiling window manager (like i3) you have to get it out of tiling (Shift-Meta-Space on i3)
* Run wmctrl -i -r <id> -e 0,500,500,300,400 (the 500,500 is position, the 300,400 dimensions)
* This should resize your telegram window
* When you now click on Saved Messages the crash will occur
It also occurs in other scenarios like in calls, but the above is the easiest thing I was able to come up with.
https://github.com/telegramdesktop/tdesktop/issues/25539