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 1.7.0 Check have_dialog(dialog_id) failed. #1754

Closed
askovpen opened this issue Nov 28, 2021 · 6 comments
Closed

tdlib 1.7.0 Check have_dialog(dialog_id) failed. #1754

askovpen opened this issue Nov 28, 2021 · 6 comments

Comments

@askovpen
Copy link

askovpen commented Nov 28, 2021

today i have crashes in event loop with this error:
[ 0][t39][1638099105.554748535][MessagesManager.cpp:5601][#10][!Td] Check have_dialog(dialog_id) failed.
why? UserID > Int32.MAX?

td_api::object_ptr<td_api::MessageSender> MessagesManager::get_message_sender_object_const(UserId user_id,                                                                                                        
                                                                                           DialogId dialog_id) const {                                                                                            
  if (dialog_id.is_valid()) {                                                                                                                                                                                     
    CHECK(have_dialog(dialog_id)); // <--HERE                                                                                                                                                                               
    return td_api::make_object<td_api::messageSenderChat>(dialog_id.get());                                                                                                                                       
  }                                                                                                                                                                                                               
  if (!user_id.is_valid()) {                                                                                                                                                                                      
    // can happen only if the server sends a message with wrong sender                                                                                                                                            
    user_id = td_->contacts_manager_->add_service_notifications_user();                                                                                                                                           
  }                                                                                                                                                                                                               
  return td_api::make_object<td_api::messageSenderUser>(                                                                                                                                                          
      td_->contacts_manager_->get_user_id_object(user_id, "get_message_sender_object"));                                                                                                                          
}
@levlam
Copy link
Contributor

levlam commented Nov 28, 2021

This is unrelated to user identifiers. The crash could have been caused by messages sent by channels and was fixed in TDLib 1.7.5.

@askovpen
Copy link
Author

fix: df12ea8

@AlexMercier
Copy link

How to apply this fix for prebuilt tdlib for Android? this lib not updated from 2020 and now this crash also happens everytime. And I cannot work with the application on tdlib anymore

@levlam
Copy link
Contributor

levlam commented Nov 30, 2021

@AlexMercier There is no way to apply a patch to the binary. You need to build the latest TDLib for Android or wait for TDLib 1.8.0 release.

@AlexMercier
Copy link

@levlam and how long to wait release?
Or maybe somebody can build latest version before official release?

@levlam
Copy link
Contributor

levlam commented Nov 30, 2021

@AlexMercier See https://t.me/tdlibchat/28688 for TDLib 1.7.9 for Android.

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

3 participants