vysheng / tg

telegram-cli
GNU General Public License v2.0
6.49k stars 1.54k forks source link

tg crashes when retrieving history #963

Open behrangsa opened 8 years ago

behrangsa commented 8 years ago

telegram-cli crashes when retrieving history:

> history Some_Name
...
. some of the history
...
»»» x = 10
Assertion failed: (0), function print_media, file interface.c, line 3446.
SIGNAL received
S0   telegram-cli                        0x00000001096b43ea print_backtrace + 42
1   telegram-cli                        0x00000001096b44f4 termination_signal_handler + 196
2   libsystem_platform.dylib            0x00007fff92721eaa _sigtramp + 26
3   ???                                 0x0000000000000000 0x0 + 0
4   libsystem_c.dylib                   0x00007fff87c786e7 abort + 129
5   libsystem_c.dylib                   0x00007fff87c3fdf8 basename + 0
6   telegram-cli                        0x00000001096cc22d print_media + 5325
7   telegram-cli                        0x00000001096c69c3 print_message + 3555
8   telegram-cli                        0x00000001096c0bbc print_msg_list_gw + 300
9   telegram-cli                        0x00000001096fc642 get_history_on_answer + 1010
10  telegram-cli                        0x00000001096eedf0 tglq_query_result + 1232
11  telegram-cli                        0x00000001096ec246 work_rpc_result + 214
12  telegram-cli                        0x00000001096ebb2b rpc_execute_answer + 587
13  telegram-cli                        0x00000001096ea935 process_rpc_message + 2997
14  telegram-cli                        0x00000001096e7874 rpc_execute + 820
15  telegram-cli                        0x000000010972112a try_rpc_read + 1082
16  telegram-cli                        0x0000000109720ce5 try_read + 581
17  telegram-cli                        0x000000010972014d conn_try_read + 109
18  libevent-2.0.5.dylib                0x0000000116c695bb event_base_loop + 1849
19  telegram-cli                        0x00000001096b5352 net_loop + 162
20  telegram-cli                        0x00000001096b8584 loop + 916
21  telegram-cli                        0x00000001096b389d inner_main + 13
22  telegram-cli                        0x00000001096b4bde main + 1374
23  libdyld.dylib                       0x00007fff951325ad start + 1
behrangsa commented 8 years ago

Just FYI, the crash occurs on an Audio message that is sent by Some_One.

beMoD commented 8 years ago

See #904. This so needs to be pulled...

Oh and when your issue is resolved please close it, also #961 please.

psamim commented 8 years ago

I confirm that I have the same problem.

povesma commented 8 years ago

The issue confirmed. Crashes on voice message in history. Any workaround?

JunaidBabu commented 8 years ago

here is a workaround https://github.com/vysheng/tg/issues/911#issuecomment-172402281

arabsoheyl commented 7 years ago

fix issue by: update scheme.tl in tgl/ . line 413: documentAttributeVideo#5910cccb duration:int w:int h:int = DocumentAttribute; to: documentAttributeAudio#9852f9c6 flags:# voice:flags.10?true duration:int title:flags.0?string performer:flags.1?string waveform:flags.2?bytes = DocumentAttribute;

mayby you should update some of param of this file(sceme.tl). and run this commands

make clean ./configure make

latest scheme: https://github.com/telegramdesktop/tdesktop/blob/dev/Telegram/Resources/scheme.tl