Opened 19 years ago

Closed 19 years ago

#145 closed defect (fixed)

SEGFAULT if an mpeg stream begins with no audio, then later acquires it.

Reported by: danielk Owned by: Isaac Richards
Priority: minor Milestone: unknown
Component: mythtv Version:
Severity: medium Keywords:
Cc: Ticket locked: no

Description

I've left the priority at minor since this doesn't in normal use.

If no audio stream is present in the first PMT of a TS stream, then later an audio stream is added in a later pmt the frontend segfaults after playing a second or so of distorted sound. The oddity is that 'm_parent' in AvFormatDecoder? is set to 0x80808080 instead of a valid pointer. I tried adding padding around the variable, and it did not help, which makes me think it is being overwritten directly, but I could find no such problem. (The 'this' pointer in AvFormatDecoder? doesn't change.)

To generate a file that will cause this problem first create audio free stream, and then append a stream containing audio. One example...

convert /tmp/some1920x1088image.png ppm:- | \

ppmtoy4m -n15 -F30000:1001 -A10:11 -I p -r | \ mpeg2enc -n n -f3 -b8000 -a3 --no-constraints -o /tmp/tmp.ps

vlc /tmp/tmp.ps --sout \

'#std{access=file,mux=ts{pid-pmt=0x20,pid-video=0x21.tsid=1},\

url="/tmp/tmp.ts"}'

cat /tmp/tmp.ts > /tmp/test.nuv cat /mythtv/video/some_mpegts_stream.nuv > /tmp/test.nuv

Little bit of log bfr crash, then backtrace: 2005-07-21 15:01:35.252 prebuffering pause 2005-07-21 15:01:35.252 waiting for prebuffer... 0 2005-07-21 15:01:35.269 Snapping height to avoid scaling: disphoff 1080, dispyoff: 180 2005-07-21 15:01:35.269 Snapping width to avoid scaling: dispwoff 1920, dispxoff: 0 2005-07-21 15:01:35.269 Image size. dispxoff 0, dispyoff: 180, dispwoff: 1920, disphoff: 1080 2005-07-21 15:01:35.269 Image size. imgx 0, imgy: 0, imgw: 1920, imgh: 1080 2005-07-21 15:01:35.387 waiting for prebuffer... 1 2005-07-21 15:01:35.522 waiting for prebuffer... 2 2005-07-21 15:01:35.630 Connecting to backend server: 192.168.1.102:1234 (try 3of 5) 2005-07-21 15:01:35.631 Trying to wake up the MasterBackend? now. 2005-07-21 15:01:35.642 Waiting for 5 seconds until I try to reconnect again. 2005-07-21 15:01:35.657 waiting for prebuffer... 3 2005-07-21 15:01:35.792 waiting for prebuffer... 4 2005-07-21 15:01:35.922 detectInterlace(Detect Scan, Interlaced Scan, 29.97, 1080) ->Interlaced Scan 2005-07-21 15:01:35.923 Interlaced: Interlaced Scan video_height: 1080 fps: 29.97 2005-07-21 15:01:35.923 positionMap[ 17 ] == 2466184. 2005-07-21 15:01:35.927 waiting for prebuffer... 5 2005-07-21 15:01:35.975 Opening audio device 'default'. 2005-07-21 15:01:36.071 waiting for prebuffer... 6 2005-07-21 15:01:36.206 waiting for prebuffer... 7 [New Thread 131079 (LWP 1360)] 2005-07-21 15:01:36.341 waiting for prebuffer... 8 2005-07-21 15:01:36.476 waiting for prebuffer... 9 2005-07-21 15:01:36.507 HandleGopStart?: gopset not set, syncing positionMap 2005-07-21 15:01:36.508 SyncPositionMap? prerecorded, from DB: 18 entries 2005-07-21 15:01:36.509 Stream initial keyframedist: 15. 2005-07-21 15:01:36.509 positionMap[ 21 ] == 3564292.

Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 81924 (LWP 1353)] 0xb7b965dc in NuppelVideoPlayer::ReleaseNextVideoFrame? (this=0x80808080,

buffer=0x81b37c0, timecode=52237318) at NuppelVideoPlayer?.cpp:810

810 videoOutput->ReleaseFrame?(buffer); (gdb) thread apply all bt full

Thread 10 (Thread 131079 (LWP 1360)): #0 0x417e4026 in nanosleep () from /lib/libc.so.6 No locals. #1 0x00000000 in ?? () No symbol table info available. #2 0x4180b7fc in usleep (useconds=0) at usleep.c:33

ts = {tv_sec = 0, tv_nsec = 5000000}

