View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 20 posts ] 
Go to page Previous  1, 2

Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject:
PostPosted: Fri Feb 03, 2006 8:25 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Do this before and after you restart those two processes:
Code:
ps auxw | grep myth

Are the process owners (first column) the same both times?

The only other thing I can think of that might be different is your environment variables... This is a common problem with scripts which don't run properly from crontab, or remotely using ssh, or at start up, ... but which work fine when you test them as yourself. I usually debug this kind of problem by having the script redirect stdout and stderr to a logfile and dump it's environment variables first thing. By the way, this is why I was careful to use full pathnames in the example, since PATH is one of the variables that can differ. Make the script look more like this:

Code:
#!/bin/bash
exec >>/tmp/channel_change.log 2>&1
env

DEVICE="/dev/video0"
CTL_OPTS="-d $DEVICE -u 0x00000ff"
TUNE_OPTS="-d $DEVICE -t europe-west -c $1"

/usr/local/bin/ivtvctl $CTL_OPTS
/usr/local/bin/ivtv-tune $TUNE_OPTS


OBTW - When you set the "External Channel Change Command" under your "Input Connection" did you use the full path to the script? If you created it as /usr/local/bin/my_channel_changer.sh you need to use that full name in myttv-setup too.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 04, 2006 6:25 am 
Offline
Joined: Sun Jan 15, 2006 10:48 am
Posts: 15
I added the logging ,but the PATH and other variables seem equal. I also check the owner of the 2 processes and they are 'mythtv' for mythfrontend and 'root' for the backend.

On the other hand the logging did show me the problem :

Code:
ioctl VIDIOC_S_STD ok
Standard set to 000000ff
/usr/local/bin/tune_video0.sh: line 9:  5205 Segmentation fault      /usr/local/bin/ivtv-tune $TUNE_OPTS


The above logging happens when I change channel in mythfrontend. When I open an xterm at that point (mythfrontend still running) and execute the script, it switches fine.

So I figured the only possibility was that mythtv didn't pass on the channel correctly. I added logging for $1, and saw the channel was passed correct...

When mythfrontend refuses to switch the channel, I do notice this in the frontend output :
Code:
QDateTime::fromString: Parameter out of range
QDateTime::fromString: Parameter out of range
QDateTime::fromString: Parameter out of range

I don't know if it has anything to do with the problem.

So again I'm in the dark :? since I don't see the link between the segmentation fault, and fixing it with a simple restart of the backend.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 04, 2006 11:16 am 
Offline
Joined: Sun Jan 15, 2006 10:48 am
Posts: 15
For now I got around the problem, by adding a backend restart in the Knoppmyth-run script prior to starting the frontend.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 04, 2006 11:18 am 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
detten wrote:
I also check the owner of the 2 processes and they are 'mythtv' for mythfrontend and 'root' for the backend.

:idea: Having the backend run as root isn't normal, it's supposed to run as the mythtv user. At least mine always have across more versions of KnoppMyth than I can count.
detten wrote:
On the other hand the logging did show me the problem :
Code:
ioctl VIDIOC_S_STD ok
Standard set to 000000ff
/usr/local/bin/tune_video0.sh: line 9:  5205 Segmentation fault      /usr/local/bin/ivtv-tune $TUNE_OPTS

OK, that's ugly, the SEGV looks like it's coming from the shell script itself. Try redirecting stdin from /dev/null. Change the exec line to be:
Code:
exec </dev/null >>/tmp/channel_change.log 2>&1

You might also adding this so it is using the right HOME directory:
Code:
export HOME=/home/mythtv

detten wrote:
When mythfrontend refuses to switch the channel, I do notice this in the frontend output :
Code:
QDateTime::fromString: Parameter out of range
QDateTime::fromString: Parameter out of range
QDateTime::fromString: Parameter out of range

I don't know if it has anything to do with the problem.

So again I'm in the dark :? since I don't see the link between the segmentation fault, and fixing it with a simple restart of the backend.

No idea how that error message is related, although that might become clear over time. The restart runs the code in a different context than what it runs in at start up, a different controlling console, potentially different environment variables, ... Those are the main things we need to look at. I've got another thread going with someone about mythfilldatabase where some similar issues have come up.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 05, 2006 11:11 am 
Offline
Joined: Sun Jan 15, 2006 10:48 am
Posts: 15
I'm going abroad for a week, I'll try the suggestions when I get back.
Thanks for the help so far :)


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ] 
Go to page Previous  1, 2



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu