telegramdesktop / tdesktop

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

tdesktop is crashing after closing DurgerKing webapp #26978

Closed artemiialessandrini closed 8 months ago

artemiialessandrini commented 1 year ago

Steps to reproduce

  1. Run ./Telegram -platform xcb
  2. Open official DurgerKing bots WebApp by MENU Button
  3. Click randomly, opening and closing the WebApp 2-3 times

Expected behaviour

WebApp is closing and Telegram is alive

Actual behaviour

WebApp is closing but Telegram crashes

Operating system

20.04.1-Ubuntu SMP

Version of Telegram Desktop

Version 4.10.5 beta

Installation source

Static binary from official website

Crash ID

02ec3710-e07e-487f-03f588aa-f4bf8459

Logs

qt.waylandcompositor.hardwareintegration: Failed to initialize EGL display. Could not get EglDisplay for window.

(Telegram:54123): GLib-GIO-WARNING **: 19:05:38.474: Your application does not implement g_application_activate() and has no handlers connected to the 'activate' signal.  It should do one of these.

(Telegram:54123): Gdk-CRITICAL **: 19:05:38.527: gdk_monitor_get_scale_factor: assertion 'GDK_IS_MONITOR (monitor)' failed

(Telegram:54123): Gdk-CRITICAL **: 19:05:38.527: gdk_monitor_get_scale_factor: assertion 'GDK_IS_MONITOR (monitor)' failed

(Telegram:54123): Gdk-CRITICAL **: 19:05:38.527: gdk_monitor_get_scale_factor: assertion 'GDK_IS_MONITOR (monitor)' failed

(Telegram:54123): Gdk-CRITICAL **: 19:05:38.527: gdk_monitor_get_scale_factor: assertion 'GDK_IS_MONITOR (monitor)' failed

(Telegram:54123): Gdk-CRITICAL **: 19:05:38.527: gdk_monitor_get_workarea: assertion 'GDK_IS_MONITOR (monitor)' failed

(Telegram:54123): Gdk-CRITICAL **: 19:05:38.527: gdk_monitor_get_workarea: assertion 'GDK_IS_MONITOR (monitor)' failed
WaylandCompositor requires eglBindWaylandDisplayWL, eglUnbindWaylandDisplayWL and eglQueryWaylandBuffer.
Nested Wayland compositor could not initialize EGL
Segmentation fault (core dumped)

echo $XDG_SESSION_TYPE: x11

ilya-fedin commented 1 year ago

Does it crash with GDK_GL=disable?

github-actions[bot] commented 11 months ago

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.

artemiialessandrini commented 11 months ago

Still fails, while running ./Telegram GDK_GL=disable

ilya-fedin commented 11 months ago

no, it should be GDK_GL=disable ./Telegram

shalmeo commented 11 months ago

Telegram Desktop Version 4.11.7 OS: Manjaro Linux x86_64 DE: GNOME 45.1

In my case Web App takes forever to load image

And in the logs we can see image

I’ll highlight the most important thing, at the moment you click on the web app Gdk-Message: 02:02:35.304: Error 71 (Protocol error) dispatching to Wayland display.

qt.waylandcompositor.hardwareintegration: Failed to initialize EGL display. Could not get EglDisplay for window.

(Telegram:61878): GLib-GIO-WARNING **: 02:02:35.874: Your application does not implement g_application_activate() and has no handlers connected to the 'activate' signal

Gdk-Message: 02:02:35.988: Error 71 (Protocol error) dispatching to Wayland display.

Was there a similar issue? Give me a link or help solve the problem please

ilya-fedin commented 11 months ago

@shalmeo it's not loading, it's crashed. tdesktop doesn't have crash handling for webview so the window doesn't react.

shalmeo commented 11 months ago

@shalmeo it's not loading, it's crashed. tdesktop doesn't have crash handling for webview so the window doesn't react.

Do you have any ideas to solve the problem?

Do I need to open an issue to solve my problem? I just really need in webapp in my system

ilya-fedin commented 11 months ago

The only environment where webapps are known to work without problems on Linux is KDE X11.

artemiialessandrini commented 11 months ago

no, it should be GDK_GL=disable ./Telegram

Also crashing, in the same way. After clicking Telegram WebApp MainButton with: (Telegram:9222): Gdk-CRITICAL **: 14:20:23.373: gdk_monitor_get_workarea: assertion 'GDK_IS_MONITOR (monitor)' failed WaylandCompositor requires eglBindWaylandDisplayWL, eglUnbindWaylandDisplayWL and eglQueryWaylandBuffer. Nested Wayland compositor could not initialize EGL Segmentation fault (core dumped)

ilya-fedin commented 11 months ago

@artemiialessandrini are you sure Telegram is not already running when you launch it via command? As it will just focus the window of already running instance otherwise.

artemiialessandrini commented 11 months ago

@artemiialessandrini are you sure Telegram is not already running when you launch it via command? As it will just focus the window of already running instance otherwise.

Well, I have other instances of Telegram installed by snap, apt, but it's not running.

artemiialessandrini commented 11 months ago

The only environment where webapps are known to work without problems on Linux is KDE X11.

I'm doing telegram bot with a webapp development, would you suggest switching to KDE X11 in that matter as a workaround?

ilya-fedin commented 11 months ago

Well, I have other instances of Telegram installed by snap, apt, but it's not running.

I mean the binary could be running. People often just close window instead of quitting via tray icon and then ensuring it's actually not running (there are reports Telegram can get some deadlock and not quit actually) via process list (e.g. ps aux | grep Telegram).

ilya-fedin commented 11 months ago

I'm doing telegram bot with a webapp development, would you suggest switching to KDE X11 in that matter as a workaround?

Yes.

ilya-fedin commented 9 months ago

@artemiialessandrini can you check whether LIBGL_ALWAYS_SOFTWARE=1 helps?

github-actions[bot] commented 9 months ago

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.

artemiialessandrini commented 8 months ago

@artemiialessandrini can you check whether LIBGL_ALWAYS_SOFTWARE=1

Running with LIBGL_ALWAYS_SOFTWARE=1 flag didn't help

ilya-fedin commented 8 months ago

@artemiialessandrini is it still happening with latest version? if yes, can you provide a new crash id?

github-actions[bot] commented 8 months ago

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.