Garbage Icons on Movies and TV shows

Another test you should make is this:
Take one or a few of the file paths in the server log which show the boost::filesystem:... errors and paste them into the address bar of the Windows file explorer. Then hit Enter. If the file is opened, all is as expected, but if you get an error message, then your Plex server is for some reason expecting to find the file on a different address that it actually is.
One example
M:\Films 1\We Live In Time (2024)\We Live In Time (2024) 1080p H265 AAC51.mp4

Side question: did you actually add the folder M:\Films 1 to your movies library and not just M:?

Okay, tried that with a few file paths as requested and they all opened fine on the PMS via Explorer.
When adding the ā€˜Films 1’ folder to the library I used the browsing tools in the Add Library routine in Plex. I added ā€˜M:\Films 1’. I didn’t type it in I selected it from the drop down box.
M: is the drive mapped in Explorer to a Folder on the NAS called ā€˜Media’ , ā€˜Films 1’ is a folder I created in ā€˜Media’.

What’s confusing here is that my PMS has been running for years now on the same Lenovo hardware together with the WD PR4100 NAS without any issues at all. I created a folder on the C:\ drive of the PMS hardware and copied the three films into it so I could eliminate the network. The issue still persists. PMS still has the same error even though the library is on C:.
Surely this must be an internal Plex issue? Database corruption?

There is only one setting in the NAS box which is allowing the box to set the drives to sleep. This has always been on but I have turned it off for now. I have to say, I don’t want the drives permanently spinning. It’s greater wear and also waste of energy.
There are no SMB settings or other sleep settings I can see.

In the PMS hardware I have turned off ā€˜Allow the computer to turn off the NIC to save power’. It was on. As I said earlier though, the problem occurs with a new library on the internal SSD. So, network only used for external lookups by PMS?

Hi Otto,
I think I may have found the problem. I looked at another app that runs on my PMS hardware - Qbittorrent. Have a look at the execution log vis:
Qbittorrent-log.txt (15.2 KB)

Qbittorrent is experiencing the same issues as Plex. So, if I am correct, the issue is either windows or hardware. As my hardware is rather ageing I’m tempted to just buy a new unit. Do you concur?

I wouldn’t know what the error of your Torrent client means.
But if not only Plex has issues, I would

  • switch off the anti virus, if it’s something other than the Microsoft thing
  • verify the RAM and the Operating System volume
  • if the CPU is an Intel top range from the 13th or 14th generation, it might be damaged by incorrect BIOS settings

The torrent logs show ā€˜Invalid Handle’ multiple times. Obviously reported by the O.S.

Anti Virus is Panda Security and is Admin controlled by my engineers. I will get them to pause it tomorrow. It is an excellent product and I won’t stay without AV for long. Again, Panda has been on this unit for years.

I’ll get the volume and RAM checked out tomorrow.

CPU is IntelĀ® Coreā„¢ i5-3470T Processor

I believe it is 3rd Generation

Ran the Memory Diagnostics, no issues reported.

Disk Check results here:
CHKDSK Results.txt (3.0 KB)

Even if you uninstall it, the default Windows defender kicks in automatically. And it’s sufficient for regular users, btw.

That doesn’t mean anything, because an anti virus app has to do updates all the time in order to stay effective. One of these updates could have caused the issue.

Hi again,
Panda has been switched off completely. No change, exactly the same.
The ā€˜Invalid File Handle’ error report still exists in both Plex and QBittorrent.
I have created folders for both apps solely on the PMS hardware so there is no connection to the NAS whatsoever.
I then installed QBittorrent on my laptop with the same folder names as the PMS and the Invalid File Handle error does not occur.
I then turned off Windows Defender, problem still persists.

The error of ā€˜Error 6: Invalid File Handle’ is reported by the Windows O.S. and both Apps report it. It does not occur on a different PC. The Windows O.S. is up to date with all updates installed. This must surely be either a Windows O.S. or hardware issue. The fact that the error occurs on an App other than Plex, in my view, puts Plex in the clear. Out of the two, the Windows O.S. seems the most likely culprit. Should I try a Windows ā€˜over the top’ re-install? I could investigate an upgrade to Windows 11 but I’m not sure that the ageing hardware will be compatible.

Thoughts?

I think a damage on the system storage volume seems more likely. Let it perform a drive scan and if it finds errors, let it attempt a repair.

Did that the other day. See CHKDSK log file uploaded a couple of days ago. I ran it with repair enabled, nothing found.

Hi everyone,
As there’s been no further suggestions posted over the last four days I guess we’ve run out of ideas on this one? I still have the same issue with Plex not seeing any new additions when scanning and some of my previously added media in libraries being lost from the Plex libraries.
The only possible ways forward that I can see are to perhaps try the following

  1. Carry out a repair ā€˜over the top’ re-install of windows.
  2. If 1. doesn’t work, replace the O.S. and/or hardware.

