Skip to content

Fixed error when loading an image of a expired forwarded message(image) originated from a bot (Empty Message) - #106

Open
blaize9 wants to merge 1 commit into
vysheng:masterfrom
blaize9:master
Open

Fixed error when loading an image of a expired forwarded message(image) originated from a bot (Empty Message)#106
blaize9 wants to merge 1 commit into
vysheng:masterfrom
blaize9:master

Conversation

@blaize9

@blaize9 blaize9 commented May 24, 2016

Copy link
Copy Markdown

I'm using tvdstaaij/telegram-history-dump to archive my chats, and when it hits a forwarded message of a bot message that has expired vysheng/tg will crash with the error below when calling tgl_do_load_photo on an ID of an Empty Message. The empty message still has the contents of the forwarded message when you request the history which is the issue causing this. This fix works seamlessly across the various clients.

Should this fix also be applied other tgl_do_load_(media type here)?

Crash on vysheng/tg when doing load_photo on an Empty Message:

SIGNAL received
hbin/telegram-cli(print_backtrace+0x2f)[0x46ef1f]
bin/telegram-cli(termination_signal_handler+0x64)[0x46efb4]
/lib/x86_64-linux-gnu/libc.so.6(+0x354a0)[0x7fbe9abd44a0]
bin/telegram-cli(tgl_do_load_photo+0x0)[0x4a0e80]
bin/telegram-cli(interpreter_ex+0x970)[0x478e50]
bin/telegram-cli[0x46f501]
/usr/lib/x86_64-linux-gnu/libevent-2.0.so.5(+0x188da)[0x7fbe9c0a38da]
/usr/lib/x86_64-linux-gnu/libevent-2.0.so.5(event_base_loop+0x7fc)[0x7fbe9c098a0c]
bin/telegram-cli(net_loop+0xa7)[0x470557]
bin/telegram-cli(loop+0x183)[0x4718c3]
bin/telegram-cli(main+0x2e5)[0x46d745]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7fbe9abbf830]
bin/telegram-cli(_start+0x29)[0x46d859]

Example of an Empty Message:
Empty Message

Example of an Empty Message in history:
exactly the same as a forwarded message(image)

@doubleaxe

Copy link
Copy Markdown

Hit this issue recently. Thanks for this PR. Downloaded chat log with no problem.

@tapionx

tapionx commented Sep 17, 2017

Copy link
Copy Markdown

It works! Please accept this PR @vysheng 😄

@blaize9

blaize9 commented Sep 17, 2017

Copy link
Copy Markdown
Author

Wow it's been a while since I sent this PR, glad it's still working. Hopefully @vysheng can accept it so other people won't have this issue.

SimBioT1954 added a commit to SimBioT1954/tg that referenced this pull request Oct 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants