GNOME Bugzilla – Bug 677002
get_content_type() out hash type needs to be annotated
Last modified: 2012-06-12 11:16:00 UTC
I get this error message ** (floaty-client:7058): CRITICAL **: Unsupported type void ** (floaty-client:7058): CRITICAL **: Unsupported type void Program received signal SIGBUS, Bus error. 0x00000000004211dd in PyObject_Hash ()
Can you please attach a small reproducer Python script or at least instructions how to reproduce this? Thanks!
from gi.repository import Soup session = Soup.SessionSync() message = Soup.Message.new('GET', 'http://ubuntu.com') session.send_message(message) print(message.response_headers.get_content_type())
Ultimately this is a Soup annotation bug. A pointer -> pointer hash table is not introspectable: <method name="get_content_type" [...] <parameter name="params" direction="out" caller-allocates="0" transfer-ownership="full" allow-none="1"> <doc xml:whitespace="preserve">return location for the Content-Type parameters (eg, "charset"), or %NULL</doc> <type name="GLib.HashTable" c:type="GHashTable**"> <type name="gpointer" c:type="gpointer"/> <type name="gpointer" c:type="gpointer"/> </type> </parameter> The documentation sounds like this should just be annotated with "(element-type utf8 utf8)".
For some reason, get_content_disposition() was properly annotated, but get_content_type() wasn't... Fixed now. Thanks