GithubHelp home page GithubHelp logo

Crash td_json_client_destroy about td HOT 5 CLOSED

tdlib avatar tdlib commented on April 30, 2024
Crash td_json_client_destroy

from td.

Comments (5)

isopen avatar isopen commented on April 30, 2024

I am reading. Td.cpp:4038:close_flag_ = 4;

void Td::close_impl(bool destroy_flag) {
  destroy_flag_ |= destroy_flag;
  if (close_flag_) {
    return;
  }
  if (state_ == State::Decrypt) {
    if (destroy_flag) {
      TdDb::destroy(parameters_);
    }
    state_ = State::Close;
    close_flag_ = 4;
    return dec_actor_refcnt();
  }
  state_ = State::Close;
  close_flag_ = 1;
  G()->set_close_flag();
  send_closure(auth_manager_actor_, &AuthManager::on_closing);
  LOG(WARNING) << "Close " << tag("destroy", destroy_flag);

  // wait till all request_actors will stop.
  request_actors_.clear();
  G()->td_db()->flush_all();
  send_closure_later(actor_id(this), &Td::dec_request_actor_refcnt);  // remove guard
}

from td.

levlam avatar levlam commented on April 30, 2024

What databases are enabled in setTdlibParameters?

When td_json_client_destroy is called? Before or after logging? What is authorization state when it is called?

from td.

isopen avatar isopen commented on April 30, 2024

For a couple of seconds I sketched another script.
https://github.com/isopen/tdlib/blob/master/fiddle_index.rb
falls on the method

test0:
{"@type"=>"textEntities", "entities"=>[{"@type"=>"textEntity", "offset"=>0, "length"=>9, "type"=>{"@type"=>"textEntityTypeMention"}}, {"@type"=>"textEntity", "offset"=>10, "length"=>13, "type"=>{"@type"=>"textEntityTypeBotCommand"}}, {"@type"=>"textEntity", "offset"=>24, "length"=>20, "type"=>{"@type"=>"textEntityTypeUrl"}}, {"@type"=>"textEntity", "offset"=>45, "length"=>11, "type"=>{"@type"=>"textEntityTypeUrl"}}], "@extra"=>["5", 7.0]}
{"@type"=>"updateAuthorizationState", "authorization_state"=>{"@type"=>"authorizationStateWaitTdlibParameters"}}
{"@type"=>"authorizationStateWaitTdlibParameters", "@extra"=>1.01234}
waiting for authorization (this is normal)

td_json_client_destroy

test1(crash):
td_json_client_create

I delete the loop.

td_json_client_destroy

from td.

levlam avatar levlam commented on April 30, 2024

Thanks. The crash will be fixed in next update.

from td.

levlam avatar levlam commented on April 30, 2024

Fixed in TDLib 1.2.0.

from td.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.