This project has moved. For the latest updates, please go here.

Error renaming file using show information: System.IO.FileNotFoundException

Feb 19, 2015 at 1:35 PM

I am using the version of MCEBuddy and have had a FileNotFoundException (see stack trace below) randomly occur 2 times in the past couple of weeks. This seems to occur during the show rename step.

I have a fairly simple setup:
  1. Record show via wmc.
  2. Remove Comercials
  3. Convert to mp4
  4. Rename show using default settings
  5. Copy file to server.
  6. Delete original
Log Messages:
2015-02-18T01:52:44 MCEBuddy.Engine.ConversionJob --> Finished writing tags, file size [KB] 0.00
--> Dumping complete information about the file C:\Program Files\MCEBuddy2x\working0\NCIS_WJZDT_2015_02_17_19_58_00.mp4
2015-02-18T01:52:44 MCEBuddy.AppWrapper.Base --> Launching process C:\Program Files\MCEBuddy2x\ffmpeg\ffprobe.exe
2015-02-18T01:52:44 MCEBuddy.AppWrapper.Base --> Process arguments -probesize 100M -analyzeduration 300M -i "C:\Program Files\MCEBuddy2x\working0\NCIS_WJZDT_2015_02_17_19_58_00.mp4"
2015-02-18T01:52:44 MCEBuddy.AppWrapper.Base --> UI Session Admin Process : False
2015-02-18T01:52:44 MCEBuddy.AppWrapper.Base --> Setting process priority to Normal
2015-02-18T01:52:44 MCEBuddy.AppWrapper.Base --> ffprobe version N-66779-gcb530dd Copyright (c) 2007-2014 the FFmpeg developers
2015-02-18T01:52:44 MCEBuddy.AppWrapper.Base --> built on Oct 10 2014 19:57:31 with gcc 4.8.2 (GCC)
2015-02-18T01:52:44 MCEBuddy.AppWrapper.Base --> configuration: --arch=x86_64 --target-os=mingw32 --cross-prefix=/home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-x86_64/bin/x86_64-w64-mingw32- --pkg-config=pkg-config --enable-gpl --enable-libx264 --enable-avisynth --enable-libxvid --enable-libmp3lame --enable-version3 --enable-zlib --enable-librtmp --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libopenjpeg --enable-gnutls --enable-libgsm --enable-libfreetype --enable-libopus --disable-w32threads --enable-frei0r --enable-filter=frei0r --enable-libvo-aacenc --enable-bzlib --enable-libxavs --extra-cflags=-DPTW32_STATIC_LIB --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-libschroedinger --enable-libvpx --enable-libilbc --prefix=/home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-x86_64/x86_64-w64-mingw32 --enable-static --disable-shared --enable-libsoxr --enable-fontconfig --enable-libass --enable-libutvideo --enable-libbluray --enable-iconv --enable-libtwolame --extra-cflags=-DLIBTWOLAME_STATIC --enable-libzvbi --enable-libcaca --enable-libmodplug --extra-libs=-lstdc++ --extra-libs=-lpng --enable-libvidstab --enable-libx265 --extra-cflags= --extra-cflags= --enable-nonfree --enable-libfdk-aac --enable-libfaac --enable-runtime-cpudetect
2015-02-18T01:52:44 MCEBuddy.AppWrapper.Base --> libavutil 54. 10.100 / 54. 10.100
2015-02-18T01:52:44 MCEBuddy.AppWrapper.Base --> libavcodec 56. 4.101 / 56. 4.101
2015-02-18T01:52:44 MCEBuddy.AppWrapper.Base --> libavformat 56. 9.100 / 56. 9.100
2015-02-18T01:52:44 MCEBuddy.AppWrapper.Base --> libavdevice 56. 1.100 / 56. 1.100
2015-02-18T01:52:44 MCEBuddy.AppWrapper.Base --> libavfilter 5. 1.103 / 5. 1.103
2015-02-18T01:52:44 MCEBuddy.AppWrapper.Base --> libswscale 3. 1.100 / 3. 1.100
2015-02-18T01:52:44 MCEBuddy.AppWrapper.Base --> libswresample 1. 1.100 / 1. 1.100
2015-02-18T01:52:44 MCEBuddy.AppWrapper.Base --> libpostproc 53. 1.100 / 53. 1.100
2015-02-18T01:52:44 MCEBuddy.AppWrapper.Base --> C:\Program Files\MCEBuddy2x\working0\NCIS_WJZDT_2015_02_17_19_58_00.mp4: No such file or directory
--> Process exited with code 1
INFORMATION> 2015-02-18T01:52:47 MCEBuddy.Engine.ConversionJob --> Renaming file using show information
INFORMATION> --> Rename file to C:\Program Files\MCEBuddy2x\working0\S12E15-Cabin Fever.mp4
WARNING> --> Unable to rename file C:\Program Files\MCEBuddy2x\working0\NCIS_WJZDT_2015_02_17_19_58_00.mp4 to C:\Program Files\MCEBuddy2x\working0\S12E15-Cabin Fever.mp4
--> Error : System.IO.FileNotFoundException: Could not find file 'C:\Program Files\MCEBuddy2x\working0\NCIS_WJZDT_2015_02_17_19_58_00.mp4'.
File name: 'C:\Program Files\MCEBuddy2x\working0\NCIS_WJZDT_2015_02_17_19_58_00.mp4'
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.Move(String sourceFileName, String destFileName)
at MCEBuddy.Util.FileIO.MoveAndInheritPermissions(String source, String destination)
at MCEBuddy.Engine.ConversionJob.RenameConvertedFile(String& subDestinationPath, Log jobLog)
INFORMATION> 2015-02-18T01:52:47 MCEBuddy.Engine.ConversionJob --> Running custom commands
2015-02-18T01:52:47 MCEBuddy.Transcode.CustomCommand --> Custom command parameters read ->
CustomCommandPath =
CustomCommandParameters =
CustomCommandHangPeriod = 300
CustomCommandCritical = False
CustomCommandUISession = False
CustomCommandShowWindow = True
CustomCommandExitCodeCheck = False
INFORMATION> 2015-02-18T01:52:47 MCEBuddy.Transcode.CustomCommand --> No custom commands found
ERROR> 2015-02-18T01:52:47 MCEBuddy.Engine.ConversionJob --> Converted file has been renamed or deleted by custom command -> C:\Program Files\MCEBuddy2x\working0\NCIS_WJZDT_2015_02_17_19_58_00.mp4
INFORMATION> 2015-02-18T01:52:47 MCEBuddy.Engine.ConversionJob -->