#3 0xb7341767 in AudioOutputBase::OutputAudioLoop? (this=0xaca9a008)

at audiooutputbase.cpp:772

space_on_soundcard = 240 last_space_on_soundcard = 240 zeros = "\000" fragment = "E\002" e = {<QCustomEvent> = {<QEvent> = {<Qt> = { static color0 = @0x43dc8d60, static color1 = @0x43dc8d68, static black = @0x43dc8d70, static white = @0x43dc8d78, static darkGray = @0x43dc8d80, static gray = @0x43dc8d88, static lightGray = @0x43dc8d90, static red = @0x43dc8d98, static green = @0x43dc8da0, static blue = @0x43dc8da8, static cyan = @0x43dc8db0, static magenta = @0x43dc8db8, static yellow = @0x43dc8dc0, static darkRed = @0x43dc8dc8, static darkGreen = @0x43dc8dd0, static darkBlue = @0x43dc8dd8, static darkCyan = @0x43dc8de0, static darkMagenta = @0x43dc8de8, static darkYellow = @0x43dc8df0, static arrowCursor = @0x43dc7440, static upArrowCursor = @0x43dc7444, static crossCursor = @0x43dc7448, static waitCursor = @0x43dc744c, static ibeamCursor = @0x43dc7450, static sizeVerCursor = @0x43dc7454, static sizeHorCursor = @0x43dc7458, static sizeBDiagCursor = @0x43dc745c, static sizeFDiagCursor = @0x43dc7460, static sizeAllCursor = @0x43dc7464, static blankCursor = @0x43dc7468, static splitVCursor = @0x43dc746c, static splitHCursor = @0x43dc7470, static pointingHandCursor = @0x43dc7474, static forbiddenCursor = @0x43dc7478, static whatsThisCursor = @0x43dc747c, static busyCursor = @0x43dc7480}, _vptr.QEvent = 0x43da98f0, t = 1200,

posted = 0, spont = 0}, d = 0x0}, error_msg = 0x0, elasped_seconds = 0,

written_bytes = 0, brate = 0, freq = 0, prec = 0, chan = 0}

#4 0xb7341f9d in AudioOutputBase::kickoffOutputAudioLoop (player=0xaca9a008) ---Type <return> to continue, or q <return> to quit---

at audiooutputbase.cpp:872

No locals. #5 0x419adef6 in pthread_start_thread (arg=0x848c1a0) at manager.c:310

resultvar = 0 request = {req_thread = 0x0, req_kind = REQ_CREATE, req_args = {

create = {attr = 0x0, fn = 0, arg = 0x0, mask = {val = {

0 <repeats 26 times>, 1100679452, 1100705780, 1100715248, 138985888, 2893021100, 1100684674}}}, free = {thread_id = 0}, exit = {

code = 0}, post = 0x0, for_each = {fn = 0, arg = 0x0}}}

outcome = (void *) 0xfffffdfc tmpclock = 13204910439412006396

#6 0x419ae095 in pthread_start_thread_event (arg=0x848c1a0) at manager.c:334

ldt_entry = {entry_number = 6, base_addr = 138985888, limit = 1048575,

seg_32bit = 1, contents = 0, read_exec_only = 0, limit_in_pages = 1, seg_not_present = 0, useable = 1, empty = 0}

result = -516 gs = -1220459500

#7 0x4181122a in clone () from /lib/libc.so.6

elf_set_libc_subfreeres_element_fstab_free = (

const void *) 0x41848234

fstab_state = {fs_fp = 0x0, fs_buffer = 0x0, fs_mntres = {

mnt_fsname = 0x0, mnt_dir = 0x0, mnt_type = 0x0, mnt_opts = 0x0, mnt_freq = 0, mnt_passno = 0}, fs_ret = {fs_spec = 0x0, fs_file = 0x0, fs_vfstype = 0x0, fs_mntops = 0x0, fs_type = 0x0, fs_freq = 0, fs_passno = 0}}

Current language: auto; currently c

Thread 9 (Thread 114694 (LWP 1355)): #0 0x419b38fb in read () from /lib/libpthread.so.0 No symbol table info available. #1 0xb7ef26fc in ?? () from /usr/local/lib/libmythtv-0.18.so.0 No symbol table info available. #2 0x00000001 in ?? () No symbol table info available. #3 0xb7c17d25 in RTCVideoSync::WaitForFrame? (this=0xb2e01a60, sync_delay=0)

at vsync.cpp:690

rtcdata = 448

#4 0xb7b996df in NuppelVideoPlayer::AVSync (this=0x817a728)

at NuppelVideoPlayer?.cpp:1403

