macOS - random crashing without active load/users

Wow, I have been lucky with this issue so far. No problem, crossing fingers. Hope it’s fix soon

Mac Mini M2 pro 16GB
MacOS 14.4.1
PMS: 1.40.2.8312
Main Player app: ATV 4K Testflight 8.34

For anyone interested, I have a pretty basic watchdog zsh script I can share that starts Plex if it isn’t running. Also sends me a text message through iCloud and the Messages app which is how I simply keep track of how often I’m crashing (7 times today).

(ha 8 times it crashed while writing this)

1 Like

Let us know if we can help you.

I don’t even bother to relaunch it now… :pensive:

Love to try it. TIA

Server Version#: 1.40.1.8227
Player Version#: 4.125.1
<If providing server logs please do NOT turn on verbose logging, only debug logging should be enabled>
having issues!
wont stop crashing… I attached my crash log, and server log

Plex Crash Uploader.1.log (2.6 KB)
Plex Media Server.1.log (2.0 MB)

@samuraisin I moved your post to this existing topic on the issue.

interested as well

In attempt to get temporary relief from the insta-crashes I rolled PMS back to 1.40.1.8173. Will report back if that’s stable.

FWIW, Plex is still up nearly 24 hrs later on 1.40.1.8173

1 Like

I am also interested!

Hey, folks. Here’s a sample that loops forever, checking on the status of the Plex application and starting it if necessary. If it’s triggered, it’ll send an iMessage to your iCloud account. You can add logic to watch your storage mounts in something like this.

Look up the command to make a script executable, then you can just run it from a shell prompt and minimize. There’s ways to turn these things into daemons that autolaunch and tools to help with that.

(NOTE: When upgrading Plex through its auto-updater you should kill this script or it will possibly launch Plex during the upgrade process, thus interupting it.)

#!/bin/zsh

trap 'shutdown_notification' SIGTERM SIGINT

LOG_FILE="./checkmounts.log"
LAST_MSG_TIME=0
MSG_INTERVAL=300  # 5 minutes in seconds
APPLE_ID="<AppleId>" # Replace with your Apple ID

# Function to log messages
log_message() {
    echo "$(date '+%Y-%m-%d %H:%M:%S') - $1" >> $LOG_FILE
}

# Function to send iMessage
send_imessage() {
    local currentTime=$(date +%s)
    if (( currentTime - LAST_MSG_TIME > MSG_INTERVAL )); then
        osascript -e "tell application \"Messages\" to send \"$1\" to buddy \"$APPLE_ID\""
        LAST_MSG_TIME=$currentTime
        log_message "Sent iMessage notification."
    fi
}

# Function to check if Plex Media Server is running and start it if not
ensure_plex_running() {
    if ! pgrep -x "Plex Media Server" > /dev/null; then
        log_message "Plex Media Server is not running. Starting Plex..."
        osascript -e 'tell application "Plex Media Server" to activate'
        send_imessage "Plex Media Server was not running and has been started."
    else
#        log_message "Plex Media Server is already running."
    fi
}

shutdown_notification() {
    send_imessage "Script is shutting down due to system shutdown or manual interruption."
    log_message "Script received a system shutdown or manual interruption."
    # Any other cleanup code
    exit 0
}


# Main loop
while true; do
    ensure_plex_running
    sleep 45 # seconds
done
3 Likes

Reporting plex is stable on 1.40.1.8173, no crashes since rollback

1 Like

Do you have the link for macOS download?

  • Gracias

Do you not back up your Mac with Time Machine/ Time Capsule? You should be able to back up Time Machine to last month and do a restore of the application in the applications Directory and be good. If not, I can try to get you a file somehow.

is there a link for that version somewhere? osx

1.40.1.8227 still has issues, i doubt that 8173 will be the savior.
In general, it’s very random, i was able to get 24-48 without crashes sometimes, but peace seems to be never an option.

Thanks a lot!

Can’t wait for a bug free version though… (╥﹏╥)

Okay I was poking around and me thinks that I found something. Hopefully this will help the developers out. Or at least point them in the right direction.

So you can try this solution out for yourself and report back if it worked for you. Or if this is just random dumb-luck.

I started to check out the contents of the app. I ended up here; /Applications/Plex Media Server.app/Contents/Resources/Profiles. In here I saw a bunch of device profiles that are used by Plex to best match the client. Now one of these piqued my interest. “tvOS.xml” since all, well most of my clients are tvs. I open the file [via textedit] and started looking at it. Below is the content of the file.

