[Bug 765251] Trying to set string on structure field 'debug', but string is not valid UTF-8

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Sat Apr 23 12:45:30 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=765251

--- Comment #4 from Tim-Philipp Müller <t.i.m at zen.co.uk> ---
Not quite sure what's going on here.

So the debug string comes from the GError error->message in gstudpsrc.c:

bind_error:
  {
    GST_ELEMENT_ERROR (src, RESOURCE, SETTINGS, (NULL),
        ("bind failed: %s", err->message));
    g_clear_error (&err);
    ...
  }

which should be UTF-8. The error message in turn comes from glib/gio/gsocket.c

  if (bind (socket->priv->fd, ... ) < 0)
    {
      int errsv = get_socket_errno ();
      g_set_error (error,
           G_IO_ERROR, socket_io_error_from_errno (errsv),
           _("Error binding to address: %s"), socket_strerror (errsv));
      return FALSE;
    }

which looks ok so far. The garbled string is the socket_strerror(errsv) part if
I'm not mistaken. This, however, just maps to g_strerror() or non-Windows
systems, which should also return UTF-8 ("Unlike strerror(), this always
returns a string in UTF-8 encoding, and the pointer is guaranteed to remain
valid for the lifetime of the process.").

So not quite sure what's going on here, bug in g_strerror() seems unlikely.

Is this reproducable every time or does it only happen every now and then?

Is it also reproducable with a minimal pipeline? (like udpsrc .. ! fakesink)

Could you run this through valgrind perhaps? Or step through g_strerror in a
debugger to see what's going on?

In any case, I don't think the bug is in GStreamer.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list