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 461951 - Totem crashes when trying to play mp3 with 'wrong' encoding.
Totem crashes when trying to play mp3 with 'wrong' encoding.
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: GStreamer backend
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Maintainer alias for GStreamer component of Totem
Maintainer alias for GStreamer component of Totem
Depends on:
Blocks:
 
 
Reported: 2007-07-30 21:06 UTC by Filip Palm
Modified: 2007-08-15 11:25 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
m3u file (885 bytes, text/plain)
2007-07-30 21:28 UTC, Filip Palm
Details

Description Filip Palm 2007-07-30 21:06:04 UTC
As the summary says, here is the gdb output:

(gdb) run
Starting program: /usr/bin/totem 
Failed to read a valid object file image from memory.
[Thread debugging using libthread_db enabled]
[New Thread -1229474128 (LWP 12200)]
[New Thread -1264133232 (LWP 12210)]
[New Thread -1272861808 (LWP 12211)]
sh: jackd: not found
[Thread -1272861808 (LWP 12211) exited]
[New Thread -1272861808 (LWP 12274)]
[New Thread -1290388592 (LWP 12275)]
[New Thread -1298781296 (LWP 12276)]
[New Thread -1307174000 (LWP 12277)]
[New Thread -1330656368 (LWP 12279)]
[New Thread -1341129840 (LWP 12280)]
[Thread -1341129840 (LWP 12280) exited]
[Thread -1330656368 (LWP 12279) exited]
[Thread -1264133232 (LWP 12210) exited]
[Thread -1307174000 (LWP 12277) exited]
[Thread -1298781296 (LWP 12276) exited]
[Thread -1272861808 (LWP 12274) exited]

Program received signal SIGSEGV, Segmentation fault.

Thread NaN (LWP 12200)

  • #0 totem_uri_get_subtitle_uri
  • #1 totem_action_set_mrl_with_warning
  • #2 totem_action_set_mrl
  • #3 totem_action_set_mrl_and_play
  • #4 playlist_changed_cb
    at totem.c line 2066
  • #5 g_cclosure_marshal_VOID__VOID
    from /usr/lib/libgobject-2.0.so.0
  • #6 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #7 ??
    from /usr/lib/libgobject-2.0.so.0
  • #8 ??
  • #9 ??

Other information:
Ubuntu Gutsy Gibon, Gstreamer-CVS and Totem-SVN
Comment 1 Bastien Nocera 2007-07-30 21:13:34 UTC
Could you please attach or make the file available?
Comment 2 Filip Palm 2007-07-30 21:27:35 UTC
I just noticed that its not the mp3 that is the problem, its the playlist. 

If i drag the folder to Totem, Totem opens the playlist (m3u). If i then click on a entry with 'weird' encoding Totem crashes. Attaching the m3u file and putting the mp3s up on my webserver. (© issues) :)

Mp3s:
http://internethemsidan.se/Beach%20Party%20CD2/
Comment 3 Filip Palm 2007-07-30 21:28:09 UTC
Created attachment 92743 [details]
m3u file
Comment 4 Bastien Nocera 2007-07-31 15:36:05 UTC
You uploaded Beach Party CD2, where the crash occurred on CD1. I don't see anything wrong with the playlist either, it's getting parsed properly, though we don't seem to escape the filenames properly.

I'm pretty sure that if there is a problem, it's due to the filename, so please attach the file that made it crash in a tar file, so I can get the filename untouched.
Comment 5 Filip Palm 2007-07-31 22:25:59 UTC
Here you go:
http://www.internethemsidan.se/mp3-file.tar
Comment 6 Bastien Nocera 2007-08-01 12:54:27 UTC
Times out, I can't download.
Comment 7 Filip Palm 2007-08-09 07:44:41 UTC
Vacation in Spain for a week, up and running again.
Comment 8 Bastien Nocera 2007-08-09 13:36:57 UTC
I tried it, and I don't see any problems at all...

In gdb, once you have the backtrace, could you make it print:
subtitle
suffix
i
subtitle_ext[i]
Comment 9 Filip Palm 2007-08-09 18:32:15 UTC
I could if i knew how to do it :)

What shall i type into the gdb console?
Comment 10 Bastien Nocera 2007-08-09 18:37:18 UTC
frame 0
p subtitle
p suffix
etc.

(p being short for "print" :)
Comment 11 Filip Palm 2007-08-09 19:01:54 UTC
Did what you asked, with some combos because some of your instructions didn't work. Hope it helps.

(gdb) frame 0
  • #0 totem_uri_get_subtitle_uri
