[Bug 667103] New: discoverer.discover_uri() segfaults

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Sun Jan 1 12:15:09 PST 2012


https://bugzilla.gnome.org/show_bug.cgi?id=667103
  GStreamer | gst-plugins-base | 0.10.36

           Summary: discoverer.discover_uri() segfaults
    Classification: Platform
           Product: GStreamer
           Version: 0.10.36
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gst-plugins-base
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: sgringwe at mtu.edu
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


When making a call to discover_uri(), it will segfault once every ~1000 uris
(or so), and almost every time i try to import my 7000 song library. The code
and output is at http://pastebin.com/NSM2bcmR, or below:

importing /media/5A2813CC2813A653/Documents and Settings/Scott/Music/Better
Than Ezra/Deluxe/Coyote.flac
getting info..

(beatbox:20677): GStreamer-CRITICAL **: gst_value_init_and_copy: assertion
`G_IS_VALUE (src)' failed

(beatbox:20677): GStreamer-CRITICAL **: gst_value_init_and_copy: assertion
`G_IS_VALUE (src)' failed

(beatbox:20677): GStreamer-CRITICAL **: gst_value_init_and_copy: assertion
`G_IS_VALUE (src)' failed

(beatbox:20677): GStreamer-CRITICAL **: gst_value_init_and_copy: assertion
`G_IS_VALUE (src)' failed

(beatbox:20677): GStreamer-CRITICAL **: gst_value_init_and_copy: assertion
`G_IS_VALUE (src)' failed

(beatbox:20677): GStreamer-CRITICAL **: gst_value_init_and_copy: assertion
`G_IS_VALUE (src)' failed

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb31fdb70 (LWP 20702)]
0x008bd641 in g_type_check_value () from
/usr/lib/i386-linux-gnu/libgobject-2.0.so.0
(gdb) bt
#0  0x008bd641 in g_type_check_value () from
/usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#1  0x00a8d938 in gst_value_init_and_copy () from
/usr/lib/libgstreamer-0.10.so.0
#2  0x00a71fe8 in gst_structure_copy () from /usr/lib/libgstreamer-0.10.so.0
#3  0x00a72083 in ?? () from /usr/lib/libgstreamer-0.10.so.0
#4  0x008bdbc2 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#5  0x00893946 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#6  0x00a7101b in ?? () from /usr/lib/libgstreamer-0.10.so.0
#7  0x00a72887 in gst_structure_id_set () from /usr/lib/libgstreamer-0.10.so.0
#8  0x00c0ffde in ?? () from /usr/lib/libgstpbutils-0.10.so.0
#9  0x00c100f7 in ?? () from /usr/lib/libgstpbutils-0.10.so.0
#10 0x00c10055 in ?? () from /usr/lib/libgstpbutils-0.10.so.0
#11 0x00c1014b in ?? () from /usr/lib/libgstpbutils-0.10.so.0
#12 0x00c105b7 in ?? () from /usr/lib/libgstpbutils-0.10.so.0
#13 0x00c11629 in gst_discoverer_discover_uri () from
/usr/lib/libgstpbutils-0.10.so.0
#14 0x080915be in beat_box_file_operator_import_song ()
#15 0x0808fd8d in beat_box_file_operator_get_music_files ()
#16 0x0808ff21 in beat_box_file_operator_get_music_files ()
#17 0x0808ff21 in beat_box_file_operator_get_music_files ()
#18 0x080aec1e in beat_box_library_manager_set_music_thread_function ()
#19 0x080ae561 in
_beat_box_library_manager_set_music_thread_function_gthread_func ()
#20 0x0094d2df in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#21 0x00e06e99 in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#22 0x00eea73e in clone () from /lib/i386-linux-gnu/libc.so.6
(gdb)







public Song? import_song(GLib.File file) {
        Song s = new Song(file.get_path());
        stdout.printf("importing %s\n", file.get_path());
        DiscovererInfo info;

        try {
            stdout.printf("getting info..\n");
            info = disc.discover_uri(file.get_uri());
            stdout.printf("info recieved\n");
            if(info == null)
                return null;
        }
        catch(GLib.Error err) {
            stdout.printf("Could not read song's metadata\n");
            return null;
        }
        stdout.printf("import_song info fetched\n");
        unowned TagList tags = info.get_tags();
        stdout.printf("taglist set\n");
        if(info != null && tags != null) {
            try {
                string title, artist, album_artist, album, genre, comment,
lyrics;
                uint track, track_count, album_number, album_count, bitrate,
rating;
                double bpm;
                int64 duration;
                GLib.Date? date = new GLib.Date();
                stdout.printf("0\n");
                /* get title, artist, album artist, album, genre, comment,
lyrics strings */
                if(tags.get_string(TAG_TITLE, out title))
                    s.title = title;
                if(tags.get_string(TAG_ARTIST, out artist))
                    s.artist = artist;
                stdout.printf("a\n");
                if(tags.get_string(TAG_ALBUM_ARTIST, out album_artist))
                    s.album_artist = album_artist;
                else
                    s.album_artist = s.artist;
                stdout.printf("b\n");
                if(tags.get_string(TAG_ALBUM, out album))
                    s.album = album;
                if(tags.get_string(TAG_GENRE, out genre))
                    s.genre = genre;
                if(tags.get_string(TAG_COMMENT, out comment))
                    s.comment = comment;
                if(tags.get_string(TAG_LYRICS, out lyrics))
                    s.lyrics = lyrics;

                /* get the year */
                if(tags.get_date(TAG_DATE, out date)) {
                    if(date != null)
                        s.year = (int)date.get_year();
                }
                /* get track/album number/count, bitrating, rating, bpm */
                if(tags.get_uint(TAG_TRACK_NUMBER, out track))
                    s.track = (int)track;
                if(tags.get_uint(TAG_TRACK_COUNT, out track_count))
                    s.track_count = track_count;

                if(tags.get_uint(TAG_ALBUM_VOLUME_NUMBER, out album_number))
                    s.album_number = album_number;
                if(tags.get_uint(TAG_ALBUM_VOLUME_COUNT, out album_count))
                    s.album_count = album_count;

                if(tags.get_uint(TAG_BITRATE, out bitrate))
                    s.bitrate = (int)(bitrate/1000);
                if(tags.get_uint(TAG_USER_RATING, out rating))
                    s.rating = (int)((rating > 0 && rating <= 5) ? rating : 0);
                if(tags.get_double(TAG_BEATS_PER_MINUTE, out bpm))
                    s.bpm = (int)bpm;

                if(info.get_audio_streams().length() > 0)
                    s.samplerate =
info.get_audio_streams().nth_data(0).get_sample_rate();

                /* get length */
                s.length = info.get_duration()/1000000000;

                s.date_added = (int)time_t();
                stdout.printf("g\n");
                /* get the size and convert to MB */
                s.file_size = (int)(file.query_info("*",
FileQueryInfoFlags.NONE).get_size()/1000000);

            }
            finally {
                if(s.title == null || s.title == "") {
                    string[] paths = file.get_path().split("/", 0);
                    s.title = paths[paths.length - 1];
                }
                if(s.artist == null || s.artist == "") s.artist = "Unknown";
            }
        }
        else {
            return null;
        }

        return s;
    }

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- 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