unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* segfault: g_type_init() missing
@ 2011-07-24  4:32 Aaron Ecay
  2011-07-24  5:51 ` Jameson Graef Rollins
  0 siblings, 1 reply; 7+ messages in thread
From: Aaron Ecay @ 2011-07-24  4:32 UTC (permalink / raw)
  To: notmuch

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-09-10 18:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-24  4:32 segfault: g_type_init() missing Aaron Ecay
2011-07-24  5:51 ` Jameson Graef Rollins
2011-07-25 20:33   ` [PATCH] Add missing call to g_type_init() Aaron Ecay
2011-07-25 20:53     ` Jameson Graef Rollins
2011-07-25 23:38       ` Aaron Ecay
2011-07-26 17:57         ` Jameson Graef Rollins
2011-09-10 18:22         ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).