Gio.Resolver() segfaults on Windows
GLib 2.58.0
System: Windows 7 x64
The Resolver segfaults if the result of a query yields nothing or is invalid. I cannot provide a stack trace so here is a example to reproduce
Minimal Example:
from gi.repository import Gio, GLib, Gtk
valid_srv_records = '_xmpp-client._tcp.jabber.org'
no_srv_records = 'asdasdasd'
def _on_ready_srv(source_object, result):
try:
variant_results = source_object.lookup_records_finish(result)
print(variant_results)
except GLib.Error as e:
if e.domain == 'g-resolver-error-quark':
print("Could not resolve host:", e.message)
else:
raise
Gtk.main_quit()
gio_resolver = Gio.Resolver.get_default()
gio_resolver.lookup_records_async(
valid_srv_records, Gio.ResolverRecordType.SRV, None, _on_ready_srv)
gio_resolver.lookup_records_async(
no_srv_records, Gio.ResolverRecordType.SRV, None, _on_ready_srv)
Gtk.main()