$1 = 0x0
(gdb) p suffix
$2 = <value optimized out>
(gdb) p i
No symbol "i" in current context.
(gdb) p subtitle_ext[i]
No symbol "i" in current context.
(gdb) p 1
$3 = 1
(gdb) p 3
$4 = 3
(gdb) p subtitle_ext
$5 = {"asc", "txt", "sub", "srt", "smi", "ssa"}
Comment 12 Bastien Nocera 2007-08-10 09:03:22 UTC
That's the code it's crashing in:
        subtitle = g_strdup_printf ("%.*s.???", suffix, uri);

        /* Search for any files with one of our known subtitle extensions */
        for (i = 0; i < G_N_ELEMENTS(subtitle_ext) ; i++) {
                memcpy (subtitle + suffix + 1, subtitle_ext[i], 3);

This means g_strdup_printf() fails (?!). I've added a warning in there. Could you please test against the current SVN and let me know if you still see the crash or just a warning?
Comment 13 Filip Palm 2007-08-10 09:43:16 UTC
(In reply to comment #12)
> That's the code it's crashing in:
>         subtitle = g_strdup_printf ("%.*s.???", suffix, uri);
> 
>         /* Search for any files with one of our known subtitle extensions */
>         for (i = 0; i < G_N_ELEMENTS(subtitle_ext) ; i++) {
>                 memcpy (subtitle + suffix + 1, subtitle_ext[i], 3);
> 
> This means g_strdup_printf() fails (?!). I've added a warning in there. Could
> you please test against the current SVN and let me know if you still see the
> crash or just a warning?
> 

Totem does not crash anymore BUT, it won't play the file. It says something like "An error has occurred
Could not find the location"


Gdb-output:
** (totem:32373): CRITICAL **: totem_uri_get_subtitle_uri: assertion `subtitle != NULL' failed
0:01:31.727034000 32373 0x809a470 ERROR                totem bacon-video-widget-gst-0.10.c:310:bvw_error_msg: message = Resursen kunde inte hittas.
0:01:31.727073000 32373 0x809a470 ERROR                totem bacon-video-widget-gst-0.10.c:312:bvw_error_msg: domain  = 2016 (gst-resource-error-quark)
0:01:31.727088000 32373 0x809a470 ERROR                totem bacon-video-widget-gst-0.10.c:313:bvw_error_msg: code    = 3
0:01:31.727099000 32373 0x809a470 ERROR                totem bacon-video-widget-gst-0.10.c:314:bvw_error_msg: debug   = gstfilesrc.c(971): gst_file_src_start (): /play/source:
No such file "/home/filip/Music/Beach Party (2007)/Beach Party CD1/04 - Tomas Ledin - En Dag P� Stranden.mp3"
0:01:31.727120000 32373 0x809a470 ERROR                totem bacon-video-widget-gst-0.10.c:315:bvw_error_msg: source  = <source>
0:01:31.727142000 32373 0x809a470 ERROR                totem bacon-video-widget-gst-0.10.c:316:bvw_error_msg: uri     = file:///home/filip/Music/Beach%20Party%20(2007)/Beach%20Party%20CD1/04 - Tomas Ledin - En Dag P� Stranden.mp3
** Message: Error: Resursen kunde inte hittas.
gstfilesrc.c(971): gst_file_src_start (): /play/source:
No such file "/home/filip/Music/Beach Party (2007)/Beach Party CD1/04 - Tomas Ledin - En Dag P\xe5 Stranden.mp3"
Comment 14 Bastien Nocera 2007-08-13 07:54:14 UTC
I don't know why it wouldn't copy the URI. There's also a bug in the playlist parser in that the m3u parser doesn't escape the lines it gets from the file.

Can you put the m3u file and the second mp3 up on a more reliable host, so that I can carry on testing?
Comment 15 Filip Palm 2007-08-14 11:42:36 UTC
(In reply to comment #14)
> I don't know why it wouldn't copy the URI. There's also a bug in the playlist
> parser in that the m3u parser doesn't escape the lines it gets from the file.
> 
> Can you put the m3u file and the second mp3 up on a more reliable host, so that
> I can carry on testing?
>
Here you go...

M3u file + the second mp3:
http://virkenstick.se/bugzilla/m3u+02.tar

M3u file + the first four mp3:
http://virkenstick.se/bugzilla/m3u+4mp3.tar
Comment 16 Bastien Nocera 2007-08-15 10:45:53 UTC
Fixed the "subtitle is NULL" problem.

2007-08-15  Bastien Nocera  <hadess@hadess.net>

        * src/totem-uri.c: (totem_uri_get_subtitle_uri): Remove
        the "%.*s" construct, it's completely broken with wide-characters
        and non-UTF8 ones
Comment 17 Bastien Nocera 2007-08-15 11:25:16 UTC
Fixed now.

However, your tarball contained the file with the UTF-8 encoding (so didn't match the ISO-8859-1 name given in the m3u).

The URI as in the M3U file:
file:///home/hadess/Music/non-utf8-test/04%20-%20Tomas%20Ledin%20-%20En%20Dag%20P%E5%20Stranden.mp3
The real URI that can be played from (DND from Nautilus):
file:///home/hadess/Music/non-utf8-test/04%20-%20Tomas%20Ledin%20-%20En%20Dag%20P%C3%A5%20Stranden.mp3

2007-08-15  Bastien Nocera  <hadess@hadess.net>

        * src/plparse/totem-pl-parser-lines.c:
        (totem_pl_parser_append_path), (totem_pl_parser_add_m3u):
        Escape the relative paths found in m3u files, as they're filenames
        not URIs (Closes: #461951)