After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 783289 - gst_structure_from_string fails to parse some objects
gst_structure_from_string fails to parse some objects
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-05-31 15:21 UTC by George Kiagiadakis
Modified: 2017-06-01 10:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tests/gststructure: add unit test to verify deserialization of a stream-status message (2.44 KB, patch)
2017-05-31 15:21 UTC, George Kiagiadakis
none Details | Review

Description George Kiagiadakis 2017-05-31 15:21:44 UTC
Created attachment 352955 [details] [review]
tests/gststructure: add unit test to verify deserialization of a stream-status message

I came across this warning in some project and wrote a quick unit test to verify it's an upstream bug. I have not investigated it further yet.

The test case is basically this:
Take a new stream-status GstMessage, get its GstStructure, serialize it to a string, then try to parse this string back to a GstStructure.

Although the serialized string is ok (see the SERIALIZED line below), parsing it fails and shows a strange, corrupt string in the warning message

Running suite(s): GstStructure
SERIALIZED: GstMessageStreamStatus, type=(GstStreamStatusType)GST_STREAM_STATUS_TYPE_CREATE, owner=(GstElement)"\(GstBin\)\ element1", object=(GstTask)"\(GstTask\)\ task0";
0:00:00.002331102 12023 0x564706dfc320 WARN               structure gststructure.c:1967:gst_structure_parse_field: failed to parse value owner=(GstElement)(GstBin) element1ent1", object=(GstTask)"\(GstTask\)\ task0";
0:00:00.002404953 12023 0x564706dfc320 WARN               structure gststructure.c:2035:priv_gst_structure_parse_fields: Failed to parse field, r=owner=(GstElement)(GstBin) element1ent1", object=(GstTask)"\(GstTask\)\ task0";
0%: Checks: 1, Failures: 1, Errors: 0
gst/gststructure.c:357:F:general:test_to_from_string_stream_status_message:0: Assertion 'st2 != NULL' failed
Comment 1 Olivier Crête 2017-05-31 15:29:07 UTC
It's not really serializing the GstElement or GstTask, as they're cmplex objects. It's just a debugging tool in that case. So it can't be parsed back into a valid stream-status message.
Comment 2 George Kiagiadakis 2017-06-01 10:37:20 UTC
It sure doesn't make sense to deserialize objects, but imho it shouldn't fail like that. It could maybe warn about being unable to deserialize objects and null them out or something. This error clearly shows some corruption in the parser.

But I guess it's a minor issue...