Hi Terry,

Can't recall if you've tried this, but what if you replace the call to
mpg123 with a call to echo or similar, just to narrow down whether it
might be mpg123 that's causing the issue.

If it only crashes with mpg123, perhaps there are some verbose or debug
flags you can use for mpg123 to reveal more information?


On 17/02/2021 13:32, Terry Coles wrote:
> On Tuesday, 16 February 2021 15:25:28 GMT Terry Coles wrote:
>> So I'm kind of back where I started.
> This morning I tried a variety of things to solve this; still to no avail.
> I've attached two more code fragments to this message; these are copied from 
> the latest version of the software on the Pis.  The file 
> Minster_Bells_Software_Fragment.txt shows what I have on the Bells Pi to play 
> Change Rings on demand.  Minster_Music_Software_Fragment2.txt shows the music 
> player version of this; which exhibits this problem.
> In order to get to the bottom of this I have:
> 1.  Reduced the number of MP3 files in the Playlist directory to 1.
> 2.  Re-written the code so that the line that uses glob to parse the files in 
> the directory is replaced with the actual path and filename to the first file.
> 3.  Re-written the code to remove the while loop, to simplify things.
> 4.  Commented out the lines that invoked the mpg123 player and terminated it 
> in the mp3_player_stop() function.
> Items 1 to 3 made no difference whatsoever to the behaviour; I still got the 
> freezing when I tried to restart the player/
> With Item 4 the messages from the Webserver were responded to reliably but of 
> course no music was played.
> It would appear therefore that once the mpg123 player has been invoked and 
> then terminated, invoking it a second time makes the overall program 
> unresponsive.  This I cannot understand because the "Music Playing" message 
> is 
> being printed, so presumably the lock up occurs at the line containing:
>   mp3_wait = mp3_player.wait()
> I realise that the program will halt at that point until the mpg123 player 
> terminates, but the commands coming in are in new threads so they should 
> still 
> be responded to.  (They have once.)
> In any case, the Bells Pi code uses the same approach, so how come that works 
> and the Music code doesn't?

Attachment: signature.asc
Description: OpenPGP digital signature

  Next meeting: Online, Jitsi, Tuesday, 2021-03-02 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk

Reply via email to