Any Ideas? Let me know if you need the full log file.

Feb 19, 2015 at 4:07 PM
Two things
Please post a link to your full conversion log. Want to trace the history

Second can you upgrade to the latest 2.4.2 beta build and see if it till happens. Recently fixed a rare but similar bug

Feb 19, 2015 at 4:40 PM
Full Log:

I will try to upgrade this weekend and let you know if I see any more issues. I know you have been told before, but this is a great product, thanks for all of your effort.

Thanks for the quick response!
Feb 20, 2015 at 1:47 PM
Hmm I see the issue:
After conversion the filesize is:
2015-02-18T01:52:30 MCEBuddy.Transcode.ConvertWithHandbrake --> Finished conversion remuxing video, file size [KB] 1,643,171.00

The next step it writes the metadata into the file using atomicparsley and filesize now is:
2015-02-18T01:52:44 MCEBuddy.Engine.ConversionJob --> Finished writing tags, file size [KB] 0.00

Looks like AtomicParsley is causing the issue. Can you upload a copy of the original WTV file to the mcebuddy server for us to analyze and replicate the issue.

The temp work around is to disable the Add metadata option in expert settings which will skip this last step.

Marked as answer by rboy1 on 3/13/2015 at 9:32 PM
Feb 20, 2015 at 1:55 PM
Unfortunately the file is no longer available on my server. Since it is very random, whenever this happens I just rename the original wtv file by changing the datestamp in the filename and MCEBuddy processes it without any issues. Does atomicparsley have any separate log files that we could review for additional information or do you redirect all of the output to the MCE Logs? I can also check the event logs on the server to see if anything else was going on at that time.
Feb 20, 2015 at 6:15 PM
No logs from atomic parsley. See I you can save the next wtv

Feb 20, 2015 at 9:35 PM
I've updated AtomicParsley to 0.9.6 you can download it from here and replace in your installation directory or just update to the latest 2.4.2 beta build from today

If it happens again please save the original file and the conversion log for us to analyze

Marked as answer by rboy1 on 3/13/2015 at 9:32 PM
Feb 20, 2015 at 10:29 PM
OK great! I will do this in small steps by updating the atomic code first. I will keep you updated. Thanks for the quick response.