[mythtv] mythmusic-0.13 hang when spectrum visualizer goes to
full-screen
Dave Kaffine
dave at kaffine.com
Sun Jan 4 21:13:42 EST 2004
Using mythtv-0.13 and mythmusic-0.13, I can get mythfrontend to
hang as follows:
% mythfrontend
Select "Music", "Play Music", press 6 to change
visualizer until it says "Spectrum", press 4 to go to
full-screen visualizer.
At this point, although the music continues, the UI is hung
(the playtime is not updated, no response to further key
presses). 'top' shows mythfrontend at 90+% cpu.
Stack trace is below. The problem is the while loop
in LogScale::setMax(). I haven't completely worked out
the math, but it appears that the function expects maxscale
to always be greater than maxrange, and it can loop forever
if this is not true. With my screen size of 1280x1024, setMax
is being called with maxscale=192 (hard-coded constant) and
maxrange=213 (which comes from 1280/6).
To double check that this was the problem, I edited visualize.cpp
and changed both occurrences of setMax(192, ...) to setMax(224, ...)
(a brief look at the Spectrum::process made it seem reasonably
safe to increase this as high as 256). While this isn't a fix, since
it just moves the breaking point to a different display size, it
did get rid of the hang I was seeing.
I got the hang originally without enabling fftw support in
mythmusic (the spectrum visualizer is still enabled,
although it just prints a warning message). I subsequently
downloaded and compiled the fftw library, recompiled mythmusic
with fftw support, and confirmed the hang was still there (and
that the workaround still works around the problem).
I've checked recent mythtv-dev and mythtv-commits traffic, and this
doesn't seem to have already been discovered.
Hopefully this is enough information for someone to determine
the correct fix. But, let me know if you need me to provide
any other details.
Dave
GNU gdb 5.3-22mdk (Mandrake Linux)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "i586-mandrake-linux-gnu"...
(gdb) run
Starting program:
/home/dkaffine/mythtv-0.13/programs/mythfrontend/mythfrontend
[New Thread 16384 (LWP 8870)]
Xlib: extension "GLX" missing on display ":0.0".
Xlib: extension "GLX" missing on display ":0.0".
2004-01-04 20:12:10 Enabled verbose msgs : important general
Found 2 Xinerama Screens.
Using first Xinerama screen, 1280x1024+0+0
[New Thread 32769 (LWP 8873)]
[New Thread 16386 (LWP 8874)]
[New Thread 32771 (LWP 8875)]
[New Thread 49156 (LWP 8876)]
[New Thread 65541 (LWP 8877)]
Program received signal SIGINT, Interrupt.
[Switching to Thread 49156 (LWP 8876)]
0x409ef74b in write () from /lib/i686/libpthread.so.0
Current language: auto; currently c
(gdb) thread apply all bt full
Thread 6 (Thread 65541 (LWP 8877)):
#0 0x40b3a568 in sigsuspend () from /lib/i686/libc.so.6
No symbol table info available.
#1 0x409ec478 in __pthread_wait_for_restart_signal ()
from /lib/i686/libpthread.so.0
No symbol table info available.
#2 0x409e8c5b in pthread_cond_wait at GLIBC_2.0 () from
/lib/i686/libpthread.so.0
No symbol table info available.
Thread 5 (Thread 49156 (LWP 8876)):
#0 0x409ef74b in write () from /lib/i686/libpthread.so.0
No symbol table info available.
#1 0x41117150 in __JCR_LIST__ ()
from /usr/local/lib/mythtv/plugins/libmythmusic.so
No symbol table info available.
#2 0x40565ffa in QProc::~QProc() () from /usr/lib/qt3/lib/libqt-mt.so.3
No symbol table info available.
#3 0x409ea915 in pthread_start_thread_event () from
/lib/i686/libpthread.so.0
No symbol table info available.
Thread 2 (Thread 32769 (LWP 8873)):
#0 0x40be7537 in poll () from /lib/i686/libc.so.6
No symbol table info available.
#1 0x409e996e in __pthread_manager () from /lib/i686/libpthread.so.0
No symbol table info available.
#2 0x409e9bbb in __pthread_manager_event () from
/lib/i686/libpthread.so.0
No symbol table info available.
Thread 1 (Thread 16384 (LWP 8870)):
#0 0x410858c9 in LogScale::setMax(int, int) (this=0x87d3788,
maxscale=192,
maxrange=213) at mainvisual.cpp:795
alpha = 94.413223413286289
i = 213
scaled = 1083842824
domain = 192
range = 213
x = -2.2262525373447462e+17
dx = 8.2950283415979456e+17
y = -78.246107416600935
yy = -9.4328921125214253e-17
t = 2.2204460492503128e-16
e4 = 1e-08
#1 0x410b0b70 in Spectrum::resize(QSize const&) (this=0x87d3758,
newsize=@0xbfffd688) at visualize.cpp:59
i = 1091662160
w = 1024
os = 141597220
#2 0x410833cc in MainVisual::resizeEvent(QResizeEvent*)
(this=0x87099d8,
event=0xbfffd8e0) at mainvisual.cpp:268
No locals.
Current language: auto; currently c++
#0 0x409ef74b in write () from /lib/i686/libpthread.so.0
(gdb) quit
The program is running. Exit anyway? (y or n) y
Inferior GDB finished
More information about the mythtv-dev
mailing list