test suite is failing : elements_id3mux unit test fail and Received signal 11
elements_id3mux unit test failed when I run ptest for gstreamer-plugins-bad at gstreamer-1.20.1. this is the output from signal running the elements_id3mux unit. failed and Received signal 11.
sh-3.2# sh elements_id3mux.sh
+ CK_DEFAULT_TIMEOUT=20
+ GST_PLUGIN_LOADING_WHITELIST=gstreamer:gst-plugins-base:gst-plugins-good:gst-plugins-bad
+ GST_REGISTRY=/home/root/.cache/gst-plugins-bad/elements_id3mux.registry
+ GST_STATE_IGNORE_ELEMENTS=
+ exec /usr/libexec/installed-tests/gst-plugins-bad/elements_id3mux
Running suite(s): id3mux
50%: Checks: 2, Failures: 0, Errors: 1
../gst-plugins-bad-1.20.1/tests/check/elements/id3mux.c:500:E:general:test_id3mux_v2_3:0: (after this point) Received signal 11 (Segmentation fault)
Check suite id3mux ran in 4.528s (tests failed: 1)
I track where the issue occures, found when call "g_convert" return null at /tests/check/elements/id3mux.c. and I print the error message
diff --git a/tests/check/elements/id3mux.c b/tests/check/elements/id3mux.c
index 190aff406..0d477f487 100644
--- a/tests/check/elements/id3mux.c
+++ b/tests/check/elements/id3mux.c
@@ -148,9 +148,14 @@ utf_string_in_buf (GstBuffer * buf, const gchar * s, int v2version)
gint i, len;
gchar *free_str = NULL;
GstMapInfo map;
+ GError *error;
if (v2version == 3) {
- free_str = g_convert (s, -1, "UTF-16LE", "UTF-8", NULL, NULL, NULL);
+ free_str = g_convert (s, -1, "UTF-16LE", "UTF-8", NULL, NULL, &error);
+ if (free_str == NULL) {
+ GST_ERROR("convert failed: %s", error->message);
+ g_error_free (error);
+ }
s = free_str;
}
Final print the error: "Conversion from character set “UTF-8” to “UTF-16LE” is not supported.
sh-3.2# sh elements_id3mux.sh
+ CK_DEFAULT_TIMEOUT=20
+ GST_PLUGIN_LOADING_WHITELIST=gstreamer:gst-plugins-base:gst-plugins-good:gst-plugins-bad
+ GST_REGISTRY=/home/root/.cache/gst-plugins-bad/elements_id3mux.registry
+ GST_STATE_IGNORE_ELEMENTS=
+ exec /usr/libexec/installed-tests/gst-plugins-bad/elements_id3mux
Running suite(s): id3mux
Unexpected critical/warning: GError set over the top of a previous GError or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is NULL before it's set.
The overwriting error message was: Conversion from character set ?UTF-8? to ?UTF-16LE? is not supported
Stack trace:
/usr/lib64/libgstreamer-1.0.so.0(+0x7c43c) [0x7fa626c43c]
/usr/lib64/libgstcheck-1.0.so.0(+0xad98) [0x7fa5fdad98]
/usr/lib64/libglib-2.0.so.0(g_logv+0x238) [0x7fa606f4d8]
/usr/lib64/libglib-2.0.so.0(g_log+0x80) [0x7fa606f770]
/usr/lib64/libglib-2.0.so.0(g_set_error+0xbc) [0x7fa604e5c0]
/usr/lib64/libglib-2.0.so.0(g_convert+0xb8) [0x7fa60422c8]
/usr/libexec/installed-tests/gst-plugins-bad/elements_id3mux(+0x35b8) [0x55778c35b8]
/usr/libexec/installed-tests/gst-plugins-bad/elements_id3mux(+0x3cc4) [0x55778c3cc4]
/usr/libexec/installed-tests/gst-plugins-bad/elements_id3mux(+0x4584) [0x55778c4584]
/usr/lib64/libgstcheck-1.0.so.0(srunner_run_tagged+0x450) [0x7fa5fe93c0]
/usr/lib64/libgstcheck-1.0.so.0(gst_check_run_suite+0x70) [0x7fa5fdc4a0]
/usr/libexec/installed-tests/gst-plugins-bad/elements_id3mux(+0x2098) [0x55778c2098]
/lib64/libc.so.6(+0x2b230) [0x7fa5e4b230]
/lib64/libc.so.6(__libc_start_main+0x9c) [0x7fa5e4b30c]
/usr/libexec/installed-tests/gst-plugins-bad/elements_id3mux(+0x21f0) [0x55778c21f0]
50%: Checks: 2, Failures: 1, Errors: 0
../gstreamer-1.20.1/libs/gst/check/gstcheck.c:286:F:general:test_id3mux_v2_3:0: Unexpected critical/warning: GError set over the top of a previous GError or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is NULL before it's set.
The overwriting error message was: Conversion from character set “UTF-8” to “UTF-16LE” is not supported
Check suite id3mux ran in 4.179s (tests failed: 1)
I have two questions to ask:
1. should check if “free_str” is empty to avoid Received signal 11?
2. how to solve error "Conversion from character set “UTF-8” to “UTF-16LE”? is there any solution?
thanks for your reply.