Opened 13 years ago

Closed 11 years ago

#2448 closed defect (invalid)

frontend hangs when switching livetv/guide

Reported by: spam1001@… Owned by: Isaac Richards
Priority: minor Milestone: 0.21
Component: mythtv Version: 0.20
Severity: medium Keywords:
Cc: Ticket locked: no

Description (last modified by Isaac Richards)

Intermittently when switching between the guide and live tv mythfrontend will hang, and must be restarted. This happened right after the 0.20 upgrade, I was running 0.19-fixes before.

Here is a mythfrontend log excerpt around the time of the problem. As far as I can tell the problem always shows these messages:

QGLContext::makeCurrent(): Failed.
2006-09-21 20:59:24.654 XMLParse::LoadTheme using /usr/local/share/mythtv/themes/MythCenter/ui.xml
X Error: BadAccess (attempt to access private resource denied) 10
  Major opcode:  143
  Minor opcode:  5
  Resource id:  0x1800009

Here is a bit more of the log before and after:

2006-09-21 18:50:04.429 TV: Attempting to change from WatchingLiveTV to None
2006-09-21 18:50:04.571 TV: Changing from WatchingLiveTV to None
2006-09-21 20:11:44.740 XMLParse::LoadTheme using /usr/local/share/mythtv/themes/MythCenter/ui.xml
2006-09-21 20:11:54.959 TV: Attempting to change from None to WatchingPreRecorded
0: start_time: 0.036 duration: 323.907
1: start_time: 0.026 duration: 323.883
stream: start_time: 0.289 duration: 3599.073 bitrate=5187 kb/s
2006-09-21 20:11:55.104 AFD: Opened codec 0x8eea0f0, id(MPEG2VIDEO) type(Video)
2006-09-21 20:11:55.104 AFD: Opened codec 0x90ca880, id(MP2) type(Audio)
2006-09-21 20:11:55.106 Opening ALSA audio device 'spdif'.
2006-09-21 20:11:57.412 VideoOutputXv: XvMCTex: Init failed
2006-09-21 20:11:57.412 VideoOutputXv: XVideo Adaptor Name: 'NV17 Video Overlay'
2006-09-21 20:11:57.982 Using realtime priority.
2006-09-21 20:11:57.987 TV: Changing from None to WatchingPreRecorded
2006-09-21 20:11:58.110 Video timing method: SGI OpenGL
2006-09-21 20:31:04.779 WriteAudio: buffer underrun
2006-09-21 20:54:23.137 WriteAudio: buffer underrun
2006-09-21 20:54:35.000 WriteAudio: buffer underrun
2006-09-21 20:58:55.232 TV: Attempting to change from WatchingPreRecorded to None
2006-09-21 20:58:55.406 TV: Changing from WatchingPreRecorded to None
0: start_time: 0.036 duration: 323.907
1: start_time: 0.026 duration: 323.883
stream: start_time: 0.289 duration: 3599.073 bitrate=5187 kb/s
2006-09-21 20:58:56.753 AFD: Opened codec 0x8eea0f0, id(MPEG2VIDEO) type(Video)
2006-09-21 20:58:56.753 AFD: Opened codec 0x8ff7f40, id(MP2) type(Audio)
2006-09-21 20:59:05.826 TV: Attempting to change from None to WatchingLiveTV
2006-09-21 20:59:05.827 Using protocol version 30
2006-09-21 20:59:10.773 AFD: Opened codec 0x90cf0a0, id(MPEG2VIDEO) type(Video)
2006-09-21 20:59:10.774 AFD: Opened codec 0x838a530, id(MP2) type(Audio)
2006-09-21 20:59:10.896 Opening ALSA audio device 'spdif'.
2006-09-21 20:59:10.904 VideoOutputXv: XvMCTex: Init failed
2006-09-21 20:59:10.905 VideoOutputXv: XVideo Adaptor Name: 'NV17 Video Overlay'
2006-09-21 20:59:11.649 Using realtime priority.
2006-09-21 20:59:11.653 TV: Changing from None to WatchingLiveTV
2006-09-21 20:59:11.776 Video timing method: SGI OpenGL
2006-09-21 20:59:23.104 NVP: prebuffering pause
QGLContext::makeCurrent(): Failed.
2006-09-21 20:59:24.654 XMLParse::LoadTheme using /usr/local/share/mythtv/themes/MythCenter/ui.xml
X Error: BadAccess (attempt to access private resource denied) 10
  Major opcode:  143
  Minor opcode:  5
  Resource id:  0x1800009
2006-09-21 21:00:13.033 NVP: Timed out waiting for free video buffers.
2006-09-21 21:00:16.233 NVP: Timed out waiting for free video buffers.
2006-09-21 21:00:19.433 NVP: Timed out waiting for free video buffers.
2006-09-21 21:00:22.634 NVP: Timed out waiting for free video buffers.
2006-09-21 21:00:26.122 NVP: Timed out waiting for free video buffers.
2006-09-21 21:00:30.014 NVP: Timed out waiting for free video buffers.
2006-09-21 21:00:33.490 NVP: Timed out waiting for free video buffers.
2006-09-21 21:00:36.754 NVP: Timed out waiting for free video buffers.
2006-09-21 21:00:40.002 NVP: Timed out waiting for free video buffers.
2006-09-21 21:00:43.223 NVP: Timed out waiting for free video buffers.
2006-09-21 21:00:46.431 NVP: Timed out waiting for free video buffers.
2006-09-21 21:00:49.659 NVP: Timed out waiting for free video buffers.
2006-09-21 21:00:52.875 NVP: Timed out waiting for free video buffers.
2006-09-21 21:00:56.091 NVP: Timed out waiting for free video buffers.
2006-09-21 21:00:59.301 NVP: Timed out waiting for free video buffers.
mythfrontend: Fatal IO error: client killed

Hardware: Nvidia geforce4 (420) 2GB ram 3GHz pentium 4

software: ubuntu 6.06 custom linux 2.6.15.7 nvidia 8774 drivers

