Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tdlib fails with SIGSEGV in a simple* python script #437

Open
puhsu opened this issue Jan 13, 2024 · 1 comment
Open

tdlib fails with SIGSEGV in a simple* python script #437

puhsu opened this issue Jan 13, 2024 · 1 comment

Comments

@puhsu
Copy link

puhsu commented Jan 13, 2024

For some reason when I use python telegram in the script where pandas is imported, tdlib crashes

Reproduced like this:

python repro.py

import pandas as pd
from telegram.client import Telegram

tg = Telegram(
    api_id='ID_HERE',
    api_hash='HASH_HERE'
    phone='PHONE_HERE',
    library_path='PATH_TO_THE_LIBRARY',  # I use the nix installed version, so manually declare this path
    database_encryption_key='pswd',
    files_directory='./',
)
tg.login()
tg.stop()

Throws:

'python repro.py' terminated by signal SIGSEGV (Address boundary error)

And

# import pandas as pd
from telegram.client import Telegram

tg = Telegram(
    api_id='ID_HERE',
    api_hash='HASH_HERE'
    phone='PHONE_HERE',
    library_path='PATH_TO_THE_LIBRARY',  # I use the nix installed version, so manually declare this path
    database_encryption_key='pswd',
    files_directory='./',
)
tg.login()
tg.stop()

Works fine:

[ 2][t 4][1705185016.129917144][AuthDataShared.cpp:117][#1][!Td]	DcId{2} [auth_key_id:*****][state:OK][created_at:1705181175][last_used:1705298175]
[ 2][t 4][1705185016.130964040][Session.cpp:271][#1][!SessionProxy:2:main]	Generate new session_id ******** for auth key ****** for main DC2
[ 2][t 4][1705185016.132322072][Td.cpp:3569][#1][!Td]	Close Td in state 1

Environment details:

  • tdlib version: 1.8.23 (installed with nix on macos)
  • pandas: 2.1.3
  • haven't tried it with the dockerized version, but I doubt the tdlib install is at fault here (but open to try)
@abdullaevich700
Copy link

bro how did you run the project

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

No branches or pull requests

2 participants