Skip to content

Media viewer hangs/freezes when quickly browsing through multiple images (GLX/DRI3 swapBuffers deadlock) #31296

Description

@jobbb2

Steps to reproduce

  1. Open Telegram Desktop and open any chat containing multiple images
  2. Open the media viewer by clicking on any image
  3. Quickly browse through several images in succession using arrow keys or the next/previous navigation (i.e. flip through images faster than the transition animation completes)
  4. After a few quick transitions, the application freezes completely and becomes unresponsive

Expected behaviour

The media viewer should smoothly transition between images without freezing, regardless of how quickly the user browses through them.

Actual behaviour

The application becomes completely unresponsive (frozen UI, no reaction to input). The process must be force-killed. GDB analysis shows the main thread is permanently stuck in an infinite wait inside the GLX/DRI3 buffer swap call:

QGLXContext::swapBuffers() → loader_dri3_swap_buffers_msc() → xcb_wait_for_special_event() → poll()

All other threads were idle and waiting normally (g_cond_wait/ppoll), confirming this is not an internal Telegram deadlock, but a hang in GLX/DRI3 buffer swap synchronization with the X server.

Confirmed workaround: Setting LIBGL_ALWAYS_SOFTWARE=1 before launch completely resolves the issue - rapid image browsing then works flawlessly.

telegram-bug-backtrace.txt

Operating system

PRETTY_NAME="Debian GNU/Linux 13 (trixie)" NAME="Debian GNU/Linux" VERSION_ID="13" VERSION="13 (trixie)" VERSION_CODENAME=trixie DEBIAN_VERSION_FULL=13.7 ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/" 7.1.12-2-liquorix-amd64

Version of Telegram Desktop

7.2.8

Installation source

Downloaded from desktop.telegram.org or GitHub

Crash ID

No response

Logs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions