[gstreamer-bugs] [Bug 542508] New: A stress test exits with Segmentation Fault
GStreamer (bugzilla.gnome.org)
bugzilla-daemon at bugzilla.gnome.org
Fri Jul 11 04:10:22 PDT 2008
If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
http://bugzilla.gnome.org/show_bug.cgi?id=542508
GStreamer | gst-plugins-base | Ver: 0.10.14
Summary: A stress test exits with Segmentation Fault
Product: GStreamer
Version: 0.10.14
Platform: Other
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: gst-plugins-base
AssignedTo: gstreamer-bugs at lists.sourceforge.net
ReportedBy: kirill.kirichenko at gmail.com
QAContact: gstreamer-bugs at lists.sourceforge.net
GNOME version: 2.19/2.20
GNOME milestone: Unspecified
The simple stress test attached below fails with Segmentation Fault after 73-rd
pass on my machine. The main purpose of the test is to testify a function that
checks if the current user configuration is able to play a file.
Unfortunately I can't attach the media files, but I'm sure you can find some
with the same format at your testing desktop. Sometimes crashes happen during
another passes.
More system info:
$ uname -a
Linux dungeon 2.6.22-gentoo-r5 #7 SMP Tue Nov 20 16:58:52 MSK 2007 i686
Intel(R) Pentium(R) 4 CPU 3.20GHz GenuineIntel GNU/Linux
$ gst-inspect-0.10 --version
gst-inspect-0.10 version 0.10.14
GStreamer 0.10.14
http://www.gentoo.org
Available plugins & versions:
media-libs/gst-plugins-base 0.10.14
media-libs/gst-plugins-good 0.10.6
media-libs/gst-plugins-ugly 0.10.6
media-plugins/gst-plugins-a52dec 0.10.6
media-plugins/gst-plugins-alsa 0.10.14
media-plugins/gst-plugins-cdparanoia 0.10.14
media-plugins/gst-plugins-dvdread 0.10.6
media-plugins/gst-plugins-esd 0.10.6
media-plugins/gst-plugins-faad 0.10.5
media-plugins/gst-plugins-ffmpeg 0.10.2
media-plugins/gst-plugins-gnomevfs 0.10.14
media-plugins/gst-plugins-jpeg 0.10.6
media-plugins/gst-plugins-lame 0.10.6
media-plugins/gst-plugins-libpng 0.10.6
media-plugins/gst-plugins-libvisual 0.10.14
media-plugins/gst-plugins-mad 0.10.6
media-plugins/gst-plugins-mpeg2dec 0.10.6
media-plugins/gst-plugins-musepackn 0.10.5
media-plugins/gst-plugins-ogg 0.10.14
media-plugins/gst-plugins-pango 0.10.14
media-plugins/gst-plugins-taglib 0.10.6
media-plugins/gst-plugins-theora 0.10.14
media-plugins/gst-plugins-vorbis 0.10.14
media-plugins/gst-plugins-x 0.10.14
media-plugins/gst-plugins-xvideo 0.10.14
The test:
[code]
#include <gst/gst.h>
gchar* uri[] = {
"file:///home/kirill/media/16b_mn_11_04.wav",
"file:///home/kirill/media/18.swf",
"file:///home/kirill/media/andymail.wav",
"file:///home/kirill/media/BlackPearl.flv",
"file:///home/kirill/media/california-love.mp3",
"file:///home/kirill/media/ChromeNetshow.wma",
"file:///home/kirill/media/CLOCKTXT.avi",
"file:///home/kirill/media/ColdHardBitch-short.ogg",
"file:///home/kirill/media/container_ship.mp4",
"file:///home/kirill/media/copycd.wmv",
"file:///home/kirill/media/CoralReefSample.wmv",
"file:///home/kirill/media/crazy-frog.swf",
"file:///home/kirill/media/demo.asf",
"file:///home/kirill/media/duck-jibe.ogg",
"file:///home/kirill/media/FoxNews_1Mbps.mp4",
"file:///home/kirill/media/Ice-Age-2-short.mov",
"file:///home/kirill/media/intro.wmv",
"file:///home/kirill/media/island.mid",
"file:///home/kirill/media/java_logo.png",
"file:///home/kirill/media/kickass_av.ogg",
"file:///home/kirill/media/kickass_v.mpg",
"file:///home/kirill/media/mdlib.wmv",
"file:///home/kirill/media/movie.avi",
"file:///home/kirill/media/mp.avi",
"file:///home/kirill/media/pause.jpg",
"file:///home/kirill/media/play.jpg",
"file:///home/kirill/media/rideon2.ogg",
"file:///home/kirill/media/run.mp2",
"file:///home/kirill/media/sail-first-jibe.ogg",
"file:///home/kirill/media/snowman.avi",
"file:///home/kirill/media/stop.jpg",
"file:///home/kirill/media/test.swf",
"file:///home/kirill/media/veronika.wav",
"file:///home/kirill/media/Windsurfing-320x240-15fps.ogg",
"file:///home/kirill/media/windsurfing-short.mov",
"http://ware.catv.ext.ru:8000/moscowecho48.mp3",
// Shouldn't play
"file:///home/kirill/GStreamer/canplay", // URI to this binary
NULL
};
/***********************************************************************************
* Bus watch callback
***********************************************************************************/
static GMainLoop *loop;
static GstElement *playbin;
static gboolean result;
static gboolean bus_call (GstBus *bus, GstMessage *msg, gpointer data)
{
switch (GST_MESSAGE_TYPE (msg))
{
case GST_MESSAGE_EOS:
{
result = TRUE;
g_main_loop_quit (loop);
break;
}
case GST_MESSAGE_ERROR:
{
result = FALSE;
g_main_loop_quit (loop);
break;
}
case GST_MESSAGE_STATE_CHANGED:
{
GstState old_state, new_state;
gst_message_parse_state_changed (msg, &old_state, &new_state,
NULL);
if (GST_MESSAGE_SRC (msg) == GST_OBJECT (playbin) &&
old_state == GST_STATE_PAUSED && new_state ==
GST_STATE_PLAYING)
{
result = TRUE;
g_main_loop_quit (loop);
break;
}
}
default:
break;
}
return TRUE;
}
static gboolean can_play(const gchar* uri)
{
loop = g_main_loop_new(NULL, FALSE);
playbin = gst_element_factory_make ("playbin", NULL);
g_object_set (G_OBJECT (playbin), "uri", uri, NULL);
GstBus *bus = gst_pipeline_get_bus (GST_PIPELINE (playbin));
gst_bus_add_watch(bus, (GstBusFunc)bus_call, NULL);
gst_object_unref (bus);
g_object_set(playbin,
"video-sink", gst_element_factory_make ("fakesink", NULL),
"audio-sink", gst_element_factory_make ("fakesink", NULL),
NULL);
result = FALSE;
gst_element_set_state (playbin, GST_STATE_PLAYING);
g_main_loop_run(loop);
gst_element_set_state (playbin, GST_STATE_NULL);
gst_object_unref(playbin);
g_main_loop_unref(loop);
return result;
}
int main (int argc, char *argv[])
{
if (!g_thread_supported ())
g_thread_init(NULL);
gboolean do_functional = FALSE;
gint stress_amount = 0;
GOptionEntry entries[] =
{
{ "functional", 'f', 0, G_OPTION_ARG_NONE, &do_functional, "perform
functional test", NULL },
{ "stress", 's', 0, G_OPTION_ARG_INT, &stress_amount, "perform
stress test with N stress factor", "N" },
{ NULL }
};
GOptionContext *context = g_option_context_new("[URI] - find type of the
file");
g_option_context_add_main_entries (context, entries, NULL);
g_option_context_add_group (context, gst_init_get_option_group ());
GError *error = NULL;
if (g_option_context_parse (context, &argc, &argv, &error))
{
/*********************************************************************************
* process arguments
*********************************************************************************/
if (argc == 2 && gst_uri_is_valid(argv[1]))
g_print("%s - %s\n", argv[1], can_play(argv[1]) ? "TRUE" :
"FALSE");
if (do_functional)
{
g_print("****************************************************************\n");
g_print("*************** PERFORMING FUNCTIONAL TEST
****************\n");
g_print("****************************************************************\n");
int uri_size = g_strv_length(uri);
int u_idx;
for (u_idx = 0; u_idx < uri_size; u_idx++)
g_print("%s - %s\n", uri[u_idx], can_play(uri[u_idx]) ? "TRUE"
: "FALSE");
}
if (stress_amount > 0)
{
g_print("****************************************************************\n");
g_print("***************** PERFORMING STRESS TEST
******************\n");
g_print("****************************************************************\n");
int uri_size = g_strv_length(uri);
int p_idx, u_idx;
for (p_idx = 0; p_idx < stress_amount; p_idx++)
{
g_print("#### Performing %i-th pass ####\n", p_idx);
for (u_idx = 0; u_idx < uri_size; u_idx++)
g_print("%s - %s\n", uri[u_idx], can_play(uri[u_idx]) ?
"TRUE" : "FALSE");
}
}
}
else
{
g_print ("option parsing failed: %s\n", error->message);
return 1;
}
return 0;
}
[/code]
--
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.
You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=542508.
More information about the Gstreamer-bugs
mailing list