diverge = 1.43388474 buffer = (VideoFrame? *) 0x81b3c88

---Type <return> to continue, or q <return> to quit--- #5 0xb7b9a861 in NuppelVideoPlayer::DisplayNormalFrame? (this=0x817a728)

at NuppelVideoPlayer?.cpp:1637

frame = (VideoFrame? *) 0x81b3c88

#6 0xb7b9ad97 in NuppelVideoPlayer::OutputVideoLoop? (this=0x817a728)

at NuppelVideoPlayer?.cpp:1717

temp_speed = 1 fr_int = 33366

#7 0xb7b9b04a in NuppelVideoPlayer::kickoffOutputVideoLoop (player=0x817a728)

at NuppelVideoPlayer?.cpp:1782

nvp = (NuppelVideoPlayer? *) 0x817a728

#8 0x419adef6 in pthread_start_thread (arg=0x83f7be0) at manager.c:310

resultvar = 0 request = {req_thread = 0x0, req_kind = REQ_CREATE, req_args = {

create = {attr = 0x0, fn = 0, arg = 0x0, mask = {val = {

0 <repeats 32 times>}}}, free = {thread_id = 0}, exit = {code = 0},

post = 0x0, for_each = {fn = 0, arg = 0x0}}}

outcome = (void *) 0xfffffe00 tmpclock = 21474835968

#9 0x419ae095 in pthread_start_thread_event (arg=0x83f7be0) at manager.c:334

ldt_entry = {entry_number = 6, base_addr = 138378208, limit = 1048575,

seg_32bit = 1, contents = 0, read_exec_only = 0, limit_in_pages = 1, seg_not_present = 0, useable = 1, empty = 0}

result = -512 gs = 4

#10 0x4181122a in clone () from /lib/libc.so.6

elf_set_libc_subfreeres_element_fstab_free = (

const void *) 0x41848234

fstab_state = {fs_fp = 0x0, fs_buffer = 0x0, fs_mntres = {

mnt_fsname = 0x0, mnt_dir = 0x0, mnt_type = 0x0, mnt_opts = 0x0, mnt_freq = 0, mnt_passno = 0}, fs_ret = {fs_spec = 0x0, fs_file = 0x0, fs_vfstype = 0x0, fs_mntops = 0x0, fs_type = 0x0, fs_freq = 0, fs_passno = 0}}

Thread 8 (Thread 98309 (LWP 1354)): #0 0x417e4026 in nanosleep () from /lib/libc.so.6 No locals. #1 0x00000000 in ?? () No symbol table info available. #2 0x4180b7fc in usleep (useconds=0) at usleep.c:33

ts = {tv_sec = 0, tv_nsec = 50000000}

---Type <return> to continue, or q <return> to quit--- #3 0xb7a95fac in RingBuffer::ReadAheadThread? (this=0x817a568)

at RingBuffer?.cpp:1295

totfree = 15359 ret = 128000 used = 2544641 loops = 0

#4 0xb7a95e6d in RingBuffer::startReader (type=0x817a568)

at RingBuffer?.cpp:1261

rbuffer = (RingBuffer? *) 0x817a568

#5 0x419adef6 in pthread_start_thread (arg=0x8180ce0) at manager.c:310

resultvar = 0 request = {req_thread = 0x0, req_kind = REQ_CREATE, req_args = {

create = {attr = 0x0, fn = 0, arg = 0x0, mask = {val = {

0 <repeats 32 times>}}}, free = {thread_id = 0}, exit = {code = 0},

post = 0x0, for_each = {fn = 0, arg = 0x0}}}

outcome = (void *) 0xfffffdfc tmpclock = 13253855096443239932

#6 0x419ae095 in pthread_start_thread_event (arg=0x8180ce0) at manager.c:334

ldt_entry = {entry_number = 6, base_addr = 135793888, limit = 1048575,

seg_32bit = 1, contents = 0, read_exec_only = 0, limit_in_pages = 1, seg_not_present = 0, useable = 1, empty = 0}

result = -516 gs = -1209063684

#7 0x4181122a in clone () from /lib/libc.so.6

elf_set_libc_subfreeres_element_fstab_free = (

const void *) 0x41848234

fstab_state = {fs_fp = 0x0, fs_buffer = 0x0, fs_mntres = {

mnt_fsname = 0x0, mnt_dir = 0x0, mnt_type = 0x0, mnt_opts = 0x0, mnt_freq = 0, mnt_passno = 0}, fs_ret = {fs_spec = 0x0, fs_file = 0x0, fs_vfstype = 0x0, fs_mntops = 0x0, fs_type = 0x0, fs_freq = 0, fs_passno = 0}}

