On 15.11.2013 16:08, Marko Mäkelä wrote:
...
BTW, !Track && x || Track && y
should IMO be simpler written Track ? y : x.
It looks like a memset() is missing from the cSkinLCARSDisplayReplay
constructor. cSkinLCARSDisplayChannel::cSkinLCARSDisplayChannel() is doing the
right thing:
memset(&lastTrackId, 0, sizeof(lastTrackId));
Adding the memset() made this message go away. (Patch attached.)
Thanks, applied.
The next problem is this one, which I get every time by pressing Play, Pause,
Menu, Recordings after startup:
==3601== Conditional jump or move depends on uninitialised value(s)
==3601== at 0x810C0DB: cRect::Intersected(cRect const&) const (osd.h:411)
==3601== by 0x810E3D1: cPixmapMemory::DrawRectangle(cRect const&, unsigned
int) (osd.c:1333)
==3601== by 0x810AA0B: cOsd::DrawRectangle(int, int, int, int, unsigned int)
(osd.c:1922)
==3601== by 0x8130482: cSkinLCARSDisplayMenu::Clear() (skinlcars.c:1463)
==3601== by 0x810651F: cOsdMenu::Display() (osdbase.c:223)
==3601== by 0x80FA3D1: cMenuMain::Set() (menu.c:3432)
==3601== by 0x80FA9FD: cMenuMain::cMenuMain(eOSState, bool) (menu.c:3376)
==3601== by 0x80AC21B: main (vdr.c:1078)
According to "monitor get_vbits", the cRect is totally uninitialized.
Program received signal SIGTRAP, Trace/breakpoint trap.
0x0810c0db in IsEmpty (this=0xbeba08a0) at osd.h:411
411 bool IsEmpty(void) const { return Width() <= 0 || Height() <= 0; }
(gdb) up
#1 cRect::Intersected (this=this@entry=0xbeba08a0, Rect=...) at osd.c:912
912 if (!IsEmpty() && !Rect.IsEmpty()) {
(gdb) up
#2 0x0810e3d2 in cPixmapMemory::DrawRectangle (this=0x6d3fe78, Rect=...,
Color=2566914048) at osd.c:1333
1333 cRect r = Rect.Intersected(DrawPort().Size());
As far as I can tell, the entirely uninitialized cRect is being passed as the
Rect parameter to cPixmapMemory::DrawRectangle(). Unfortunately, gdb cannot
show me the stack above that. It would seem to me that
cSkinLCARSDisplayMenu::Clear() is passing uninitialized bounds to
cOsd::DrawRectangle(),
which will lead to funny values like this:
(gdb) p *this
$31 = {point = {x = 1418239204, y = 0}, size = {width = -1379480940, height = 201},
static Null = {point = {x = 0, y = 0}, size = {width = 0, height = 0}, static Null =
<same as static member of an already seen type>}}
The constructor of cRect makes sure that all members are initialized to zero.
I'm afraid I can't think of a way there could be an uninitialized cRect.
Is there a reproducible set of actions that causes this to happen?
Klaus
_______________________________________________
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr