Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Crash when opening a Direct message conversationΒ #391

Closed

Description

@Nardol

Describe the bug
When opening the first DM conversation of the list, Cawbird Crashes.
If opening the second one, I can read it.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Direct messages'
  2. Click on the first conversation of the list
  3. Cawbird window is closed

Expected behavior
The list of direct messages should be displayed and the edit box to type a new message

System details:

  • OS: Debian Buster
  • Version: 1.4.1-1+4.3
  • Package type: Official Deb

Additional context
I have not found any error message when running in debug mode, but in STDERR I have these:

$ cawbird 

(cawbird:1321853): Gdk-CRITICAL **: 15:53:10.916: gdk_window_get_window_type: assertion 'GDK_IS_WINDOW (window)' failed

(cawbird:1321853): Atk-CRITICAL **: 15:53:12.654: atk_object_ref_state_set: assertion 'ATK_IS_OBJECT (accessible)' failed

(cawbird:1321853): Gtk-CRITICAL **: 15:53:12.654: gtk_accessible_get_widget: assertion 'GTK_IS_ACCESSIBLE (accessible)' failed

(cawbird:1321853): Atk-CRITICAL **: 15:53:12.674: atk_object_ref_state_set: assertion 'ATK_IS_OBJECT (accessible)' failed

(cawbird:1321853): Gtk-CRITICAL **: 15:53:12.674: gtk_accessible_get_widget: assertion 'GTK_IS_ACCESSIBLE (accessible)' failed

(cawbird:1321853): Atk-CRITICAL **: 15:53:12.689: atk_object_ref_state_set: assertion 'ATK_IS_OBJECT (accessible)' failed

(cawbird:1321853): Gtk-CRITICAL **: 15:53:12.689: gtk_accessible_get_widget: assertion 'GTK_IS_ACCESSIBLE (accessible)' failed

(cawbird:1321853): Atk-CRITICAL **: 15:53:12.698: atk_object_ref_state_set: assertion 'ATK_IS_OBJECT (accessible)' failed

(cawbird:1321853): Gtk-CRITICAL **: 15:53:12.698: gtk_accessible_get_widget: assertion 'GTK_IS_ACCESSIBLE (accessible)' failed

(cawbird:1321853): Atk-CRITICAL **: 15:53:12.706: atk_object_ref_state_set: assertion 'ATK_IS_OBJECT (accessible)' failed

(cawbird:1321853): Gtk-CRITICAL **: 15:53:12.706: gtk_accessible_get_widget: assertion 'GTK_IS_ACCESSIBLE (accessible)' failed

(cawbird:1321853): Atk-CRITICAL **: 15:53:12.718: atk_object_ref_state_set: assertion 'ATK_IS_OBJECT (accessible)' failed

(cawbird:1321853): Gtk-CRITICAL **: 15:53:12.718: gtk_accessible_get_widget: assertion 'GTK_IS_ACCESSIBLE (accessible)' failed

(cawbird:1321853): Atk-CRITICAL **: 15:53:12.728: atk_object_ref_state_set: assertion 'ATK_IS_OBJECT (accessible)' failed

(cawbird:1321853): Gtk-CRITICAL **: 15:53:12.728: gtk_accessible_get_widget: assertion 'GTK_IS_ACCESSIBLE (accessible)' failed

(cawbird:1321853): Atk-CRITICAL **: 15:53:12.739: atk_object_ref_state_set: assertion 'ATK_IS_OBJECT (accessible)' failed

(cawbird:1321853): Gtk-CRITICAL **: 15:53:12.739: gtk_accessible_get_widget: assertion 'GTK_IS_ACCESSIBLE (accessible)' failed

(cawbird:1321853): Atk-CRITICAL **: 15:53:12.749: atk_object_ref_state_set: assertion 'ATK_IS_OBJECT (accessible)' failed

(cawbird:1321853): Gtk-CRITICAL **: 15:53:12.749: gtk_accessible_get_widget: assertion 'GTK_IS_ACCESSIBLE (accessible)' failed

(cawbird:1321853): Atk-CRITICAL **: 15:53:12.758: atk_object_ref_state_set: assertion 'ATK_IS_OBJECT (accessible)' failed

(cawbird:1321853): Gtk-CRITICAL **: 15:53:12.758: gtk_accessible_get_widget: assertion 'GTK_IS_ACCESSIBLE (accessible)' failed

(cawbird:1321853): Atk-CRITICAL **: 15:53:12.767: atk_object_ref_state_set: assertion 'ATK_IS_OBJECT (accessible)' failed

(cawbird:1321853): Gtk-CRITICAL **: 15:53:12.767: gtk_accessible_get_widget: assertion 'GTK_IS_ACCESSIBLE (accessible)' failed

(cawbird:1321853): Atk-CRITICAL **: 15:53:12.777: atk_object_ref_state_set: assertion 'ATK_IS_OBJECT (accessible)' failed

(cawbird:1321853): Gtk-CRITICAL **: 15:53:12.777: gtk_accessible_get_widget: assertion 'GTK_IS_ACCESSIBLE (accessible)' failed

(cawbird:1321853): Atk-CRITICAL **: 15:53:12.787: atk_object_ref_state_set: assertion 'ATK_IS_OBJECT (accessible)' failed

(cawbird:1321853): Gtk-CRITICAL **: 15:53:12.787: gtk_accessible_get_widget: assertion 'GTK_IS_ACCESSIBLE (accessible)' failed

(cawbird:1321853): Atk-CRITICAL **: 15:53:12.797: atk_object_ref_state_set: assertion 'ATK_IS_OBJECT (accessible)' failed

(cawbird:1321853): Gtk-CRITICAL **: 15:53:12.797: gtk_accessible_get_widget: assertion 'GTK_IS_ACCESSIBLE (accessible)' failed

(cawbird:1321853): Atk-CRITICAL **: 15:53:12.807: atk_object_ref_state_set: assertion 'ATK_IS_OBJECT (accessible)' failed

(cawbird:1321853): Gtk-CRITICAL **: 15:53:12.807: gtk_accessible_get_widget: assertion 'GTK_IS_ACCESSIBLE (accessible)' failed

(cawbird:1321853): Atk-CRITICAL **: 15:53:12.815: atk_object_ref_state_set: assertion 'ATK_IS_OBJECT (accessible)' failed

(cawbird:1321853): Gtk-CRITICAL **: 15:53:12.816: gtk_accessible_get_widget: assertion 'GTK_IS_ACCESSIBLE (accessible)' failed

(cawbird:1321853): Atk-CRITICAL **: 15:53:12.825: atk_object_ref_state_set: assertion 'ATK_IS_OBJECT (accessible)' failed

(cawbird:1321853): Gtk-CRITICAL **: 15:53:12.826: gtk_accessible_get_widget: assertion 'GTK_IS_ACCESSIBLE (accessible)' failed

(cawbird:1321853): Atk-CRITICAL **: 15:53:12.836: atk_object_ref_state_set: assertion 'ATK_IS_OBJECT (accessible)' failed

(cawbird:1321853): Gtk-CRITICAL **: 15:53:12.836: gtk_accessible_get_widget: assertion 'GTK_IS_ACCESSIBLE (accessible)' failed

(cawbird:1321853): Atk-CRITICAL **: 15:53:12.849: atk_object_ref_state_set: assertion 'ATK_IS_OBJECT (accessible)' failed

(cawbird:1321853): Gtk-CRITICAL **: 15:53:12.849: gtk_accessible_get_widget: assertion 'GTK_IS_ACCESSIBLE (accessible)' failed

(cawbird:1321853): Atk-CRITICAL **: 15:53:12.858: atk_object_ref_state_set: assertion 'ATK_IS_OBJECT (accessible)' failed

(cawbird:1321853): Gtk-CRITICAL **: 15:53:12.858: gtk_accessible_get_widget: assertion 'GTK_IS_ACCESSIBLE (accessible)' failed

(cawbird:1321853): Atk-CRITICAL **: 15:53:12.867: atk_object_ref_state_set: assertion 'ATK_IS_OBJECT (accessible)' failed

(cawbird:1321853): Gtk-CRITICAL **: 15:53:12.867: gtk_accessible_get_widget: assertion 'GTK_IS_ACCESSIBLE (accessible)' failed

(cawbird:1321853): Atk-CRITICAL **: 15:53:12.877: atk_object_ref_state_set: assertion 'ATK_IS_OBJECT (accessible)' failed

(cawbird:1321853): Gtk-CRITICAL **: 15:53:12.877: gtk_accessible_get_widget: assertion 'GTK_IS_ACCESSIBLE (accessible)' failed

(cawbird:1321853): Atk-CRITICAL **: 15:53:12.886: atk_object_ref_state_set: assertion 'ATK_IS_OBJECT (accessible)' failed

(cawbird:1321853): Gtk-CRITICAL **: 15:53:12.886: gtk_accessible_get_widget: assertion 'GTK_IS_ACCESSIBLE (accessible)' failed

(cawbird:1321853): Atk-CRITICAL **: 15:53:12.894: atk_object_ref_state_set: assertion 'ATK_IS_OBJECT (accessible)' failed

(cawbird:1321853): Gtk-CRITICAL **: 15:53:12.894: gtk_accessible_get_widget: assertion 'GTK_IS_ACCESSIBLE (accessible)' failed

(cawbird:1321853): Atk-CRITICAL **: 15:53:12.902: atk_object_ref_state_set: assertion 'ATK_IS_OBJECT (accessible)' failed

(cawbird:1321853): Gtk-CRITICAL **: 15:53:12.902: gtk_accessible_get_widget: assertion 'GTK_IS_ACCESSIBLE (accessible)' failed

(cawbird:1321853): Atk-CRITICAL **: 15:53:12.905: atk_object_ref_state_set: assertion 'ATK_IS_OBJECT (accessible)' failed

(cawbird:1321853): Gtk-CRITICAL **: 15:53:12.905: gtk_accessible_get_widget: assertion 'GTK_IS_ACCESSIBLE (accessible)' failed

(cawbird:1321853): Atk-CRITICAL **: 15:53:12.919: atk_object_ref_state_set: assertion 'ATK_IS_OBJECT (accessible)' failed

(cawbird:1321853): Gtk-CRITICAL **: 15:53:12.919: gtk_accessible_get_widget: assertion 'GTK_IS_ACCESSIBLE (accessible)' failed

(cawbird:1321853): Atk-CRITICAL **: 15:53:12.930: atk_object_ref_state_set: assertion 'ATK_IS_OBJECT (accessible)' failed

(cawbird:1321853): Gtk-CRITICAL **: 15:53:12.930: gtk_accessible_get_widget: assertion 'GTK_IS_ACCESSIBLE (accessible)' failed

(cawbird:1321853): Atk-CRITICAL **: 15:53:12.940: atk_object_ref_state_set: assertion 'ATK_IS_OBJECT (accessible)' failed

(cawbird:1321853): Gtk-CRITICAL **: 15:53:12.940: gtk_accessible_get_widget: assertion 'GTK_IS_ACCESSIBLE (accessible)' failed

(cawbird:1321853): GLib-ERROR **: 15:53:18.880: ../../../glib/gmem.c:105: failed to allocate 18446744073709551382 bytes
Trappe pour point d'arrΓͺt et de trace

Activity

  1. IBBoard commented on Jul 20, 2021

    @IBBoard
    Owner
    (cawbird:1321853): GLib-ERROR **: 15:53:18.880: ../../../glib/gmem.c:105: failed to allocate 18446744073709551382 bytes
    

    Yeah, that would cause a crash! I'm assuming you don't have about ~18500 petabytes of RAM… πŸ™‚

    Is it always the first conversation that crashes? Or is it a conversation with a specific user? It might be that there's some bad JSON for one message.

    It would help if we could have a stack trace as well, but I'm trying to find some simple instructions for generating one.

  2. Nardol commented on Jul 21, 2021

    @Nardol
    Author

    Is it always the first conversation that crashes? Or is it a conversation with a specific user? It might be that there's some bad JSON for one message.

    After more testing, it is always the same conversation which crashes.

  3. IBBoard commented on Jul 21, 2021

    @IBBoard
    Owner

    Definitely some bad JSON, then. We'll need to get a stack trace so that I can work out where to add debugging so that I can identify the cause without needing to see any of your private DMs πŸ™‚

    It might take me a few days to get on to this, though. Sorry.

  4. IBBoard commented on Aug 7, 2021

    @IBBoard
    Owner

    Sorry for the delay. I've just looked again for simple ways to get a stack trace and they all involve a little bit of using specialist tools.

    If your using a systemd then you might be able to run coredumpctl dump -1 straight after a crash to dump the latest stack trace. Failing that, running coredumpctl debug -1 should get you into a debug mode where you can run bt full to print a full stack trace and then quit to exit.

    If you're not using systemd then you'll need to use gdb directly and run gdb /usr/bin/cawbird /path/to/coredump and then run bt full and quit.

    If you can't do either of those then I'm going to have to work out how to put in extra debugging without revealing sensitive details from the DMs, and then I'll have to build it into cawbird-unstable.

  5. Nardol commented on Aug 7, 2021

    @Nardol
    Author

    Thanks for your answer.
    I've just sent a dump to you privately.

  6. IBBoard commented on Aug 7, 2021

    @IBBoard
    Owner

    Thanks - I've had a look and it appears to be failing in the conversion of the JSON into formatted text with links (which is what I suspected, as it's where we've had problems before!).

    Unfortunately you've got an optimised build that hides some of the details, so I can't quite see all of the variables that I need to debug it from just the stack trace. entity_to=17 suggests that it's either trying to linkify your handle or it's taking the following text, but then it also says that the text for that range is /etc/localtime and last_end=233 which means it is further into the string. But last_end should always be based on entity_to, so it shouldn't be larger! Unless the entities are out of order for some reasons. But we already sort them when creating them.

    If I can have the raw JSON object then I should be able to find the issue. At a minimum I need the "entities":{…} block, because it's trying to allocate memory for something with bad parameters and trying to get too much RAM, or you could send the whole DM if you're happy for me to see all of the text.

    To get the JSON, you'll need sqlite3 and you'll need to know what your account database is (~/.config/cawbird/accounts/<some-number>.db - if you've only got one account set up then there should only be one of them). You can then run sqlite3 ~/.config/cawbird/accounts/<some-number>.db "SELECT message_json FROM dms WHERE text like 'Bonjour @Nardol61 %';" and it should dump the JSON to the command prompt.

    Alternatively, I can add a few bits of debug to find out what it's doing just before that and you'll need to build a new version (or use Cawbird-Unstable).

  7. Nardol commented on Aug 7, 2021

    @Nardol
    Author

    No problem for me if you see the message, i've just sent it to you.

  8. IBBoard commented on Aug 8, 2021

    @IBBoard
    Owner

    I don't know what the "/etc/localtime" string was in the debug output. But it turns out it was an easy fix and an obvious oversight πŸ™‚ Basically, we didn't sort entities for DMs, only for tweets, so if you had a mix of hashtags, @-mentions and URLs in a DM and they weren't accidentally in the right order for how we handle them then it would get negative values and crash.

    I'm surprised no-one has hit it before and reported it, but I guess people don't use hashtags much in DMs and presumably don't do @-mentions much either (at least not with URLs).

    I've put the patch up in Cawbird-Unstable and it's building for all platforms now.

  9. Nardol commented on Aug 8, 2021

    @Nardol
    Author

    I've just tested with Cawbird 1.4.1-1+105.1 and unfortunately, it is still crashing.
    Looking at the file modification date on the repository it looks like built with your last commit.

  10. IBBoard commented on Aug 11, 2021

    @IBBoard
    Owner

    That would be because there's a separate file for Deb packages that defines the patch to apply, and it was still commented out! I keep thinking that the Deb build magic does more magic than it actually does.

    It's building now and should be ready soon.

  11. Nardol commented on Aug 11, 2021

    @Nardol
    Author

    I've just tested and confirm the fix, thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions