tdesktop icon indicating copy to clipboard operation
tdesktop copied to clipboard

Telegram desktop crashes on saving any file - image, doc, or video

Open smartkid2024 opened this issue 1 year ago • 15 comments

Steps to reproduce

  1. Go to any subscribed chat
  2. select a message with image or video, etc
  3. Click Save as
  4. the app crashes without trace or logs

Expected behaviour

the file saved and user continue reading chat

Actual behaviour

the app crashes with error when i opened in terminal:

$ ./Telegram 
QPainter::begin: Paint device returned engine == 0, type: 2
QWidget::render: Cannot render with an inactive painter
Scudo ERROR: CHECK failed @ /usr/src/tdesktop/Telegram/ThirdParty/scudo/list.h:215 (Prev->Next) == (X) ((u64)op1=139495456111424, (u64)op2=139495567944512)
Aborted (core dumped)

Operating system

Linux Mint 20.3

Version of Telegram Desktop

4.14.13

Installation source

Static binary from official website

Crash ID

No response

Logs

QPainter::begin: Paint device returned engine == 0, type: 2
QWidget::render: Cannot render with an inactive painter
Scudo ERROR: CHECK failed @ /usr/src/tdesktop/Telegram/ThirdParty/scudo/list.h:215 (Prev->Next) == (X) ((u64)op1=139495456111424, (u64)op2=139495567944512)
Aborted (core dumped)

smartkid2024 avatar Feb 05 '24 06:02 smartkid2024

Provide a crash ID as instructed when creating issue

ilya-fedin avatar Feb 05 '24 06:02 ilya-fedin

Provide a crash ID as instructed when creating issue

Where is crash ID?

smartkid2024 avatar Feb 05 '24 06:02 smartkid2024

Where is crash ID?

It's instructed when creating issue

ilya-fedin avatar Feb 05 '24 07:02 ilya-fedin

9d698a24-7a45-43de-0af565b9-78a001ef image

ApiId: 2040
Binary: Telegram
Launched: 05.02.2024 10:33:38
OpenGL: Enabled
OpenGL Renderer: [not-initialized]
Platform: Linux
UserTag: 4458a6b0b417c70c
Version: 4014013

Caught signal 6 (SIGABRT) in thread 139746915407616
Google Breakpad caught a crash, minidump written in thread 139746915407616
Minidump: /home/user/.local/share/TelegramDesktop/tdata/dumps/9d698a24-7a45-43de-0af565b9-78a001ef.dmp

smartkid2024 avatar Feb 05 '24 07:02 smartkid2024

The tdesktop's crash reporting system is unable to provide a qualified backtrace for your report

Crash reason:  SIGABRT
Crash address: 0x3e80000eaf5
Process uptime: not available

Thread 42 (crashed)
 0  libc.so.6 + 0x4300b
    rax = 0x0000000000000000   rdx = 0x0000000000000000
    rcx = 0x00007f468859800b   rbx = 0x00007f195d405700
    rsi = 0x00007f195d400fa0   rdi = 0x0000000000000002
    rbp = 0x00007f195d401200   rsp = 0x00007f195d400fa0
     r8 = 0x0000000000000000    r9 = 0x00007f195d400fa0
    r10 = 0x0000000000000008   r11 = 0x0000000000000246
    r12 = 0x0000556591e55918   r13 = 0x00000000000000d7
    r14 = 0x0000556591e558ea   r15 = 0x00007f195a3feb40
    rip = 0x00007f468859800b
    Found by: given as instruction pointer in context
 1  Telegram!scudo::ScopedErrorReport::~ScopedErrorReport() [report.cpp : 30 + 0x5]
    rbp = 0x00007f195d401230   rsp = 0x00007f195d401210
    rip = 0x000055658c19b544
    Found by: previous frame's frame pointer
 2  Telegram!scudo::reportCheckFailed(char const*, int, char const*, unsigned long, unsigned long) [report.cpp : 62 + 0x5]
    rbx = 0x00007f195d401250   rbp = 0x00007f195d4013a0
    rsp = 0x00007f195d401240   rip = 0x000055658c19abe1
    Found by: call frame info
 3  Telegram!void scudo::teardownThread<scudo::Allocator<scudo::DefaultConfig, &malloc_postinit> >(void*) [list.h : 215 + 0x18]
    rbx = 0x0000556594dd1d70   rbp = 0x00007f195d4013f0
    rsp = 0x00007f195d4013b0   r12 = 0x00007f195d404b40
    r13 = 0x0000556594dd1d40   r14 = 0x00007f195a3feb40
    r15 = 0x00007f195d405c18   rip = 0x000055658c1a80f6
    Found by: call frame info
 4  libpthread.so.0 + 0x75a1
    rbx = 0x00007f195d405a18   rbp = 0x00007f4688765348
    rsp = 0x00007f195d401400   r12 = 0x0000000000000000
    r13 = 0x00007f4688765348   r14 = 0x0000000000000001
    r15 = 0x00007f195d405c18   rip = 0x00007f468874e5a1
    Found by: call frame info
 5  libpthread.so.0 + 0x862a
    rbp = 0x00007f4688765348   rsp = 0x00007f195d401440
    rip = 0x00007f468874f62a
    Found by: stack scanning
 6  libc.so.6 + 0x11f353
    rbp = 0x00007f4688765348   rsp = 0x00007f195d401500
    rip = 0x00007f4688674353
    Found by: stack scanning

