MOCP interface glitching

Forums:

This occurs using version 2.5.0-beta1 and 2.5.0_alpha4_p20111211 on gentoo (these are the only 2 versions available in portage).

The interface frequently draws glitches as if something is failing to be refreshed when switching between panes. My terminal is rxvt-unicode v9.15. I've attached a picture demonstrating glitches in the bottom left pane.

IMAGE(http://imageshack.us/a/img27/8301/mocpglitch.th.jpg)

I want to add that glitching does NOT occur when running mocp from a bare TTY, rather than under urxvt.

Hi, I've been trying to reproduce your problem but I don't see anything like that (also on Gentoo). I've tried urxvt version from portage and everything works nice (with USE=xft). With USE=-xft I got general problems with bold fonts (probably some fonts are missing on my system).

I see that you have a sophisticated urxvt config. Did you try to reproduce that problem with plain urxvt? What USE flags have you set?

There were several similar problems in MOC before 2.5.0-beta1 due to Unicode related problems, but from what I see, you don't have any unicode characters there. In any case what are your LANG and LC_* settings? Could you try with locale set to C?

Here are the relevant USE flags

<br /> [ebuild R ] sys-libs/ncurses-5.9-r2:5 USE="cxx gpm unicode -ada -debug -doc -minimal -profile<br /> -static-libs -tinfo% -trace" 0 kB</p> <p>[ebuild R ] x11-terms/rxvt-unicode-9.15 USE="focused-urgency font-styles mousewheel perl vanilla<br /> xft -256-color -afterimage -alt-font-width -blink -buffer-on-clear -fading-colors -iso14755 -pixbuf<br /> -secondary-wheel -startup-notification -unicode3 -wcwidth" 0 kB</p> <p>[ebuild R ~] media-sound/moc-2.5.0_beta1-r1 USE="aac alsa cache flac mad magic unicode vorbis -curl<br /> -debug -ffmpeg -jack -libsamplerate -modplug -musepack -oss -sid -sndfile -speex -timidity -tremor -wavpack" 0 kB<br />

My locality was set to en_US.UTF-8 but changing everything to C had no effect.

like this:
<br /> $ locale<br /> LANG=en_US.UTF-8<br /> LC_CTYPE="en_US.UTF-8"<br /> LC_NUMERIC="en_US.UTF-8"<br /> LC_TIME="en_US.UTF-8"<br /> LC_COLLATE="en_US.UTF-8"<br /> LC_MONETARY="en_US.UTF-8"<br /> LC_MESSAGES="en_US.UTF-8"<br /> LC_PAPER="en_US.UTF-8"<br /> LC_NAME="en_US.UTF-8"<br /> LC_ADDRESS="en_US.UTF-8"<br /> LC_TELEPHONE="en_US.UTF-8"<br /> LC_MEASUREMENT="en_US.UTF-8"<br /> LC_IDENTIFICATION="en_US.UTF-8"<br /> LC_ALL=<br />

or like this:
<br /> $ locale<br /> LANG=C<br /> LC_CTYPE="C"<br /> LC_NUMERIC="C"<br /> LC_TIME="C"<br /> LC_COLLATE="C"<br /> LC_MONETARY="C"<br /> LC_MESSAGES="C"<br /> LC_PAPER="C"<br /> LC_NAME="C"<br /> LC_ADDRESS="C"<br /> LC_TELEPHONE="C"<br /> LC_MEASUREMENT="C"<br /> LC_IDENTIFICATION="C"<br /> LC_ALL=<br />

This is my urxvt launch command:
<br /> urxvtc +sb -fn 'xft:terminus:pixelsize=12'<br />

Launching a vanilla urxvt session didn't fix the issue either though.

For what it's worth, my windows manager is XMonad, but I installed MOC on another similarly configured Gentoo system using Fluxbox and it has the same problem.

Actually, I just tried installing another terminal emulator (aterm) and it still has the same problem.

I'm using Xfce, and on any terminal I tried I can't reproduce it (urxvt, xfce-terminal, konsole).

I tried installing terminus-font, but for some reason, my system isn't showing it in configuration dialog or fc-list.

I can't think of anything else I could do to try to reproduce it. Are you sure you don't have anything weird in the tags themselves?

I fixed it. I noticed that the "glitched" text was always the same as the terminal title so I dug around the config file and changed this:
<br /> 512 # Set the terminal title when running under xterm.<br /> 513 #SetXtermTitle = yes<br /> 514<br /> 515 # Set the terminal title when running under screen.<br /> 516 SetScreenTitle = no<br />

I believe the problem occurred because I am running my X server from within a screen session, so it was printing out the xterm title AND the screen title. The second screen title was just being randomly printed on the interface, and that's the glitch I was seeing.

BTW, moc doesn't seem to initialize a default config file at ~/.moc/config. I was grepping around the source tarball when I found this in the config.example.in file.

I had very similar problem using ConnectBot on Android. Also had to turn off setting title. Should have guessed it :)

The offending code in interface_elements.c:
<br /> 2450 /* Set the has_screen variable. */<br /> 2451 static void detect_screen ()<br /> 2452 {<br /> 2453 char *window;<br /> 2454 char *term;<br /> 2455<br /> 2456 if (((term = getenv("TERM")) &amp;&amp; !strcmp(term, "screen"))<br /> 2457 || ((window = getenv("WINDOW")) &amp;&amp; isdigit(*window)))<br /> 2458<br /> 2459 has_screen = 1;<br /> 2460 }<br />

My env vars are set to $TERM=rxvt-unicode and $WINDOW=0 but it seems like $WINDOW only gets set inside a screen session. Seems like changing the OR in line 2457 to an AND might fix the glitch in this scenario. Is there another situation where the OR is relevant?

I have today committed a patch (r2628) which resolves this problem by adding a new configuration option, ScreenTerms, which parallels the existing XTerms option. The default settings should work in most situations, but these two options together allow users sufficient control to resolve it themselves if not.