Does this work in C? It seems like such
a trivial program with what should be fairly trivial bindings that
I can't understand how this would fail.
Jeff On 7/7/2016 3:42 PM, Daniel Kahn Gillmor wrote: Hi GMime folks-- I'm trying to use GMime via GObject introspection in python. here's what should be a simple example (it assumes that "example.eml" holds an rfc822 message): ---------- #/usr/bin/env python3 import gi gi.require_version('GMime', '2.6') >From gi.repository import GMime f = GMime.StreamFile.new_for_path('example.eml', 'r') parser = GMime.Parser.new_with_stream(f) msg = parser.construct_message() ---------- however, when i run it, the last line segfaults: 0 dkg@alice:~$ python3 ./example.py ./example.py:14: Warning: g_hash_table_lookup: assertion 'hash_table != NULL' failed msg = parser.construct_message() (process:32252): gmime-CRITICAL **: g_mime_object_append_header: assertion 'GMIME_IS_OBJECT (object)' failed Segmentation fault 139 dkg@alice:~$ Am i doing something wrong here? Are the GObject bindings somehow broken? --dkg
|