Geary crashes after startup, while loading an email with the body missing
Bug Summary
Geary does start up on my device, but after a while of loading messages, it eventually crashes. This seems to have been exacerbated by me setting the "download everything" option in the settings.
It prints the following messages on stdout/stderr:
(WebKitWebProcess:17455): Atk-CRITICAL **: 19:59:07.973: atk_state_set_contains_state: assertion 'ATK_IS_STATE_SET (set)' failed
(WebKitWebProcess:17455): GLib-GObject-CRITICAL **: 19:59:07.973: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
(WebKitWebProcess:17455): Atk-CRITICAL **: 19:59:07.973: atk_state_set_contains_state: assertion 'ATK_IS_STATE_SET (set)' failed
(WebKitWebProcess:17455): GLib-GObject-CRITICAL **: 19:59:07.973: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
(WebKitWebProcess:17455): Atk-CRITICAL **: 19:59:07.983: atk_state_set_contains_state: assertion 'ATK_IS_STATE_SET (set)' failed
(WebKitWebProcess:17455): GLib-GObject-CRITICAL **: 19:59:07.983: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
(WebKitWebProcess:17455): Atk-CRITICAL **: 19:59:07.983: atk_state_set_contains_state: assertion 'ATK_IS_STATE_SET (set)' failed
(WebKitWebProcess:17455): GLib-GObject-CRITICAL **: 19:59:07.983: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
![crt] 19:59:19.0099 GLib:Did not see expected message GLib-GObject-WARNING **: g_object_weak_unref: couldn't find weak ref *
![crt] 19:59:19.0100 gmime:g_mime_stream_mem_new_with_buffer: assertion 'buffer != NULL' failed
From the bit of debugging I did, it appears that in the if (body_specifier != null) {
block of Geary.Email fetched_data_to_email
in the src/engine/imap/api/imap-folder-session.vala
file, within the email.get_message()
call, it tries to access the body field of the email structure, but the attached GBytes array seems to be empty (the g_bytes_get_data()
call in geary_rf_c822_message_construct_from_part()
[Message.from_parts(Header header, Text body)
in src/engine/rfc822/rfc822-message.vala
] on the return value of geary_memory_buffer_get_bytes()
yields NULL with a 0 size), which then causes a != NULL assertion fault most likely within the stream_cat.add_source(new GMime.StreamMem.with_buffer(body.buffer.get_bytes().get_data()));
call in Message.from_parts()
.
Unfortunately, I have zero experience with Vala (this is my first exposure to it), so I don't really know how to continue with this hunt - figuring out why the body is empty, whether or not it's expected/allowed, etc. If anyone has suggestions on how I may be able to extract other useful information, I'd be eager to try it out.
Your installation
The device is a Pine64 Pinephone running PostmarketOS v20.05, with Geray 3.38.0.1 with Purism's mobile UI patches: https://source.puri.sm/Librem5/geary/-/tree/dd971251d7fd85c7b73f2e153beef9939354cec7
- Geary version: 3.38.0.1-3pureos+librem5+byz1
- Installation method: apk (Alpine Package Keeper)
- Desktop environment: phosh
- Operating system and version: PostmarketOS v20.05
- Email provider: GMX, Gmail, and faculty/school email
Steps to reproduce
- Have an email in your inbox which is missing the body.
- Start the application.
- Observe how the UI shows up, together with a preview of emails from the 1st account's inbox.
- Observe how the window disappears as Geary crashes.