Malformed Layout1


I can only start mocp when i put the following in my config:

Layout1 = "directory:0,0,100%,100% playlist:0,0,100%,100%"
Layout2 = "directory:0,0,50%,100% playlist:50%,0,50%,100%"

If i don't do i can't start due to "malformed layout1"

moc 2.4.2 Build: Jul 10 2007 14:50:18
Compiled with: OSS ALSA internet streams

maybe there is Layout1 option defined somwhere else in the config? What if you completly remove the configuration file?

Damian Pietras - MOC developer

I removed the config file, but no change.

The only difference between this entry and the default is that you don't use the FILL parameter. What is yout terminal and it's size (please show output of echo $COLUMNS $LINES on this terminal).

Damian Pietras - MOC developer

I'm experiencing the same behavior as the OP. I didn't have a config file at all. Creating ~/.moc/config with the Layout1/2-lines made "mocp" start up. I'm using Gentoo linux and have installed "moc" version 2.4.2.

My terminal (which is an ssh-session) reports:
125 34

WithOUT .moc/config there is:
$ mocp

FATAL_ERROR: Layout1 is malformed


So, what's wrong?

I use too Gentoo and MOC 2.42!

stephan@unimatrix ~ $ echo $COLUMNS $LINES
182 64

TERM: rxvt-unicode

rxvt-unicode (urxvt) v8.2 - released: 2007-02-17

stephan@unimatrix ~ $ bash --version
GNU bash, version 3.2.15(1)-release (i686-pc-linux-gnu)
Copyright (C) 2005 Free Software Foundation, Inc.

Charset: Utf8

Can someone having this problem apply the patch, run mocp -D and paste the mocp_client_log?

I hope this will show the place when MOC thinks something is wrong because I still cannot reproduce this using he same terminal and the same terminal size.

Damian Pietras - MOC developer

I don't think it does depend upon the terminal size, because i can reproduce it with various terminals and terminal sizes!

Maybe, but I can't reproduce it so I'm asking to use the patch I've sent that in addition to this error message logs where MOC thinks the layout is wrong.

Damian Pietras - MOC developer

downloaded compiled lastunstable version

Aug 9 22:00:42.378436: interface.c:1395 init_interface(): Starting MOC interface...
Aug 9 22:00:42.378699: utf8.c:337 utf8_init(): Using US-ASCII conversion - compiled without libncursesw
Aug 9 22:00:42.379157: interface_elements.c:817 parse_layout(): Coordinate parse error when parsing height
Aug 9 22:00:42.379187: interface.c:3376 interface_fatal(): FATAL ERROR: Layout1 is malformed
Aug 9 22:00:42.379348: common.c:58 fatal(): FATAL ERROR: Layout1 is malformed

mocp started ok, but was able play only mp4 files, so I've checked, downloaded a lot of libraries throught and without apt. recompiled and now its ok -)

I can't reproduce it on my system, I'll try rxvt. Unfortunately this message doesn't specify exactly what's wrong (there will be nothing in logs even).

Damian Pietras - MOC developer

I tried Xterm but no change, maybe it depends on

okay i will try

I started getting this problem after updating my system to the latest Debian Lenny - including updates to and all the xserver stuff.

I was going to try the patch, so I downloaded and compiled from source: but it doesn't have the same problem!

$ /usr/bin/mocp --version # this one has layout error
moc 2.5.0-alpha3 Build: Jun 6 2008 20:21:24
Compiled with: OSS ALSA JACK DEBUG internet streams resample

$ /usr/local/bin/mocp --version # this one does not...
moc 2.5.0-alpha3 Build: Jun 24 2008 18:53:43
Compiled with: OSS DEBUG

Try the following patch:

Index: options.c<br /> ===================================================================<br /> --- options.c.orig 2008-06-21 02:26:36.000000000 +0200<br /> +++ options.c 2008-06-21 02:26:59.000000000 +0200<br /> @@ -205,7 +205,7 @@<br /> option_add_int ("TagsCacheSize", 256);<br /> option_add_int ("PlaylistNumbering", 1);<br /> option_add_str ("Layout1",<br /> - "directory:0,0,50%,100% playlist:50%,0,FILL,100%");<br /> + "directory:0,0,50%,100% playlist:50%,0,50%,100%");<br /> option_add_str ("Layout2",<br /> "directory:0,0,100%,100% playlist:0,0,100%,100%");<br /> option_add_str ("Layout3", NULL);

Elimar Riesebieter - Debian's moc maintainer.
The path to source is always uphill ;-)

Finally, I've also hit this bug :)

The fix is simple:

Apply with patch -p0 < layout-1-is-malformed-fix.patch

Not using the FILL parameter in layout description also fixes this problem, but the patch fixes it properly.

Damian Pietras - MOC developer