[mythtv] A couple of MPlayer backtraces...
Martin Moeller
martin at martinm-76.dk
Sat Aug 9 00:00:14 EDT 2003
In regards to my previous mails about MPlayer acting up here is some
debug information that someone may be able to decifer. The first seems
to indicate either that we have jumped an incorrect number of bytes and
are thus reading wrong information about packet lengths or maybe an
endianism (unlikely..) or, the ever popular, third option, left to the
reader as an excercise :)
This is MPlayer 0.90rc5 with mplayer patch and the teletext 'patch' on
top.
MPlayer options : --enable-<gui|menu|largefiles|debug>. Pentium 4
optimized.
Backtrace 1: New file as of today. Crashes within 2-3 seconds.
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 13046)]
0x08157213 in new_demux_packet (len=1620510436) at demuxer.h:149
149 if(len) memset(dp->buffer+len,0,8);
(gdb) thread apply all bt full
Thread 1 (Thread 1024 (LWP 13046)):
#0 0x08157213 in new_demux_packet (len=1620510436) at demuxer.h:149
__s = (void *) 0x609706e4
dp = (struct demux_packet_st *) 0x84e3da0
#1 0x081548e9 in ds_read_packet (ds=0x840bb78, stream=0x609706e4,
len=139345312, pts=-1277650.75, pos=219427, flags=0) at demuxer.c:251
dp = (struct demux_packet_st *) 0x0
#2 0x08169435 in demux_nuv_fill_buffer (demuxer=0x840b310) at
demux_nuv.c:198
rtjpeg_frameheader = {frametype = 65 'A', comptype = 2 '\002',
keyframe = -60 'Ä', filters = -99 '\235', timecode = -1277650766,
packetlength = 1620510436}
priv = (struct _nuv_info_t *) 0x840c5a8
want_audio = 1
#3 0x08154c34 in ds_fill_buffer (ds=0x840bb78) at demuxer.c:387
demux = (struct demuxer_st *) 0x840b310
#4 0x08154e3b in demux_read_data (ds=0x840bb78, mem=0xbfffd0a0 "",
len=4) at demuxer.c:406
x = 0
bytes = 0
#5 0x080df7db in mplayer_audio_read (buf=0x609706e4 "",
size=1620510436) at ad_mp3lib.c:29
No locals.
#6 0x0811bb9f in read_frame (fr=0x8353b40) at sr1.c:60
newhead = 4294967295
hbuf = "\0\0\0\0\0\0\0"
resyncpos = 18390
frames = 0
#7 0x0811b902 in MP3_DecodeFrame (hova=0x609706e4 "", single=-1) at
sr1.c:512
No locals.
#8 0x080defcb in decode_audio (sh_audio=0x8401ed8,
buf=0x84c1ef0
"\234\016'\017\201\017\f\020Q\020Ó\020\005\021|\021\237\021\016\022'\022\234\022³\022,\023?\023©\023¶\023\020\024\e\024p\024~\024Ý\024é\024G\025V\025§\025¾\025\003\026(\026k\026\224\026Ù\026ó\026,\027-\027[\027:\027e\027(\027W\027\r\027:\027ï\026\031\027Ö\026\002\027È\026þ\026¿\026þ\026 \026Þ\026`\026\231\026\017\026A\026³\025á\025H\025w\025Õ\024\b\025o\024¨\024\024\024P\024¥\023ß\023\032\023S\023\215\022È\022\t\022K\022h\021¶\021£\020ü\020Ø\017<\020&\017\226\017\210\016ú\016ð\rZ\016]\rÆ\rá\fN\rp\fã\fó\vc\fQ\vÀ\v¥\n\027\v\002\n|\n"...,
minlen=-1, maxlen=65536) at dec_audio.c:410
declen = 8192
afd = {audio = 0x840db08, len = 0, rate = 0, nch = 0, format =
0, bps = 0}
pafd = (struct af_data_s *) 0xffffffff
#9 0x08076e35 in main (argc=2, argv=0xbffff494) at mplayer.c:1813
time_frame = 0.002701591
osd_text_buffer = '\0' <repeats 63 times>
drop_frame = 0
dropped_frames = 0
AV_delay = 0.851000011
lastframeout_ts = 3049094679
next_frame_time = 0.0399999991
frame_time_remaining = 0
blit_frame = 1
d_audio = (struct {...} *) 0x840bb78
d_video = (struct {...} *) 0x840b250
d_dvdsub = (struct {...} *) 0x8405d40
file_format = 0
delay_corrected = 1
eof = 0
osd_function = 1
osd_last_pts = 0
osd_show_av_delay = 0
osd_show_sub_delay = 0
osd_show_sub_pos = 0
osd_show_sub_visibility = 0
osd_show_sub_alignment = 0
osd_show_vobsub_changed = 0
osd_show_percentage = 0
osd_show_tv_channel = 25
rtc_fd = -1
i = 8192
gui_no_filename = 0
#10 0x4064d4a2 in __libc_start_main () from /lib/libc.so.6
No symbol table info available.
Tried again without the last teletextish patch: Absolutely the same
result.
MPlayer CVS as of a couple of days ago + ffmpeg at about the same time:
Basically the same, except that there are a few more lines in demuxer.h
It is the same string in both cases though...
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 20644)]
0x0815ec23 in new_demux_packet (len=1620510436) at demuxer.h:154
154 if(len) memset(dp->buffer+len,0,8);
Compiling without largefiles support makes no difference...
Interestingly enough one of the files I have that plays okay in MPlayer
never seems to enter new_demux_packet (I tried 'break new_demux_packet'
before run). Even seeking 10 minutes into the stream never provoked a
call to this function (unless my breakpoint is not activating?)..?
This is one of the cases where the disk activity surges and CPU load
runs above 4 or 5 (on a 2.66 GHz P4?!!) during playback. This is a
transcoded file that have had the start and end cut off and MPlayer says
it begins at around 0:06:50, not 0:00:00..
I had to break (Ctrl-C) myself because in the end the disk activity
stops, mplayer exits and the load returns to normal...
This may not be enough to go on but hopefully it'll ignite a spark
somewhere... Hmm, looking at the timecode below here, it seems quite
similar to the len variable above... Same number of digits...
Program received signal SIGINT, Interrupt.
[Switching to Thread 1024 (LWP 24594)]
0x407c5a94 in read () from /lib/libc.so.6
(gdb) thread apply all bt full
Thread 1 (Thread 1024 (LWP 24594)):
#0 0x407c5a94 in read () from /lib/libc.so.6
No symbol table info available.
#1 0x40188ac0 in __JCR_LIST__ () from /lib/libpthread.so.0
No symbol table info available.
#2 0x0815bdbe in fill_buffer (s=0x800, buffer=0x800 <Address 0x800 out
of bounds>, max_len=2048) at stream_file.c:35
r = 2048
#3 0x0815b7ce in stream_fill_buffer (s=0x7) at stream.c:219
len = 139162468
#4 0x08156d69 in ds_read_packet (ds=0x84b86c8, stream=0x84b7308, len=7,
pts=1411396.38, pos=700012, flags=0) at stream.h:183
dp = (struct demux_packet_st *) 0x8570680
#5 0x0816db39 in demux_nuv_fill_buffer (demuxer=0x84ba8c0) at
demux_nuv.c:198
rtjpeg_frameheader = {frametype = 86 'V', comptype = 32 ' ',
keyframe = 83 'S', filters = 51 '3', timecode = 1411396403,
packetlength = 807432809}
priv = (struct _nuv_info_t *) 0x84b8798
want_audio = 1
#6 0x0815704c in ds_fill_buffer (ds=0x84b8660) at demuxer.c:413
demux = (struct demuxer_st *) 0x84ba8c0
#7 0x08157253 in demux_read_data (ds=0x84b8660, mem=0xbfffd030
"ÿû\222\004", len=4) at demuxer.c:432
x = 0
bytes = 0
#8 0x080df543 in mplayer_audio_read (buf=0x800 <Address 0x800 out of
bounds>, size=2048) at ad_mp3lib.c:29
No locals.
#9 0x0811c411 in read_frame (fr=0x83c4580) at sr1.c:60
newhead = 4294967295
hbuf = "ÿû\222\004\0\0\0"
resyncpos = 77321
frames = 0
#10 0x0811c174 in MP3_DecodeFrame (hova=0x800 <Address 0x800 out of
bounds>, single=-1) at sr1.c:514
No locals.
#11 0x080de733 in decode_audio (sh_audio=0x84b8848,
buf=0x855e758
"»é^ë\205ë\034íOíÓîûîiðzðâñêñTóZóÑôÂôBö÷õs÷Ñö>øU÷§ø°÷äø\027ø,ù\236ø\235ù3ù*úÅù¼úXúKû\006ûñûÛû¶üÆü\206ý\217ýAþ\032þÇþkþ)ÿ©þ\177ÿçþÌÿ", minlen=-1, maxlen=65536) at dec_audio.c:410
declen = 8192
afd = {audio = 0x85a7d60, len = 0, rate = 0, nch = 1082256528,
format = 0, bps = 1}
pafd = (struct af_data_s *) 0xffffffff
#12 0x080789cd in main (argc=2, argv=0xbffff494) at mplayer.c:1913
time_frame = 0.00466451561
osd_text_buffer = "\001 00:06:59", '\0' <repeats 53 times>
osd_show_text_buffer =
"\177ELF\001\001\001\0\0\0\0\0\0\0\0\0\003\0\003\0\001\0\0\0Pï\0\04\0\0\0è\036\004\0\0\0\0\04\0 \0\003\0(\0\031\0\026\0\001\0\0\0\0\0\0\0\0\0\0"
drop_frame = 0
dropped_frames = 0
AV_delay = -nan(0x400000)
lastframeout_ts = 2809161099
next_frame_time = 0.0399999991
frame_time_remaining = 0
blit_frame = 1
d_audio = (struct {...} *) 0x84b8660
d_video = (struct {...} *) 0x84b86c8
d_dvdsub = (struct {...} *) 0x84b8730
file_format = 0
delay_corrected = 1
eof = 0
osd_function = 1
osd_last_pts = 419
osd_show_av_delay = 0
osd_show_text = 0
osd_show_sub_delay = 0
osd_show_sub_pos = 0
osd_show_sub_visibility = 0
osd_show_sub_alignment = 0
osd_show_vobsub_changed = 0
osd_show_sub_changed = 0
osd_show_percentage = 0
osd_show_tv_channel = 25
rtc_fd = -1
i = 8192
tmp = 0x2000 <Address 0x2000 out of bounds>
gui_no_filename = 0
This seems to be the piece of code that leads to calling
new_demux_packet in a Nuv context (libmpdemux/demux_audio.c)
switch(priv->frmt) {
case MP3 :
while(! s->eof || (demux->movi_end && stream_tell(s) >=
demux->movi_end) ) {
uint8_t hdr[4];
int len;
stream_read(s,hdr,4);
len = mp_decode_mp3_header(hdr);
if(len < 0) {
stream_skip(s,-3);
} else {
demux_packet_t* dp;
if(s->eof || (demux->movi_end && stream_tell(s) >=
demux->movi_end) )
return 0;
dp = new_demux_packet(len);
memcpy(dp->buffer,hdr,4);
stream_read(s,dp->buffer + 4,len-4);
priv->last_pts = priv->last_pts < 0 ? 0 : priv->last_pts +
1152/(float)sh_audio->samplerate;
ds->pts = priv->last_pts -
(ds_tell_pts(demux->audio)-sh_audio->a_in_buffer_len)/(float)sh_audio->i_bps;
ds_add_packet(ds,dp);
return 1;
}
Compiling unoptimized doesn't seem to make a difference.
I haven't tried '--disable-largefiles' yet...
--
Martin Moeller <martin at martinm-76.dk>
More information about the mythtv-dev
mailing list