telegramdesktop / tdesktop

Telegram Desktop messaging app
https://desktop.telegram.org/
Other
25.82k stars 5.11k forks source link

Telegram freezes then opening a specific chat #27552

Closed alba4k closed 6 months ago

alba4k commented 6 months ago

Steps to reproduce

  1. Open Telegram
  2. Click on the problematic chat to open it, or right click -> open in another window. I have tried deleting the chat.

Expected behaviour

The chat opens normally

Actual behaviour

The program becomes unresponsive and must be killed and reopened

Operating system

Arch Linux, up to date

Version of Telegram Desktop

4.15.0

Installation source

Static binary from official website

Crash ID

-

Logs

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
fish: Job 1, './Telegram' terminated by signal SIGTERM (Polite quit request)
alba4k commented 6 months ago

The problem is there on both the version from the repos and the static binary.

ilya-fedin commented 6 months ago

On the static binary, you can enable debug mode with the debugmode cheat code. After enabling it and restarting the application, the built-in deadlock detector will be activated and will abort the application letting you to go through the crash ID routine explained when creating issue.

alba4k commented 6 months ago

I did what you suggested, but nothing happens during the freeze. I suppose that might be because the application isn't 100% stuck (I can still right click the tray, although none of the options do anything. Quit closes the app, but only after a long time)

alba4k commented 6 months ago

Apparently, when telegram closed from the tray that time, it just crashed. And it crashed quite badly I must say, as the next time I reopened it it asked me to log in again, and my settings were gone. No big deal, but at least that issue is fixed now. Should I close this as not planned or something?

ilya-fedin commented 6 months ago

I can still right click the tray

This menu is managed by the panel. It only does request to the application after clicking on an action.

ilya-fedin commented 6 months ago

And it crashed quite badly I must say, as the next time I reopened it it asked me to log in again, and my settings were gone.

That's quite bad, maybe there's a QSaveFile missing somewhere...

Should I close this as not planned or something?

Yeah, there's no practical reason to keep it open if it's unreproducible

alba4k commented 6 months ago

I was trying to figure out why I was unable to remove the window border (use system border thing). It happened again.

ilya-fedin commented 6 months ago

The transition to system border is quite bugged in Qt on Wayland, it will get fully applied only after closing & reopening the window

alba4k commented 6 months ago

@ilya-fedin The problem is this border. immagine

I'm not sure how to get rid of it, it was never turned on in the first place

ilya-fedin commented 6 months ago

Disable all titlebar buttons for gtk: gsettings set org.gnome.desktop.wm.preferences button-layout '' You need to have xdg-desktop-portal + xdg-desktop-portal-gtk installed as tdesktop is not a gtk application but reads the gtk setting via portal.

alba4k commented 6 months ago

immagine Not sure that did much?

It worked fine before my settings got wiped tho, so unsure why that would be different now. Also I'm not seeing a profile picture in notifications anymore (dunst)

Sorry for bothering you for this ahah, it's just really annoying

ilya-fedin commented 6 months ago

You checked the xdg-desktop-portal-gtk, what about xdg-desktop-portal though?

alba4k commented 6 months ago

It's running. Didn't check as it was running before too

ilya-fedin commented 6 months ago

busctl --user call org.freedesktop.portal.Desktop /org/freedesktop/portal/desktop org.freedesktop.portal.Settings Read ss org.gnome.desktop.wm.preferences button-layout should return exactly what tdesktop gets

alba4k commented 6 months ago
Call failed: Interfaccia «org.freedesktop.portal.Settings» inesistente sull'oggetto nel percorso /org/freedesktop/portal/desktop

(Call failed: interface <...> does not exist on the object in the path /org/...)

ilya-fedin commented 6 months ago

looks like it doesn't really work... do you have portals.conf config?

alba4k commented 6 months ago

nvm fixed dw, xdg-desktop-portal-hyprland wasn't starting properly. Wrote a script that restarts it after login, everything works now, thanks.

Btw, how come it was working before, even without gkt portal installed?

ilya-fedin commented 6 months ago

Using the option you circled on the screenshot likely

alba4k commented 6 months ago

No, that just adds more stuff to that window border (telegram icon, name, etc)

ilya-fedin commented 6 months ago

i'll repeat myself:

The transition to system border is quite bugged in Qt on Wayland, it will get fully applied only after closing & reopening the window

ilya-fedin commented 6 months ago

in other words: check the checkbox, close the window, open Telegram again

alba4k commented 6 months ago

Would be easier if telegram wasn't just freezing when tryint to start it now...

Well I guess the lesson to learn is to never run the static binary again lol (I opened it again once now to test, guess what, it reset everything again for the 3rd time)

But yeah, it was the QT frame, thanks. Misinterpreted what you said the first time.

alba4k commented 6 months ago

immagine

Also, it still freeezes immediately after logging in, then crashes after a while

alba4k commented 6 months ago

Ok clered everything for what I hope will be the last time, removed xdp-gtk, set everything up again.

Thanks again for the help, have a great rest of your day, I guess you deserve it ahah

Still unsure about why the static build kept fucking things up tho. Maybe the debug stuff? no idea