<Client name="tvOS">
  <!-- Author: Plex Inc. -->
  <!-- This profile is used by A8-based tvOS devices -->
  <Settings>
    <Setting name="DirectPlayStreamSelection" value="true" />
    <Setting name="StreamUnselectedIncompatibleAudioStreams" value="true" />
  </Settings>
  <TranscodeTargets>
    <VideoProfile protocol="hls" container="mpegts" codec="h264" audioCodec="aac,eac3,ac3,mp3" subtitleCodec="eia_608_embedded" context="streaming" />
    <MusicProfile container="mp3" codec="mp3" />
    <PhotoProfile container="jpeg" />
  </TranscodeTargets>
  <DirectPlayProfiles>
    <VideoProfile container="mp4" codec="h264,mpeg4" audioCodec="aac,ac3,eac3" subtitleCodec="mov_text,tx3g,ttxt,text" />
    <!-- Since tvOS may have issues direct playing mov/eac3 it has its own profile  -->
    <VideoProfile container="mov" codec="h264,mpeg4" audioCodec="aac,ac3" subtitleCodec="mov_text,tx3g,ttxt,text" />
    <!-- Allow Direct Play of HLS content  -->
    <VideoProfile protocol="hls" container="mpegts" codec="h264" audioCodec="aac" />
    <MusicProfile container="mp3" codec="mp3" />
    <MusicProfile container="mp4" codec="aac" />
    <PhotoProfile container="jpeg" />
  </DirectPlayProfiles>
  <CodecProfiles>
    <VideoCodec name="h264">
      <Limitations>
        <UpperBound name="video.width" value="1920" isRequired="true" />
        <UpperBound name="video.height" value="1080" isRequired="true" />
        <UpperBound name="video.bitDepth" value="8" />
        <NotMatch name="video.separateFields" value="1" />
      </Limitations>
    </VideoCodec>
    <VideoAudioCodec name="aac">
      <Limitations>
        <UpperBound name="audio.channels" value="2" />
      </Limitations>
    </VideoAudioCodec>
  </CodecProfiles>
</Client>

So then I decided edit the file and roll the dice. I changed it to this:

<Client name="tvOS">
  <!-- Author: Plex Inc. -->
  <!-- This profile is used by A8-based tvOS devices -->
  <Settings>
    <Setting name="DirectPlayStreamSelection" value="true" />
    <Setting name="StreamUnselectedIncompatibleAudioStreams" value="true" />
  </Settings>
  <TranscodeTargets>
    <VideoProfile protocol="http" container="mkv" videoCodec="h264,hevc,*" audioCodec="opus,vorbis,flac,*" subtitleCodec="ass,pgs,vobsub,*" context="streaming" />
    <MusicProfile container="mp3" codec="mp3" />
    <PhotoProfile container="jpeg" />
  </TranscodeTargets>
  <DirectPlayProfiles>
    <VideoProfile container="mp4" codec="h264,mpeg4" audioCodec="aac,ac3,eac3" subtitleCodec="mov_text,tx3g,ttxt,text" />
    <!-- Since tvOS may have issues direct playing mov/eac3 it has its own profile  -->
    <VideoProfile container="mov" codec="h264,mpeg4" audioCodec="aac,ac3" subtitleCodec="mov_text,tx3g,ttxt,text" />
    <!-- Allow Direct Play of HLS content  -->
    <VideoProfile protocol="hls" container="mpegts" codec="h264" audioCodec="aac" />
    <MusicProfile container="mp3" codec="mp3" />
    <MusicProfile container="mp4" codec="aac" />
    <PhotoProfile container="jpeg" />
  </DirectPlayProfiles>
  <CodecProfiles>
    <VideoCodec name="h264">
      <Limitations>
        <UpperBound name="video.width" value="1920" isRequired="true" />
        <UpperBound name="video.height" value="1080" isRequired="true" />
        <UpperBound name="video.bitDepth" value="8" />
        <NotMatch name="video.separateFields" value="1" />
      </Limitations>
    </VideoCodec>
    <VideoAudioCodec name="aac">
      <Limitations>
        <UpperBound name="audio.channels" value="2" />
      </Limitations>
    </VideoAudioCodec>
  </CodecProfiles>
</Client>

All I basically did was change the “VideoProfile protocol”. Once I was done, I saved the file and launched Plex. Since this morning, I have not have PMS crash once. Plex was constantly crashing every hour and 1/2 or 3 hours. It was random with no rhyme or reason.

However, since I’ve made this change. It’s been rock-solid. I’ve added content, it’s scanned and pulled the metadata as needed. It’s updated play history, played on several tv’s in the house without any issue. Much like the days of old, it has been reliable.

So if you’re on a Mac, go to this path and edit the file. If you’re on a PC, find this path and try editing the file. If this works for you all I ask is that you reply back to this thread. Yay or nay. And if we get enough yays. Then all I ask from Plex is 4XL sweater. Hey it’s only fair.

~L0$

I just downgraded my PMS installation from 1.40.2.8351 to 1.40.1.8173 on my Mac Studio M2 Max. To everyone else looking to downgrade to PMS v1.40.1.8173 - I’ve uploaded the files for you. It’s quick and simple.

To install: Right-click on the “Plex Media Server.app” in your Applications folder and select “Show Package Contents”. Unzip this file and replace the “Contents” folder of your Plex Media Server app to downgrade to 1.40.1.8173

Screenshot 2024-04-10 at 10.45.53 AM

1 Like

I cannot reproduce this myself and @BigWheel is currently unavailable, is anyone willing to see if this build still crashes?

2 Likes