settings: output res 720x480 bob deinterlace mpeg2 decoder: standard opengl vertical sync (I tried running without this since the error seemed to be GL related, but the output was too choppy and I couldn't stand it) realtime priority threads use video as timebase NOT checked extra audio buffering gui width 657 gui height 458 gui x offset 27 gui y offset 14 use gui size for tv playback NOT checked

A few people have discussed this problem but I couldn't find an open ticket for it: http://www.gossamer-threads.com/lists/mythtv/users/223221 http://www.mythtvtalk.com/forum/archive/o_t/t_3341/x_error_when_watching_tv_and_guide.html http://mythtv.org/pipermail/mythtv-users/2006-September/148137.html

Attachments (1)

epgresize.patch (3.1 KB) - added by paulx@… 13 years ago.
NOT A FIX. Problem appears to be due to the resizing the mainwindow while another thread is using it as a display surface. The embededing of the display surface would allow the resize but it is after a delay.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 13 years ago by Isaac Richards

Description: modified (diff)
Priority: majorminor

comment:2 in reply to:  description Changed 13 years ago by ron.garrison@…

Replying to spam1001@2thebatcave.com:

Intermittently when switching between the guide and live tv mythfrontend will hang, and must be restarted. This happened right after the 0.20 upgrade, I was running 0.19-fixes before.

I am also having this issue - I would like to add one more piece of information. When setting the GUI size the same as the output resolution, the problem goes away. Hopefully that can help narrow down the cause of the issue.

Ron

Changed 13 years ago by paulx@…

Attachment: epgresize.patch added

NOT A FIX. Problem appears to be due to the resizing the mainwindow while another thread is using it as a display surface. The embededing of the display surface would allow the resize but it is after a delay.

comment:3 Changed 13 years ago by jwestfall

I ran into this today, trying to get myself switched to using mythtv for livetv.

There seems to be some weirdness when using qt painter when opengl painter is compiled in.

I got the following backtrace when using qt painter.

#0  0xb67c18d0 in QGLContext::makeCurrent () from /usr/lib/libqt-mt.so.3
#1  0xb67bd2e4 in QGLWidget::makeCurrent () from /usr/lib/libqt-mt.so.3
#2  0xb67c2b15 in QGLWidget::resizeEvent () from /usr/lib/libqt-mt.so.3
#3  0xb6566ae6 in QWidget::event () from /usr/lib/libqt-mt.so.3
#4  0xb64c1e56 in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#5  0xb64c2bd6 in QApplication::notify () from /usr/lib/libqt-mt.so.3
#6  0xb6df006b in QApplication::sendEvent (receiver=0x826f498, event=0xa1aff054) at qapplication.h:520
#7  0xb648d475 in QWidget::internalSetGeometry () from /usr/lib/libqt-mt.so.3
#8  0xb6560d32 in QWidget::resize () from /usr/lib/libqt-mt.so.3
#9  0xb648d7af in QWidget::setMinimumSize () from /usr/lib/libqt-mt.so.3
#10 0xb64bc2e4 in QWidget::setMinimumSize () from /usr/lib/libqt-mt.so.3
#11 0xb655eae4 in QWidget::setFixedSize () from /usr/lib/libqt-mt.so.3
#12 0xb7a59f90 in TV::doEditSchedule (this=0xb2e01fe0, editType=0) at tv_play.cpp:4767
#13 0xb7a5a0cf in TV::EPGMenuHandler (param=0xb2e01fe0) at tv_play.cpp:4780
#14 0xb6014341 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#15 0xb5ea74ee in clone () from /lib/tls/i686/cmov/libc.so.6

which causes the QGLContext::makeCurrent: Failed error.

The following code forces the QWidget to be QGLWidget at compile time.

#ifdef USE_OPENGL_PAINTER
#define QWidget QGLWidget
#endif

MythMainWindow::MythMainWindow()
              : QWidget(NULL, "mainWindow")
{

#undef QWidget

Forcing USE_OPENGL_PAINTER to be disabled fixes the hang for me.

comment:4 Changed 13 years ago by spam1001@…

Yes disabling USE_OPENGL_PAINTER works for me as well. In fact doing that also seems to make the transisitions between guide/livetv work faster too. In case anyone else is having this very annoying problem and want a quick fix you can use this patch:

diff -U3 -r mythtv.orig/libs/libmythui/libmythui.pro mythtv/libs/libmythui/libmythui.pro
--- mythtv.orig/libs/libmythui/libmythui.pro    2006-10-08 10:52:45.000000000 -0700
+++ mythtv/libs/libmythui/libmythui.pro 2006-10-08 21:32:27.000000000 -0700
@@ -46,7 +46,6 @@
 #

 using_x11 {
-    DEFINES += USE_OPENGL_PAINTER
     SOURCES += mythpainter_ogl.cpp
     HEADERS += mythpainter_ogl.h
     inc.files += mythpainter_ogl.h

comment:5 Changed 12 years ago by anonymous

I was having similar freezes where MythTV would hardlock the computer when switching between livetv and the program guide. The problem went away when I disabled Realtime Priority Threads. I run mythfrontend with sudo and it seems to perform better even with Realtime Priority Threads disabled.

comment:6 Changed 12 years ago by andy.fore@…

I recently ran into this bug as well. I had not encountered it during my Mythbuntu install, but did under Mythdora 4. After disabling Realtime Priority Threads it went away.

comment:7 Changed 12 years ago by stuartm

Milestone: unknown0.21

comment:8 Changed 11 years ago by danielk

Resolution: invalid
Status: newclosed

From the descriptions this sounds very much like a driver/X11 problem.

It be the GLX library loading problem that was fixed in Xorg a couple months ago, but in any case MythTV can not create a hard lockup of your system.

Note: See TracTickets for help on using tickets.