I'm afraid the only way to find the cause is for you to build a debug build and run it via gdb...

ilya-fedin avatar Feb 07 '24 18:02 ilya-fedin

I've installed a new VM with Linux Mint 20.3 Cinnamon but was unable to reproduce your issue.

ilya-fedin avatar Feb 13 '24 04:02 ilya-fedin

I've installed a new VM with Linux Mint 20.3 Cinnamon but was unable to reproduce your issue.

Did you try to save it in a different location? when I did that it crashed

smartkid2024 avatar Feb 16 '24 05:02 smartkid2024

cannot reproduce myself even changing location to multiple places.

Aokromes avatar Feb 16 '24 08:02 Aokromes

Did you try to save it in a different location?

maybe it's related to exact location you have chosen?

ilya-fedin avatar Feb 16 '24 13:02 ilya-fedin

Updated yesterday and now crashes with the same error: /opt/Telegram/Telegram QPainter::begin: Paint device returned engine == 0, type: 2 QWidget::render: Cannot render with an inactive painter Scudo ERROR: CHECK failed @ /usr/src/tdesktop/Telegram/ThirdParty/scudo/list.h:215 (Prev->Next) == (X) ((u64)op1=0, (u64)op2=140012491590272)

ilsawa avatar Feb 17 '24 06:02 ilsawa

I've the same problem, I don't set anything /location, etc/, only some groups: $ ./Telegram 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 qt.gui.imageio.jpeg: Corrupt JPEG data: premature end of data segment qt.gui.imageio.jpeg: Corrupt JPEG data: premature end of data segment qt.gui.imageio.jpeg: Corrupt JPEG data: premature end of data segment qt.gui.imageio.jpeg: Corrupt JPEG data: premature end of data segment qt.gui.imageio.jpeg: Corrupt JPEG data: premature end of data segment qt.gui.imageio.jpeg: Corrupt JPEG data: premature end of data segment $ ./Telegram Aborted (core dumped)

Edit: I just read another issue #27482 and it was solved for me with "GTK_USE_PORTAL=1 ./Telegram", and disabling proxy.

fonya avatar Feb 17 '24 08:02 fonya

v 4.14.16. The same or similar crash on Xubuntu 22.04.3, randomly and often (no special action like "save a file" is required, just while reading a chat):

Scudo ERROR: CHECK failed @ /usr/src/tdesktop/Telegram/ThirdParty/scudo/list.h:215 (Prev->Next) == (X) ((u64)op1=0, (u64)op2=140543967357568)

Thread 67 "Thread (pooled)" received signal SIGABRT, Aborted.

(gdb) bt
#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=140543967360576) at ./nptl/pthread_kill.c:44
#1  __pthread_kill_internal (signo=6, threadid=140543967360576) at ./nptl/pthread_kill.c:78
#2  __GI___pthread_kill (threadid=140543967360576, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3  0x00007ffff7642476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4  0x00007ffff76287f3 in __GI_abort () at ./stdlib/abort.c:79
#5  0x0000555556150020 in scudo::die() ()
#6  0x00005555566b6bd4 in scudo::ScopedErrorReport::~ScopedErrorReport() ()
#7  0x00005555566b6271 in scudo::reportCheckFailed(char const*, int, char const*, unsigned long, unsigned long) ()
#8  0x00005555566c3786 in void scudo::teardownThread<scudo::Allocator<scudo::DefaultConfig, &malloc_postinit> >(void*) ()
#9  0x00007ffff7691691 in __GI___nptl_deallocate_tsd () at ./nptl/nptl_deallocate_tsd.c:73
#10 __GI___nptl_deallocate_tsd () at ./nptl/nptl_deallocate_tsd.c:22
#11 0x00007ffff769494a in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:453
#12 0x00007ffff7726850 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

alexey-tikhonov avatar Feb 18 '24 11:02 alexey-tikhonov

If you don't need any action then it's not similar at all

ilya-fedin avatar Feb 18 '24 16:02 ilya-fedin

If you don't need any action then it's not similar at all

Probably, but the same Scudo ERROR: CHECK failed @ /usr/src/tdesktop/Telegram/ThirdParty/scudo/list.h:215 (Prev->Next) == (X) hints it might be similar.

alexey-tikhonov avatar Feb 18 '24 16:02 alexey-tikhonov

No, it's printed when allocator detects memory corruption and the causes of different memory corruptions can be completely unrelated

ilya-fedin avatar Feb 18 '24 16:02 ilya-fedin

This issue has been automatically closed because no developer succeeded to reproduce the issue with the given reproduction steps. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you find what's missing to reproduce the issue so that we can investigate further.

Note that GitHub is a developer communication platform. If you're an ordinary user seeking for help, get to support crew via Settings -> Ask question in the application.

github-actions[bot] avatar Feb 28 '24 00:02 github-actions[bot]