You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You must send TdApi.Close() and wait for the TdApi.Ok response.
If you want to make sure that tdlib is closed when the app is closed, you must send TdApi.Close() and wait for its response in a shutdown hook.
Runtime.getRuntime().addShutdownHook(newThread() {
publicvoidrun() {
// Send here TdApi.Close(), and wait for TdApi.Ok response
}
});
How to close client correctly ? When I just finish application, JVM catches SIGSEGV:
A fatal error has been detected by the Java Runtime Environment:
SIGSEGV (0xb) at pc=0x00007f95c110adbc, pid=16485, tid=16516
JRE version: Java(TM) SE Runtime Environment (15.0.1+9) (build 15.0.1+9-18)
Java VM: Java HotSpot(TM) 64-Bit Server VM (15.0.1+9-18, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-md64)
Problematic frame:
C [tdjni.so+0xa5edbc] td::Td::clear()+0x38c
Stack: [0x00007f9589ffe000,0x00007f958a7fd000], sp=0x00007f958a7fb3f8, free space=8180k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [tdjni.so+0xa5edbc] td::Td::clear()+0x38c
C [tdjni.so+0xaa4d2c] td::detail::LambdaPromise<td::tl::unique_ptrtd::telegram_api::help_PromoData, td::Td::on_alarm_timeout(long)::$_8, td::PromiseCreator::Ignore>::~LambdaPromise()+0x4c
C [tdjni.so+0xaa5bc6] td::GetPromoDataQuery::~GetPromoDataQuery()+0x26
C [tdjni.so+0xaa6092] std::_Sp_counted_deleter<td::GetPromoDataQuery*, std::__shared_ptr<td::GetPromoDataQuery, (__gnu_cxx::_Lock_policy)2>::_Deleter<std::allocatortd::GetPromoDataQuery >, std::allocatortd::GetPromoDataQuery, (__gnu_cxx::_Lock_policy)2>::_M_dispose()+0x12
C [tdjni.so+0xa5edea] td::Td::clear()+0x3ba
C [tdjni.so+0xa5d22c] td::Td::dec_request_actor_refcnt()+0x14c
C [tdjni.so+0x167af5f] td::Scheduler::do_event(td::ActorInfo*, td::Event&&)+0x24f
C [tdjni.so+0x167c273] void td::Scheduler::flush_mailbox<void ()(td::ActorInfo), td::Event ()()>(td::ActorInfo, void (* const&)(td::ActorInfo*), td::Event (* const&)())+0x113
C [tdjni.so+0x167c05f] td::Scheduler::run_mailbox()+0x14f
C [tdjni.so+0x167c7d8] td::Scheduler::run_events()+0x198
C [tdjni.so+0x167c61a] td::Scheduler::run_no_guard(td::Timestamp)+0xaa
C [tdjni.so+0x16778af] td::ConcurrentScheduler::run_main(td::Timestamp)+0x4f
C [tdjni.so+0x929579] td::LambdaDestructor<td::detail::ThreadPthread::ThreadPthread<td::MultiImpl::MultiImpl(std::shared_ptrtd::NetQueryStats)::{lambda()#1}>(td::MultiImpl::MultiImpl(std::shared_ptrtd::NetQueryStats)::{lambda()#1}&&)::{lambda()#1}>::~LambdaDestructor()+0x39
C [tdjni.so+0x929460] td::detail::ThreadPthread::run_thread(void*)+0x20
The text was updated successfully, but these errors were encountered: