[mythtv-commits] Ticket #3836: MythMusic crashes when visualizers are changed repeatedly
MythTV
mythtv at cvs.mythtv.org
Fri Feb 22 09:02:41 UTC 2008
#3836: MythMusic crashes when visualizers are changed repeatedly
----------------------------------+-----------------------------------------
Reporter: otto at kolsi dot fi | Owner: stuartm
Type: defect | Status: assigned
Priority: minor | Milestone: 0.22
Component: mythmusic | Version: head
Severity: medium | Resolution:
Mlocked: 0 |
----------------------------------+-----------------------------------------
Comment(by anonymous):
Replying to [comment:9 paulh]:
> I thought you might be on to something there but nope hideEvent() is
only called once when playbackbox is closed. I wish I could actually
reproduce this it would make it a lot easier to figure out what is
happening.
You're right. I added printfs all over and didn't see anywhere where
MainVisual got called into from another thread at all. I also ran it
through valgrind and didn't see anything noteworthy there.
And I guess if maxrange was negative when {{{new int[maxrange]}}} is
called, there would have been an exception.
What about ;
{{{
mainvisual.cpp(LogScale::setMax)
for (i = 1; i < (int) domain; i++) {
scaled = (int) floor(0.5 + (alpha * log((double(i) + alpha) /
alpha)));
if (indices[scaled - 1] < i)
indices[scaled - 1] = i;
}
}}}
I don't get all the math that's going on prior to that (aka lazy, didn't
try more than once), but it depends on the input, so if scaled ends up
being 0, then {{{indices[scaled-1]}}} would read the allocators
bookkeeping data, which could easily be {{{ < (int)i}}}. Now writing i
into the bookkeeping data could easily cause free to die.
I tried setting scale to zero, and I got ;
{{{
*** glibc detected *** /opt/mythtv/bin/mythfrontend: munmap_chunk():
invalid pointer: 0x0977afc0 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(cfree+0x1bb)[0xb5a6c92b]
/usr/lib/libstdc++.so.6(_ZdlPv+0x21)[0xb5c31d81]
/usr/lib/libstdc++.so.6(_ZdaPv+0x1d)[0xb5c31ddd]
/opt/mythtv/lib/mythtv/plugins/libmythmusic.so(_ZN8LogScaleD1Ev+0x341)[0xb25ef05f]
/opt/mythtv/lib/mythtv/plugins/libmythmusic.so(_ZN8SpectrumD2Ev+0xb1)[0xb263a92d]
/opt/mythtv/lib/mythtv/plugins/libmythmusic.so(_ZN7SquaresD0Ev+0x2b)[0xb263aa37]
/opt/mythtv/lib/mythtv/plugins/libmythmusic.so(_ZN10MainVisual9setVisualERK7QStr
}}}
looks pretty similar.
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/3836#comment:10>
MythTV <http://svn.mythtv.org/trac>
MythTV
More information about the mythtv-commits
mailing list