ranjithdeveloper / mythbox

Automatically exported from code.google.com/p/mythbox
0 stars 0 forks source link

MythTV Shuts down while viewing recordings #32

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Have Mythtv backend set to auto shutdown 
2. Run MythBox
3. Watch a recording

What is the expected output? What do you see instead?
Mythtv backend should not shutdown while MythBox client is connected. It
seems that MythBox is not registering itself as a client to MythTV backend.
On my server, after 5 minutes of no activity, MythTV shuts down the server.

What version of the product are you using? On what operating system?
xbmc 9.04-rc1svn19929-jaunty1 from ppa.launchpad.net
MythBox svn 1062.
MythTV 0.21
Kubuntu 9.04 (frontend), Ubuntu 8.10 (backend) 

Please provide any additional information below.

Original issue reported on code.google.com by bts...@gmail.com on 9 May 2009 at 9:48

GoogleCodeExporter commented 9 years ago
I checked mythtv backend logs and I'm getting these error messages:

MainServer::HandleVersion - Client speaks protocol version 8 but we speak 40!

Mythtv 0.21 Fixes 20282
Library API      : 0.21.20080304-1

Original comment by bts...@gmail.com on 10 May 2009 at 12:22

GoogleCodeExporter commented 9 years ago

Original comment by semir.pa...@gmail.com on 18 May 2009 at 3:33

GoogleCodeExporter commented 9 years ago
Anyone know which myth protocol commands will keep the backend from going to 
sleep?

Original comment by semir.pa...@gmail.com on 20 Oct 2009 at 2:50

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Now that I think about it, this could have been caused by the error I pointed 
out in
Comment 1.  Since the protocol version was wrong, MythTV didn't register XBMC 
as a
valid client.  I'll try again sometime this week with the updated mythbox (I've 
since
upgraded to MythTV 0.22 so now the server is using protocol 50).

Original comment by bts...@gmail.com on 27 Oct 2009 at 3:17

GoogleCodeExporter commented 9 years ago
Any updates?

Original comment by semir.pa...@gmail.com on 22 Nov 2009 at 9:44

GoogleCodeExporter commented 9 years ago
Sorry, my mythtv box was out of commission for a while.  I'll try to have a look
sometime this week.

Original comment by bts...@gmail.com on 24 Nov 2009 at 3:06

GoogleCodeExporter commented 9 years ago
You should be able to fix this issue by always sending ANN PLAYBACK.  From the 
below
link: "A mode of Monitor is the same as Playback except that a Monitor client 
will
not prevent the backend from shutting itself down."

I found the function annPlayback in mythtv.py in the source, but have yet to 
find the
logic that determines use of annPlayback or annMonitor in an attempt for a 
patch.

http://www.mythtv.org/wiki/Myth_Protocol_Command_ANN

Original comment by timothyb...@gmail.com on 3 Dec 2009 at 1:26

GoogleCodeExporter commented 9 years ago
Looks like this can be fixed by switching the default arguments for the connect
function on line 90 of mythtv.py.

FROM:
def connect(self, Playback=False, Monitor=True, slaveBackend=None):

TO:
def connect(self, Playback=True, Monitor=False, slaveBackend=None):

Original comment by timothyb...@gmail.com on 3 Dec 2009 at 1:34

GoogleCodeExporter commented 9 years ago
I made my proposed change to my installation and it does resolve this problem.  
But,
it raises another.

Now it won't shutdown at all even after exiting Mythbox!  Seems like once its
registered as a Playback instead of Monitor, when you close Mythbox either 
Mythbox
doesn't close the connections correctly OR there is a specific myth protocol 
command
that deregistes and Mythbox isn't using it OR there is just no way to 
deregister a
Playback device with myth protocol.

Original comment by timothyb...@gmail.com on 5 Dec 2009 at 9:32

GoogleCodeExporter commented 9 years ago
I've cleaned up the shutdown code to reap all threads/outstanding connections on
shutdown. I've also made connections Playback=True by default. Can you please 
test
the attached build and see if the problem is fixed?

http://dl.dropbox.com/u/131337/mythbox-svn-1699.tar.gz

Original comment by semir.pa...@gmail.com on 22 Dec 2009 at 6:43

GoogleCodeExporter commented 9 years ago
Re-open if still an issue. Fixed in svn 1699.

Original comment by semir.pa...@gmail.com on 17 Jan 2010 at 6:40