Opened 15 years ago
Closed 15 years ago
#9382 closed Bug Report (Fixed)
Seg Fault on PreviewGen
Reported by: | Owned by: | JYA | |
---|---|---|---|
Priority: | minor | Milestone: | 0.24.1 |
Component: | MythTV - Audio Output | Version: | Master Head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
I'm using master from 12/16 and I get segmentation faults when mythpreviewgen runs for some recordings. It seems to be related to bookmarks that are at least several hundred frames into the show. For example, everything is fine if I run:
root@freshertv:/usr/src/mythtv-git/mythtv/mythtv# /usr/local/bin/mythpreviewgen --size 0x0 --chanid 4669 --starttime 20101215145900 --frame 100 2010-12-16 10:06:58.818 --frame: 100 2010-12-16 10:06:58.818 mythpreviewgen version: master [b0.24-584-ga65a111] www.mythtv.org 2010-12-16 10:06:58.818 Using runtime prefix = /usr/local 2010-12-16 10:06:58.818 Using configuration directory = /root/.mythtv 2010-12-16 10:06:58.819 Empty LocalHostName. 2010-12-16 10:06:58.819 Using localhost value of freshertv 2010-12-16 10:06:58.859 Cannot find default UPnP backend 2010-12-16 10:06:58.864 New DB connection, total: 1 2010-12-16 10:06:58.867 Connected to database 'mythconverg' at host: localhost 2010-12-16 10:06:58.871 Closing DB connection named 'DBManager0' 2010-12-16 10:06:58.871 Deleting UPnP client... 2010-12-16 10:06:59.096 Connected to database 'mythconverg' at host: localhost 2010-12-16 10:06:59.097 Current locale EN_US 2010-12-16 10:06:59.098 Reading locale defaults from /usr/local/share/mythtv//locales/en_us.xml 2010-12-16 10:06:59.107 Preview from time spec 2010-12-16 10:06:59.161 MythCoreContext: Connecting to backend server: 192.168.0.84:6543 (try 1 of 1) 2010-12-16 10:06:59.162 Using protocol version 64 2010-12-16 10:06:59.242 AFD: Opened codec 0x7feca808c180, id(H264) type(Video) 2010-12-16 10:06:59.242 AFD: codec AC3 has 6 channels 2010-12-16 10:06:59.242 AFD: Opened codec 0x7feca808ddf0, id(AC3) type(Audio) 2010-12-16 10:06:59.420 Preview: Grabbed preview '/var/lib/mythtv/recordings2/4669_20101215145900.mpg' 1920x1088@100f 2010-12-16 10:06:59.493 ~MythContext waiting for threads to exit.
But I get a segfault if I run:
root@freshertv:/usr/src/mythtv-git/mythtv/mythtv# /usr/local/bin/mythpreviewgen --size 0x0 --chanid 4669 --starttime 20101215145900 --frame 300 2010-12-16 10:07:33.322 --frame: 300 2010-12-16 10:07:33.322 mythpreviewgen version: master [b0.24-584-ga65a111] www.mythtv.org 2010-12-16 10:07:33.322 Using runtime prefix = /usr/local 2010-12-16 10:07:33.322 Using configuration directory = /root/.mythtv 2010-12-16 10:07:33.323 Empty LocalHostName. 2010-12-16 10:07:33.323 Using localhost value of freshertv 2010-12-16 10:07:33.363 Cannot find default UPnP backend 2010-12-16 10:07:33.368 New DB connection, total: 1 2010-12-16 10:07:33.370 Connected to database 'mythconverg' at host: localhost 2010-12-16 10:07:33.374 Closing DB connection named 'DBManager0' 2010-12-16 10:07:33.375 Deleting UPnP client... 2010-12-16 10:07:33.391 Connected to database 'mythconverg' at host: localhost 2010-12-16 10:07:33.391 Current locale EN_US 2010-12-16 10:07:33.391 Reading locale defaults from /usr/local/share/mythtv//locales/en_us.xml 2010-12-16 10:07:33.398 Preview from time spec 2010-12-16 10:07:33.451 MythCoreContext: Connecting to backend server: 192.168.0.84:6543 (try 1 of 1) 2010-12-16 10:07:33.452 Using protocol version 64 2010-12-16 10:07:33.549 AFD: Opened codec 0x7f21a807dff0, id(H264) type(Video) 2010-12-16 10:07:33.549 AFD: codec AC3 has 6 channels 2010-12-16 10:07:33.550 AFD: Opened codec 0x7f21a8086990, id(AC3) type(Audio) Segmentation fault
Here is the backtrace:
Core was generated by `/usr/local/bin/mythpreviewgen --size 0x0 --chanid 4669 --starttime 201012151459'. Program terminated with signal 11, Segmentation fault. #0 0x00007f4b8cf448b1 in AudioPlayer::AddAudioData(char*, int, long) () from /usr/local/lib/libmythtv-0.24.so.0 (gdb) bt #0 0x00007f4b8cf448b1 in AudioPlayer::AddAudioData(char*, int, long) () from /usr/local/lib/libmythtv-0.24.so.0 #1 0x00007f4b8cfa7958 in ?? () from /usr/local/lib/libmythtv-0.24.so.0 #2 0x00007f4b8cfab4c9 in ?? () from /usr/local/lib/libmythtv-0.24.so.0 #3 0x00007f4b8cf19858 in MythPlayer::DecoderGetFrame(DecodeTypes, bool) () from /usr/local/lib/libmythtv-0.24.so.0 #4 0x00007f4b8cf1ab32 in MythPlayer::DecoderLoop(bool) () from /usr/local/lib/libmythtv-0.24.so.0 #5 0x00007f4b8cf20a41 in ?? () from /usr/local/lib/libmythtv-0.24.so.0 #6 0x00007f4b84928775 in ?? () from /usr/lib/libQtCore.so.4 #7 0x00007f4b863ae9ca in start_thread () from /lib/libpthread.so.0 #8 0x00007f4b83e656cd in clone () from /lib/libc.so.6 #9 0x0000000000000000 in ?? ()
Thanks!
D
Attachments (1)
Change History (5)
by , 15 years ago
Attachment: | aplayer.patch added |
---|
comment:2 by , 15 years ago
Hi All,
Just to clarify the patch: the issue is in AudioPlayer::AddAudioData. In the case of PreviewGen, m_audioOutput is null which causes this line to segfault:
int samplesize = m_audioOutput->GetBytesPerFrame();
The patch just exits quickly if m_audioOutput is null, and then removes the redundant m_audioOutput checks in the rest of the code.
Thanks again!
Doug
comment:3 by , 15 years ago
Component: | MythTV - General → MythTV - Audio Output |
---|---|
Owner: | set to |
comment:4 by , 15 years ago
Milestone: | unknown → 0.24.1 |
---|---|
Resolution: | → Fixed |
Status: | new → closed |
Fixed in SHA: 7ed83c31d266b971c97c
patch for above seg fault