From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 35962431FD0 for ; Sat, 23 Jul 2011 21:32:42 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QwmPAz4WGrzj for ; Sat, 23 Jul 2011 21:32:41 -0700 (PDT) Received: from mail-pz0-f41.google.com (mail-pz0-f41.google.com [209.85.210.41]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 6248A431FB6 for ; Sat, 23 Jul 2011 21:32:41 -0700 (PDT) Received: by pzk4 with SMTP id 4so6783797pzk.28 for ; Sat, 23 Jul 2011 21:32:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=MfH6BIHFNz3rdVOI8abq0gjxMc+K7NbbZilnXVewsyQ=; b=YKMVdDy2Nt1BJSmaHFTDZesA+57XZHG6dnnC99IDQxb/iIoJj9WIFM5ycTpg/d93jV PcuxxvwV7fQG39iBMRbZhZiRr4CwKdCFRgTlR91fhO4w2QkBWAd7W96ECsboKx8h+uKy ke2kPBWGGS+683tTjdVnGkezsiS2/Wg6rkCy8= MIME-Version: 1.0 Received: by 10.68.12.225 with SMTP id b1mr4920356pbc.116.1311481959990; Sat, 23 Jul 2011 21:32:39 -0700 (PDT) Received: by 10.68.48.3 with HTTP; Sat, 23 Jul 2011 21:32:39 -0700 (PDT) Date: Sun, 24 Jul 2011 00:32:39 -0400 Message-ID: Subject: segfault: g_type_init() missing From: Aaron Ecay To: notmuch@notmuchmail.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2011 04:32:42 -0000 Dear all, I just pulled the last couple weeks' worth of changes and rebuilt notmuch, only to have the new binary give a segfault on "notmuch new" (running on OS X.6). The error message printed was: (process:21821): GLib-GObject-CRITICAL **: gtype.c:2708: You forgot to call g_type_init() And the backtrace (from gdb): #0 0x000a18f7 in g_object_newv () #1 0x000160e4 in notmuch_filter_discard_uuencode_new () #2 0x000163f0 in _index_mime_part () #3 0x0001667a in _notmuch_message_index_file () #4 0x0001247c in notmuch_database_add_message () #5 0x000065a9 in add_files_recursive () #6 0x0000612c in add_files_recursive () #7 0x0000612c in add_files_recursive () #8 0x000071ec in notmuch_new_command () #9 0x00003a5a in main () According to the Glib docs (http://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#g-type-init), the g_type_init() function must be called before using any GType stuff, which notmuch_filter_discard_uuencode_new does. There are no grep hits for g_type_init in the notmuch sources, though. The code on the error path looks pretty old, so I'm not sure why this bug hasn't hit someone else before. Adding a call to g_type_init() to main() (right after g_mime_init(0)) fixes the problem. Aaron