Skip to content

Crash when using drawing tool on photos - Assertion failed in std::clamp on Linux Mint #30588

@alirezahastam

Description

@alirezahastam

Steps to reproduce

  1. Open any chat
  2. Attach a photo
  3. Click the pencil icon to edit
  4. Start drawing or writing on the photo with the pen tool
  5. After a few seconds of drawing, Telegram freezes and closes

Expected behaviour

The app should not crash when I draw on a photo. The drawing tool should work normally without any issues.

Actual behaviour

Telegram freezes for 2-3 seconds, then closes completely. No error message or crash report appears when reopening the app.

Operating system

Linux Mint 22.2 (Zara) - based on Ubuntu 24.04 Noble

Version of Telegram Desktop

6.7.3

Installation source

Flatpak

Crash ID

None - no crash reporter window appeared

Logs

Running with `flatpak run org.telegram.desktop`:

Gtk-Message: Failed to load module "xapp-gtk3-module"
Qt: Session management error: Could not open network socket
QPainter::begin: Paint device returned engine == 0, type: 2
QWidget::render: Cannot render with an inactive painter
QTextCursor::setPosition: Position '8388607' out of range
/usr/include/c++/15.2.0/bits/stl_algo.h:3638: constexpr const _Tp& std::clamp(const _Tp&, const _Tp&, const _Tp&) [with _Tp = double]: Assertion '!(__hi < __lo)' failed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions