This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Crash when opening a Direct message conversationΒ #391
Copy link
Copy link
Closed
Description
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:
- Go to 'Direct messages'
- Click on the first conversation of the list
- 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 traceMetadata
Metadata
Assignees
Labels
No labels
Activity
IBBoard commentedon Jul 20, 2021
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.
Nardol commentedon Jul 21, 2021
After more testing, it is always the same conversation which crashes.
IBBoard commentedon Jul 21, 2021
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.
IBBoard commentedon Aug 7, 2021
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 -1straight after a crash to dump the latest stack trace. Failing that, runningcoredumpctl debug -1should get you into a debug mode where you can runbt fullto print a full stack trace and thenquitto exit.If you're not using systemd then you'll need to use gdb directly and run
gdb /usr/bin/cawbird /path/to/coredumpand then runbt fullandquit.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.
Nardol commentedon Aug 7, 2021
Thanks for your answer.
I've just sent a dump to you privately.
IBBoard commentedon Aug 7, 2021
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=17suggests 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/localtimeandlast_end=233which means it is further into the string. Butlast_endshould always be based onentity_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
sqlite3and 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 runsqlite3 ~/.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).
Nardol commentedon Aug 7, 2021
No problem for me if you see the message, i've just sent it to you.
IBBoard commentedon Aug 8, 2021
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.
Nardol commentedon Aug 8, 2021
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.
IBBoard commentedon Aug 11, 2021
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.
Nardol commentedon Aug 11, 2021
I've just tested and confirm the fix, thanks a lot!