Quoth David Bremner on Mar 01 at 5:39 pm: > > In the current master (4fa77d031) I get a sort-of double crash on the > attached message. > > The internal error on line 296 is reached, indicating some kind of bug, > but then the G_OBJECT_TYPE crashes becase parent->part is null. > > The message is probably crap, I created it from another "real" message > from some business that causes the same problem. > > (gdb) bt > #0 0x0000000000416850 in mime_node_child (parent=0x8425fa0, child=0) > at mime-node.c:296 > #1 0x00000000004137f1 in format_part_json (ctx=0x8425f10, node=0x8425fa0, > first=1) at notmuch-show.c:669 > #2 0x0000000000413e54 in format_part_json_entry (ctx=0x8425f10, > node=0x8425fa0, indent=0, params=0x7ff000470) at notmuch-show.c:758 > #3 0x0000000000413f0f in show_message (ctx=0x8367680, format=0x6327e0, message= > 0x83e9830, indent=0, params=0x7ff000470) at notmuch-show.c:776 > #4 0x0000000000414165 in show_messages (ctx=0x8367680, format=0x6327e0, > messages=0x8425e70, indent=0, params=0x7ff000470) at notmuch-show.c:835 > #5 0x00000000004145f5 in do_show (ctx=0x8367680, query=0x83b36b0, > format=0x6327e0, params=0x7ff000470) at notmuch-show.c:956 > #6 0x0000000000414ba7 in notmuch_show_command (ctx=0x8367680, argc=3, > argv=0x7ff000660) at notmuch-show.c:1089 > #7 0x000000000040a9fe in main (argc=4, argv=0x7ff000658) at notmuch.c:294 > (gdb) print *parent > $3 = {part = 0x0, envelope_file = 0x83e9830, envelope_part = 0x0, > nchildren = 1, parent = 0x0, part_num = 0, decrypt_attempted = 0, > decrypt_success = 0, verify_attempted = 0, sig_list = 0x0, ctx = 0x8426090, > decrypted_child = 0x0, next_child = 0, next_part_num = 1} For the record, this is because g_mime_parser_construct_message in mime_node_open is returning NULL. mime_node_open should be checking for this as well as errors from the other GMime functions it calls. (Unfortunately, there appears to be no way to ask GMime *what* went wrong; it just returns NULL.)