What do you think? Should I perhaps consider using Linux as the O.S.?

I’d appreciate your views - thanks.

If you’re interested in further troubleshooting, try this.

  1. Create a sub-directory on your C: drive named Media and within it create another named Movies. Within Movies, create a sub-directory reflecting the name of a movie which, when you tried to add it, resulted in the ā€œInvalid file handleā€ error. For example, John Wick (2014).
  2. In Plex edit your movies library and add C:\Media\Movies\ in the ā€œAdd folderā€ tab.
  3. Open a command prompt and run the following to create a file with random content (this will represent the movie):
    `fsutil file createnew ā€œJohn Wick (2014).mkvā€ 15000000
    This will create a 15 MB file with random content that PMS will treat as a movie.
  4. Back in Plex, scan your movie library. (If you have automatic scanning enabled PMS may have already detected it.)

If all went well, you should now have ā€œJohn Wickā€ in your library. Obviously it won’t be playable since there’s just garbage in the file.

Assuming the above worked:

  1. Remove C:\Media\Movies\ from the folder list for the library.
  2. Rescan the library (and empty trash) and ensure the movie is removed.
  3. Move the ā€œJohn Wick (2014)\John Wick (2014).mkvā€ path to your real movies folder on your M: drive.
  4. Scan the library to see if it is correctly added.

I picked on John Wick since it was an example you provided as failing. If that’s no longer the case, just pick another failing movie.

Hi, thanks for helping.
I did as you suggested but no joy I’m afraid. The film wasn’t added. However, there doesn’t appear to be any Invalid Handle Errors in the server log. I’ve attached it for you.
Plex Media Server 01-05-2025.log (620.2 KB)

Thanks for the log. It’s weird, because it thinks it’s found and added it:

May 01, 2025 20:26:17.210 [20996] DEBUG - Scanner [Plex Movie]: found agent match for file 'C:\Media\Movies\John Wick (2014)\John Wick (2014).mkv': 'John Wick'
May 01, 2025 20:26:17.233 [12772] DEBUG - Added new metadata item (John Wick) with ID 93503
...
May 01, 2025 20:26:24.885 [18576] DEBUG - There was a change for metadata item 93503 (John Wick), saving.
May 01, 2025 20:26:24.885 [18576] DEBUG - Updating metadata item (save) (John Wick) with ID 93503

I did the same test and the movie did show in my library and produced the same logging (ignore that paths, I used my Linux-based server for the test):

May 01, 2025 16:12:47.767 [139887878683448] DEBUG - Scanner [Plex Movie]: found agent match for file '/mnt/storage/dvr/movies/John Wick (2014)/John Wick (2014).mkv': 'John Wick'
May 01, 2025 16:12:47.782 [139887878683448] DEBUG - Added new metadata item (John Wick) with ID 1760
...
May 01, 2025 16:12:50.412 [139887816387384] DEBUG - There was a change for metadata item 1760 (John Wick), saving.
May 01, 2025 16:12:50.412 [139887816387384] DEBUG - Updating metadata item (save) (John Wick) with ID 1760

It really should have shown in the library. Can you check the library view and apply the Duplicates filter to see if perhaps it got glommed onto another movie for some reason?

Hi again,
My mistake. I looked at the wrong library. The new library on the C: drive as you suggested was found. I did as you requested and moved the John Wick folder back to the M: drive, Following your empty trash etc,. instructions. On re-scanning it failed as before with Invalid Handle.
I thought it may be a file naming issue so I decided to put the original .mp4 and .srt files back on the C drive of PMS and rescan to see if that worked. I didn’t get that far. I renamed the file to ā€˜John Wick (2014).mp4’ and that was fine. However, when I tried to rename the .srt file to the same convention i.e. ā€˜John Wick (2014).srt’ As soon as I tried to rename it an error popped up vis:

So, Invalid File Handle.

This file handle issue occurs with three apps now - PMS, Qbittorrent and Explorer.

I shall try renaming the files before copying them to the PMS hardware and report back.

That would be my suggestion exactly.

Would you perhaps be able to zip and post one of the affected SRT files? I’d like to see if I can replicate the issue.

Hi, I think we’re getting somewhere.
I copied the .srt file on the PMS and then pasted it to my laptop. It copied fine but when I went to edit and rename it, it had been pasted as a Folder, not a file.

It’s surely pretty conclusive that there is some thing seriously amiss on my PMS - Windows O.S. or hardware. It could be corrupt Windows Explorer software?

This is crazy.

I’ve just been trying to zip that file up for you but I can’t as the system sees it as an empty folder.

That’s ok, I was just going to try to look at it on a macOS (APFS) or Linux (ext4) filesystem to see if it showed similar issues. It’s pretty obvious that it was corrupted somehow now (being seen as a directory). Where that happened will probably be a bit trickier to find.

If you can, I’d recommend deleting and re-sourcing all of the affected files. And a virus scan of the system might be in order.