Thread 7 (Thread 81924 (LWP 1353)): #0 0xb7b965dc in NuppelVideoPlayer::ReleaseNextVideoFrame? (this=0x80808080,

buffer=0x81b37c0, timecode=52237318) at NuppelVideoPlayer?.cpp:810

No locals. #1 0xb7bbdbb4 in AvFormatDecoder::GetFrame? (this=0xb4811008, onlyvideo=0)

at avformatdecoder.cpp:1909

context = (AVCodecContext *) 0x82c63b0 mpa_pic = {data = {

---Type <return> to continue, or q <return> to quit---

0xb4519000 "\200\200\200\200\200\200\200\200\201\201\201\201\201\201\201\200\200\200\200\177\200\177\200\200\200\200\200\200\200\200\200\200\177\177\177\177\200\177\177\177\200\177\200", '\177' <repeats 13 times>, "\201\201\200\200\200\200\201\201", '\200' <repeats 16 times>, "\201\201\201", '\200' <repeats 12 times>, "\201\201\201\201\200\201\200\200\200\201\201\201\201\201\201\201\200\201\201\201\200\200\200\201\201\200\200\200\200\177\177\177\177\201\201\201\200\200\200\200\201\200\200\200\200\200\200\200\200\200\201\201\200\200\200\200\200\201\201\201\201\201\201\201\201\200\200\200\200\200\200\200\200\201\200\201\200\201\200\201\201", '\200' <repeats 16 times>, "\201\201\201\201\201\200\201\201"..., 0xb4713400 '\020' <repeats 200 times>..., 0xb4791d00 '\200' <repeats 112 times>, "\201\200\177\200\201\201\177}\203\201\200\201\200\200\201\201", '\200' <repeats 20 times>, "\201\201\201\202\202\201\202\203\203\202\202\201\177\200\200\200\177\177\177\201\201\200\201\200\200\177\200\177\200\177\200\177\200\177\177\177\200\200\200\200\200\200\200\200\200\200\201\200\201\200\201\200"..., 0x0}, linesize = {1920, 960, 960, 0}, base = { 0x0, 0x0, 0x0, 0x0}, key_frame = 0, pict_type = 3, pts = 0,

coded_picture_number = 15, display_picture_number = 0, quality = 0, age = 1073741824, reference = 0, qscale_table = 0x8442900 '\002' <repeats 38 times>, "\003\003\003\002\002", '\003' <repeats 19 times>, "\002\002\002", '\003' <repeats 55 times>, qstride = 121, mbskip_table = 0x84408d0 "", motion_val = {0x0, 0x0}, mb_type = 0x8444b28, motion_subsample_log2 = 0 '\0', opaque = 0x81b37c0, error = {0, 0, 0, 0}, type = 2, repeat_pict = 0, qscale_type = 1, interlaced_frame = 1, top_field_first = 1, pan_scan = 0x8303f50, palette_has_changed = 0, buffer_hints = 0, dct_coeff = 0x0, ref_index = {

0x0, 0x0}}

gotpicture = 32 temppts = 52237318 picframe = (VideoFrame? *) 0x81b37c0 curstream = (AVStream *) 0x83056c0 pkt = (AVPacket *) 0x82cee08 len = 43580 ret = 43580 ptr = (unsigned char *) 0x8461170 "" data_size = 0 pts = 52237318 firstloop = true have_err = false allowedquit = false storevideoframes = false

---Type <return> to continue, or q <return> to quit---

skipaudio = false

#2 0xb7b96c5f in NuppelVideoPlayer::GetFrame? (this=0x817a728, onlyvideo=0,

unsafe=false) at NuppelVideoPlayer?.cpp:882

No locals. #3 0xb7b9c771 in NuppelVideoPlayer::StartPlaying? (this=0x817a728)

at NuppelVideoPlayer?.cpp:2087

output_video = 114694 decoder_thread = 81924 pausecheck = 0

#4 0xb7b650b7 in SpawnDecode? (param=0x817a728) at tv_play.cpp:150

nvp = (NuppelVideoPlayer? *) 0x817a728

#5 0x419adef6 in pthread_start_thread (arg=0x81801e0) at manager.c:310

resultvar = 0 request = {req_thread = 0x0, req_kind = REQ_CREATE, req_args = {

create = {attr = 0x0, fn = 0, arg = 0x0, mask = {val = {

0 <repeats 32 times>}}}, free = {thread_id = 0}, exit = {code = 0},

post = 0x0, for_each = {fn = 0, arg = 0x0}}}

outcome = (void *) 0x80808080 tmpclock = 2155905152

