codegen crashes when input file contains paths with spaces

187 views
Skip to first unread message

perqa

unread,
Aug 11, 2011, 9:07:45 AM8/11/11
to echoprint
There seems to be a problem for codegen using paths with spaces IF
they are read from an input file. If I try the same paths one by one,
they work fine.

===== Working Examples ======
echoprint-codegen "/Users/per/Music/iTunes/iTunes Music/Compilations/
Yes, I Do Like Night Bus/17 Angel in Disguise [Fantastic Mr. Fox
Remix].mp3" 10 30

echoprint-codegen "/Users/per/Music/iTunes/iTunes Music/Compilations/
Yes, I Do Like Night Bus/03 Fireworks [Slo Mo House Edit].mp3" 10 30
==========================

However, if you put these two paths in a file named Music_2quoted.m3u
and run
echoprint-codegen -s 10 30 < Music_2quoted.m3u
you get Segmentation fault

==== Crashinging Example ======
echoprint-codegen -s 10 30 < Music_2quoted.m3u
[
{"error":"could not decode", "tag":0, "metadata":{"filename":"\"/Users/
per/Music/iTunes/iTunes Music/Compilations/Yes, I Do Like Night Bus/17
Angel in Disguise [Fantastic Mr. Fox Remix].mp3\""}},
Segmentation fault
============================

I have tried with and without single and double qoutes as well as
escaping (with backslash) all relevant characters, like space, comma,
square brackets etc.

Has anyone else experienced the same problem? Is there an easy
workaround that I'm missing?

All the Best,
Per Q A

Alastair Porter

unread,
Aug 11, 2011, 9:14:15 AM8/11/11
to echo...@googlegroups.com
Looking at your specific cases, I see that there are [ and ] characters in each of these names. These are both escaping characters in bash. What if you try a list of files without these characters in them? I'll put this on the list to check for.

Alastair

Alastair Porter

unread,
Aug 11, 2011, 11:09:28 AM8/11/11
to echo...@googlegroups.com
Can you please run this in a debugger?
Update the Makefile and uncomment the line "OPTFLAGS=-g -O0" (and comment out the other OPTFLAGS line), then recompile and get a stacktrace from gdb. Let me know if you don't know how to use gdb.

Thanks,
Alastair

On Thu, Aug 11, 2011 at 9:07 AM, perqa <p...@plusfoursix.com> wrote:

Miguel Ángel Pérez Serrano

unread,
Aug 12, 2011, 4:38:43 AM8/12/11
to echo...@googlegroups.com
I have the same problem.

harsh naraini

unread,
Aug 12, 2011, 5:14:57 AM8/12/11
to echo...@googlegroups.com
If you get any solution please do let me know.

2011/8/12 Miguel Ángel Pérez Serrano <perezse...@gmail.com>
I have the same problem.

Alastair Porter

unread,
Aug 16, 2011, 12:24:31 PM8/16/11
to echo...@googlegroups.com
I think this may have been related to the other segfault issue. Can you try again? Note that the "could not decode" error occurs when ffmpeg cannot decode the file, rather than an issue with the codegen.

Alastair

On Thu, Aug 11, 2011 at 9:07 AM, perqa <p...@plusfoursix.com> wrote:

Miguel Ángel Pérez Serrano

unread,
Aug 19, 2011, 4:30:24 AM8/19/11
to echoprint
I think the problem was that my mp3's path had UTF-8 characters. I
moved them to other folder and worked fine. Try it :)

On 12 ago, 11:14, harsh naraini <exploreha...@gmail.com> wrote:
> If you get any solution please do let me know.
>
> 2011/8/12 Miguel Ángel Pérez Serrano <perezserran...@gmail.com>

Alastair Porter

unread,
Aug 22, 2011, 9:29:40 AM8/22/11
to echo...@googlegroups.com
Thanks for  finding the cause of this issue. We'll update the codegen to support utf-8

Alastair

2011/8/19 Miguel Ángel Pérez Serrano <perezse...@gmail.com>

Alastair Porter

unread,
Aug 24, 2011, 9:55:11 AM8/24/11
to echo...@googlegroups.com
Hi Miguel,
Can you send an example of a UTF-8 filename that fails for you? I have tried the current codegen with varying filenames and have no issue.

Thanks,
Alastair

2011/8/19 Miguel Ángel Pérez Serrano <perezse...@gmail.com>

Jeroen De Swaef

unread,
Apr 21, 2014, 11:53:48 AM4/21/14
to echo...@googlegroups.com
I had the same problem. It had nothing to do with file spaces, but with the fact that the ffmeg package was not installed.

apt-get install ffmpeg

resolved the issue
Reply all
Reply to author
Forward
0 new messages