KenT2 / pipresents

[pipresents] is now unsupported; use [pipresents-next] or [pipresents-gapless]
Other
65 stars 13 forks source link

Hangs after running for a while #6

Closed dpguest closed 11 years ago

dpguest commented 11 years ago

I believe there may be a problem with the video player. In running 24/7, the program hangs after a while, time is unpredictable. If I restart without rebooting the program then hangs when it tries to display the video... After reboot it is okay for a while... I was using a memory split of 256 ... going to change to default of 64 and try again....

KenT2 commented 11 years ago

256 sounds unnecessarily high. I use 128. With 64 subtitles will not work sometimes. Is it the same video each time?

dpguest commented 11 years ago

Thanks, I'll try 128 ....

By the way, I showed your marvelous program to our marketing director yesterday. Blew her away....

She has just spend thousands of dollars on professional signage displays and kiosks ... however none of them are for our waiting rooms where we have LCD TV's ... so I think we may try to do something with PiPresents. I told her that it would require a donation to your Museum, so please give me name and address of Museum so I can be prepared....

-----Original Message----- From: KenT2 notifications@github.com To: KenT2/pipresents pipresents@noreply.github.com Cc: dpguest dpguest@aol.com Sent: Tue, Apr 2, 2013 12:40 pm Subject: Re: [pipresents] Hangs after running for a while (#6)

256 sounds unnecessarily high. I use 128. With 64 subtitles will not work sometimes. — Reply to this email directly or view it on GitHub.

dpguest commented 11 years ago

I just cannot get it to run for 24 hours.... am now running at 700 mhz, 128 memory split ... no other software installed. I come in the morning to a black screen. PiPresents is shown in the taskbar when I move the mouse down and look at the taskbar ... but it is obviously hung.

Is there anything I can do to help you find where the problem is?

The product has to be able to run 24/7....

I am going to try a presentation of just images and messages ... no video ... because I suspect it is the video player that is causing the problem....

-----Original Message----- From: KenT2 notifications@github.com To: KenT2/pipresents pipresents@noreply.github.com Cc: dpguest dpguest@aol.com Sent: Tue, Apr 2, 2013 12:40 pm Subject: Re: [pipresents] Hangs after running for a while (#6)

256 sounds unnecessarily high. I use 128. With 64 subtitles will not work sometimes. — Reply to this email directly or view it on GitHub.

KenT2 commented 11 years ago

I suspect OMXPlayer, has it always happened on a particular track?

Pi Presents has little to do OMXPlayer playing a track it just spawns a sub-process sends the omplayer command and then listens for the end. One possibility is that Pi Presents is not hearing OMXplayer saying have a nice day at the end of the track.

Have a look at omxplayer.log in the pipresents directory. It should say 'have a nice day as its last line.

Also run Pi Presents from a terminal window with debugging on (-d option) and send me the lines from when the last video track was played. If you cannot see the terminal window have a look at pp_log.log in the pipresents directory.

Try playing the track from the command line omxplayer a few times maybe it will fail.

KenT2 commented 11 years ago

I have hopefully made some progress on this.

I tried a loop of 4 videos and it failed after 6 hours. I then changed something to improve the logging and might inadvertently found a fix as a loop of the single failing track has now run for 24 hours.

Could you try out the fix which will also provide me with additional information if it still fails.

Use Leafpad or Idle to edit the file pp_omxdriver.py

At line 119 you will see

    # uncomment to monitor output to and input from omxplayer.bin (read pexpect manual)
    #fout= file('omxlogfile.txt','w') #uncomment and change sys.stdout to fout to log to a file
    #self._process.logfile_send = sys.stdout # send just commands to stdout
    #self._process.logfile=fout # send all communications to log file

Remove the # from two of the lines so it looks like this

    # uncomment to monitor output to and input from omxplayer.bin (read pexpect manual)
    fout= file('omxlogfile.txt','w') #uncomment and change sys.stdout to fout to log to a file
    #self._process.logfile_send = sys.stdout # send just commands to stdout
    self._process.logfile=fout # send all communications to log file

When you run Pi Presents there should now be a file in pipresents called omxlogfile.txt which contains all the communications between Pi Presents and omxplayer, the text that a user would type or read in a terminal window.

This code also fortuitously adds a little time delay between starting omxplayer and listening to it. Hopefully it is that which is solving the race condition.

dpguest commented 11 years ago

Your fix seems to have fixed the problem.... My demo has run now for 24 hours without stopping. However, the time between screens is increasing dramatically, the longer it runs. I have lots of message screens, several slides and one video... Even the 1 second blank screen, one before and one after the video are now taking 8 to 10 seconds....

thanks for your great product...