#6 0x419ae095 in pthread_start_thread_event (arg=0x81801e0) at manager.c:334

ldt_entry = {entry_number = 6, base_addr = 135791072, limit = 1048575,

seg_32bit = 1, contents = 0, read_exec_only = 0, limit_in_pages = 1, seg_not_present = 0, useable = 1, empty = 0}

result = -2139062144 gs = 0

#7 0x4181122a in clone () from /lib/libc.so.6

elf_set_libc_subfreeres_element_fstab_free = (

const void *) 0x41848234

fstab_state = {fs_fp = 0x0, fs_buffer = 0x0, fs_mntres = {

mnt_fsname = 0x0, mnt_dir = 0x0, mnt_type = 0x0, mnt_opts = 0x0, mnt_freq = 0, mnt_passno = 0}, fs_ret = {fs_spec = 0x0, fs_file = 0x0, fs_vfstype = 0x0, fs_mntops = 0x0, fs_type = 0x0, fs_freq = 0, fs_passno = 0}}

Current language: auto; currently c++

Thread 6 (Thread 65539 (LWP 1352)): #0 0x417e4026 in nanosleep () from /lib/libc.so.6 No locals. #1 0x00000000 in ?? () No symbol table info available. #2 0x417e3e72 in sleep (seconds=0) at sleep.c:137 ---Type <return> to continue, or q <return> to quit---

saved_errno = -1238251404 oact = {sigaction_handler = {sa_handler = 0, sa_sigaction = 0},

sa_mask = {val = {0, 0, 3056715292, 3069404199, 20, 1, 3056715292,

3069404491, 2, 3056715412, 0, 1138358584, 2, 1, 3056715340, 1136852555, 20, 3056715540, 2, 0, 5, 3001034616, 3056715764, 1138358584, 0, 0, 3056715580, 1136780517, 3056715764, 3056715540, 1, 0}}, sa_flags = 0,

sa_restorer = 0x805244e}

ts = {tv_sec = 4, tv_nsec = 51384096} set = {val = {65536, 0 <repeats 31 times>}} oset = {val = {2147483648, 0, 1099348096, 1100663699, 1100672926,

1099346544, 1099345908, 3056715960, 1099345908, 0, 3056716012, 1098589866, 3056715984, 0, 1099348096, 1, 1100682428, 1099348096, 0, 0, 3069528852, 3069544992, 1, 20039932, 135763168, 0, 1, 16777216, 135763168, 0, 3001026320, 0}}

result = 0

#3 0xb72441f4 in MythContext::ConnectServer? (this=0x813c478,

hostname=@0xb631caf4, port=1234) at mythcontext.cpp:780

wol_cmd = {static null = {

static null = <same as static member of an already seen type>, d = 0x8050198, static shared_null = 0x8050198}, d = 0xb2e00648,

static shared_null = 0x8050198}

cnt = 2 sleepTime = 5 maxConnTry = 5 str = {static null = {

static null = <same as static member of an already seen type>, d = 0x8050198, static shared_null = 0x8050198}, d = 0xb2e00648,

static shared_null = 0x8050198}

strlist = {<QValueList<QString>> = {sh = 0xb2e00908}, <No data fields>}

#4 0xb7243703 in MythContext::ConnectToMasterServer? (this=0x813c478)

at mythcontext.cpp:720

server = {static null = {

static null = <same as static member of an already seen type>, d = 0x8050198, static shared_null = 0x8050198}, d = 0xb2e02a30,

static shared_null = 0x8050198}

port = 1234

#5 0xb724f1da in MythContext::SendReceiveStringList? (this=0x813c478,

strlist=@0xb631cbc4, quickTimeout=false) at mythcontext.cpp:2000

ok = 49

#6 0xb7a9d369 in RemoteSendMessage? (message=@0xb631cd04) at remoteutil.cpp:329 ---Type <return> to continue, or q <return> to quit---

strlist = {<QValueList<QString>> = {sh = 0x81d09d0}, <No data fields>}

#7 0xb7b6ba04 in TV::HandleStateChange? (this=0x8175560) at tv_play.cpp:798

message = {static null = {

static null = <same as static member of an already seen type>, d = 0x8050198, static shared_null = 0x8050198}, d = 0x81a2a50,

static shared_null = 0x8050198}

tmpFilename = {static null = {

static null = <same as static member of an already seen type>, d = 0x8050198, static shared_null = 0x8050198}, d = 0x8175d30,

static shared_null = 0x8050198}

changed = true nextState = kState_WatchingPreRecorded desiredNextState = kState_WatchingPreRecorded

#8 0xb7b6e190 in TV::RunTV (this=0x8175560) at tv_play.cpp:1237

doHandle = true keypressed = (QKeyEvent *) 0x419b1440 updatecheck = 1

#9 0xb7b6dc4f in TV::EventThread? (param=0x8175560) at tv_play.cpp:1182

thetv = (class TV *) 0x8175560

#10 0x419adef6 in pthread_start_thread (arg=0x81794e0) at manager.c:310

resultvar = 0 request = {req_thread = 0x0, req_kind = REQ_CREATE, req_args = {

create = {attr = 0x0, fn = 0, arg = 0x0, mask = {val = {

0 <repeats 26 times>, 1100679452, 1100705780, 1100715184, 135763168, 3056717740, 1100684674}}}, free = {thread_id = 0}, exit = {

code = 0}, post = 0x0, for_each = {fn = 0, arg = 0x0}}}

outcome = (void *) 0xfffffdfc tmpclock = 4721654726146391548

#11 0x419ae095 in pthread_start_thread_event (arg=0x81794e0) at manager.c:334

ldt_entry = {entry_number = 6, base_addr = 135763168, limit = 1048575,

seg_32bit = 1, contents = 0, read_exec_only = 0, limit_in_pages = 1, seg_not_present = 0, useable = 1, empty = 0}

result = -516 gs = 1099345908

#12 0x4181122a in clone () from /lib/libc.so.6

elf_set_libc_subfreeres_element_fstab_free = (

const void *) 0x41848234

fstab_state = {fs_fp = 0x0, fs_buffer = 0x0, fs_mntres = {

mnt_fsname = 0x0, mnt_dir = 0x0, mnt_type = 0x0, mnt_opts = 0x0, mnt_freq = 0, mnt_passno = 0}, fs_ret = {fs_spec = 0x0, fs_file = 0x0,

---Type <return> to continue, or q <return> to quit---

fs_vfstype = 0x0, fs_mntops = 0x0, fs_type = 0x0, fs_freq = 0, fs_passno = 0}}

Current language: auto; currently c

Thread 3 (Thread 16386 (LWP 1348)): #0 0x419b0b04 in pthread_sigsuspend (set=0x419b6ff4) at pt-sigsuspend.c:54

resultvar = 4294967292

#1 0x419b0964 in pthread_wait_for_restart_signal (self=0x8159880)

at pthread.c:1216

mask = {val = {0, 0, 3069566976, 51, 3068169360, 0, 1090609076, 0,

1090610836, 3065585124, 1090551756, 134515163, 227054694, 134513704, 3065585056, 1090610752, 25, 0, 1, 0, 1, 1, 1100682428, 1, 16777216, 135633024, 0, 3069544992, 0, 1100685250, 1100685561, 1100705780}}

#2 0x419acdf9 in pthread_cond_wait (cond=0x0, mutex=0x43dca5c8)

at restart.h:34

self = 0x8159880 extr = {pu_object = 0x813c8b0,

pu_extricate_func = 0x419acca0 <cond_extricate_func>}

already_canceled = 0 spurious_wakeup_count = 0

#3 0x43bfc80c in QWaitCondition::wait (this=0x813c708, time=4294967295)

at qwaitcondition_unix.cpp:242

mutex = {m_reserved = 0, m_count = 0, m_owner = 0x0,

m_kind = 0, m_lock = {status = 0, spinlock = 0}}

ret = -1

#4 0xb72523b0 in MythContext::waitPrivRequest (this=0x813c478)

at mythcontext.cpp:2396

No locals. #5 0x08049c19 in run_priv_thread (data=0x0) at main.cpp:23 No locals. #6 0x419adef6 in pthread_start_thread (arg=0x8159880) at manager.c:310

resultvar = 0 request = {req_thread = 0x0, req_kind = REQ_CREATE, req_args = {

create = {attr = 0x0, fn = 0, arg = 0x0, mask = {val = {

0 <repeats 32 times>}}}, free = {thread_id = 0}, exit = {code = 0},

post = 0x0, for_each = {fn = 0, arg = 0x0}}}

outcome = (void *) 0xfffffffc tmpclock = 4727495331913138172

#7 0x419ae095 in pthread_start_thread_event (arg=0x8159880) at manager.c:334

ldt_entry = {entry_number = 6, base_addr = 135633024, limit = 1048575,

seg_32bit = 1, contents = 0, read_exec_only = 0, limit_in_pages = 1,

---Type <return> to continue, or q <return> to quit---

seg_not_present = 0, useable = 1, empty = 0}

result = -4 gs = 1100705780

#8 0x4181122a in clone () from /lib/libc.so.6

elf_set_libc_subfreeres_element_fstab_free = (

const void *) 0x41848234

fstab_state = {fs_fp = 0x0, fs_buffer = 0x0, fs_mntres = {

mnt_fsname = 0x0, mnt_dir = 0x0, mnt_type = 0x0, mnt_opts = 0x0, mnt_freq = 0, mnt_passno = 0}, fs_ret = {fs_spec = 0x0, fs_file = 0x0, fs_vfstype = 0x0, fs_mntops = 0x0, fs_type = 0x0, fs_freq = 0, fs_passno = 0}}

Thread 2 (Thread 32769 (LWP 1347)): #0 0x41808faa in *GI_poll (fds=0x4186aff4, nfds=1, timeout=2000)

at poll.c:86

resultvar = 1099345908 oldtype = 0

#1 0x419ada03 in pthread_manager (arg=0x81801e0) at manager.c:152

resultvar = 135791072 reqfd = 12 ufd = {fd = 12, events = 1, revents = 0} manager_mask = {val = {4294967279, 4294967294,

4294967295 <repeats 30 times>}}

n = 135791072 request = {req_thread = 0x81801e0, req_kind = REQ_CREATE, req_args = {

create = {attr = 0x0,

fn = 0xb7341dc0 <AudioOutputBase::kickoffOutputAudioLoop(void*)>, arg = 0xaca9a008, mask = {val = {2147483648, 0, 3071822456,

3086866480, 78748438, 3048215796, 3086866480, 3072062013, 1, 16777216, 3071708152, 1090551574, 1090609076, 7562, 3086866480, 3048215764, 1090564217, 3086866908, 0, 1, 1, 0, 0, 3071685768, 3074509516, 765, 3071832098, 1131454700, 3074507796, 3048216036, 0, 3048215804}}}, free = {thread_id = 0}, exit = {code = 0},

post = 0x0, for_each = {fn = 0, arg = 0xb7341dc0}}}

#2 0x419adcfa in pthread_manager_event (arg=0x8158d80) at manager.c:249

ldt_entry = {entry_number = 6, base_addr = 135630208, limit = 1048575,

seg_32bit = 1, contents = 0, read_exec_only = 0, limit_in_pages = 1, seg_not_present = 0, useable = 1, empty = 0}

result = -4 gs = 2001

---Type <return> to continue, or q <return> to quit--- #3 0x4181122a in clone () from /lib/libc.so.6

elf_set_libc_subfreeres_element_fstab_free = (

const void *) 0x41848234

fstab_state = {fs_fp = 0x0, fs_buffer = 0x0, fs_mntres = {

mnt_fsname = 0x0, mnt_dir = 0x0, mnt_type = 0x0, mnt_opts = 0x0, mnt_freq = 0, mnt_passno = 0}, fs_ret = {fs_spec = 0x0, fs_file = 0x0, fs_vfstype = 0x0, fs_mntops = 0x0, fs_type = 0x0, fs_freq = 0, fs_passno = 0}}

Thread 1 (Thread 16384 (LWP 1343)): #0 0x417e4026 in nanosleep () from /lib/libc.so.6 No locals. #1 0x00000000 in ?? () No symbol table info available. #2 0x4180b7fc in usleep (useconds=0) at usleep.c:33

ts = {tv_sec = 0, tv_nsec = 1000000}

#3 0x0804ad19 in main (argc=2, argv=0xbfffd474) at main.cpp:144

a = {<QObject> = {<Qt> = {static color0 = @0x43dc8d60,

static color1 = @0x43dc8d68, static black = @0x43dc8d70, static white = @0x43dc8d78

, static darkGray = @0x43dc8d80,

static gray = @0x43dc8d88, static lightGray = @0x43dc8d90, static red = @0x43dc8d98, static green = @0x43dc8da0, static blue = @0x43dc8da8, static cyan = @0x43dc8db0, static magenta = @0x43dc8db8, static yellow = @0x43dc8dc0, static darkRed = @0x43dc8dc8, static darkGreen = @0x43dc8dd0, static darkBlue = @0x43dc8dd8, static darkCyan = @0x43dc8de0, static darkMagenta = @0x43dc8de8, static darkYellow = @0x43dc8df0, static arrowCursor = @0x43dc7440, static upArrowCursor = @0x43dc7444, static crossCursor = @0x43dc7448, static waitCursor = @0x43dc744c, static ibeamCursor = @0x43dc7450, static sizeVerCursor = @0x43dc7454, static sizeHorCursor = @0x43dc7458, static sizeBDiagCursor = @0x43dc745c, static sizeFDiagCursor = @0x43dc7460, static sizeAllCursor = @0x43dc7464, static blankCursor = @0x43dc7468, static splitVCursor = @0x43dc746c, static splitHCursor = @0x43dc7470, static pointingHandCursor = @0x43dc7474, static forbiddenCursor = @0x43dc7478, static whatsThisCursor = @0x43dc747c, static busyCursor = @0x43dc7480},

_vptr.QObject = 0x43db87e8, static metaObj = 0x8050c70, isSignal = 0, isWidget = 0, pendTimer = 0, blockSig = 0, wasDeleted = 0, isTree = 1,

---Type <return> to continue, or q <return> to quit---

objname = 0x812dd90 "mythtv", parentObj = 0x0, childObjects = 0x812d088, connections = 0x0, senderObjects = 0x0, eventFilters = 0x0, postedEvents = 0x0, d = 0x0}, static metaObj = 0x8171290,

static qt_mutex = 0x8130af8, app_argc = 2, app_argv = 0xbfffd474, quit_now = false, quit_code = 0, static app_style = 0x815b2f8, static app_cspec = 0, static app_pal = 0x8131cf8, static app_font = 0x80527b0, static app_cursor = 0x0, static eventloop = 0x813b980, static app_tracking = 0, static is_app_running = true, static is_app_closing = false, static app_exit_loop = <optimized out>, static loop_level = 0, static main_widget = 0x0, static focus_widget = 0x0, static active_window = 0x0, static obey_desktop_settings = true, static cursor_flash_time = 1000, static mouse_double_click_time = 400, static wheel_scroll_lines = 3, static composedUnicode = 0, static animate_ui = false, static animate_menu = false, static animate_tooltip = false, static animate_combo = false, static fade_menu = false, static fade_tooltip = false, static animate_toolbox = false, static widgetCount = false, static metaComposeUnicode = false, translators = 0x0, session_manager = 0x8146eb8, session_id = {static null = {

static null = <same as static member of an already seen type>, d = 0x8050198, static shared_null = 0x8050198}, d = 0x813aeb0,

static shared_null = 0x8050198}, static session_key = 0x8130c78,

is_session_restored = false, static app_strut = {wd = 0, ht = 0}, static app_libpaths = 0x812db68, static app_palettes = 0x8131b60, static app_fonts = 0x0, static popupWidgets = 0x0}

priv_thread = 16386 status = 0 themename = {static null = {

static null = <same as static member of an already seen type>, d = 0x8050198, static shared_null = 0x8050198}, d = 0x8156218,

static shared_null = 0x8050198}

themedir = {static null = {

static null = <same as static member of an already seen type>, d = 0x8050198, static shared_null = 0x8050198}, d = 0x8155ec8,

static shared_null = 0x8050198}

auddevice = {static null = {

static null = <same as static member of an already seen type>, d = 0x8050198, static shared_null = 0x8050198}, d = 0x815ba38,

static shared_null = 0x8050198}

---Type <return> to continue, or q <return> to quit---

mainWindow = (class MythMainWindow? *) 0x815de40 tv = (class TV *) 0x8175560

0xb7b965dc 810 videoOutput->ReleaseFrame?(buffer); Current language: auto; currently c++ (gdb) p videoOutput Cannot access memory at address 0x808082dc (gdb) p this $1 = (NuppelVideoPlayer? * const) 0x80808080 (gdb) up #1 0xb7bbdbb4 in AvFormatDecoder::GetFrame? (this=0xb4811008, onlyvideo=0)

at avformatdecoder.cpp:1909

1909 m_parent->ReleaseNextVideoFrame?(picframe, temppts); (gdb) p m_parent $2 = (NuppelVideoPlayer? *) 0x80808080 (gdb) p this $3 = (AvFormatDecoder? * const) 0xb4811008 (gdb)

Change History (2)

comment:1 Changed 19 years ago by danielk

(In [6959]) This addresses #145.

I discovered that the problem is that something in the libav or avformatdecoder overwrites the avformatdecoder class with audio data. I haven't figured out where this is happening, but by allocating the audio buffer on the heap, instead of as an array in avformatdecoder, the SEGFAULT doesn't happen.

However the video has a few lines of bright green on the top of video. And those blocks move about a bit on the P & B frames. It's almost as if a slice was missing. The sound is working, so I'm not sure what is going on.

This commit also cleans up variable initialization in the involved classes and provides a couple Set's & Get's for the NVP and RecorderBase? pointers in RecorderBase? and NVP, respectively.

comment:2 Changed 19 years ago by danielk

Resolution: fixed
Status: newclosed

This should be fixed by changesets [6965], [7000], and others.

Note: See TracTickets for help on using tickets.