VidCoder icon indicating copy to clipboard operation
VidCoder copied to clipboard

Ping exception with invalid ID

Open RandomEngy opened this issue 4 years ago • 8 comments

[17:21:51] sync: "Chapter 15" (15) at frame 93074 time 349372773 [18:40:05] sync: "Chapter 16" (16) at frame 99593 time 373843470 ERROR: Operation 'Ping' failed: System.IO.IOException: Cannot invoke method. Pipe has faulted. ---> System.InvalidOperationException: No pending call found for ID 19795504267264 at PipeMethodCalls.MethodInvoker1.HandleResponse(SerializedPipeResponse response) at PipeMethodCalls.PipeStreamWrapper.ProcessMessageAsync(CancellationToken cancellationToken) at PipeMethodCalls.PipeMessageProcessor.StartProcessing(PipeStreamWrapper pipeStreamWrapper) --- End of inner exception stack trace --- at PipeMethodCalls.Utilities.EnsureReadyForInvoke(PipeState state, Exception pipeFault) at PipeMethodCalls.MethodInvoker1.InvokeAsync[TResult](Expression1 expression, CancellationToken cancellationToken) at VidCoder.RemoteProxyBase2.<>c__DisplayClass41_0.<b__1>d.MoveNext() in C:\git\VidCoder\VidCoder\Services\HandBrakeProxy\RemoteProxyBase.cs:line 426 ERROR: Encode failed with code ErrorProcessCommunication Could not clean up failed file 'H:\Movie\English Movie.1080p.BluRay.10Bit.DD5.1-Kill3rWolf.part.mkv'. System.IO.IOException: The process cannot access the file 'H:\Movie\English Movie.1080p.BluRay.10Bit.DD5.1-Kill3rWolf.part.mkv' because it is being used by another process. at System.IO.FileSystem.DeleteFile(String fullPath) at System.IO.FileInfo.Delete() at VidCoder.Services.ProcessingService.TryHandleFailedFile(FileInfo directOutputFileInfo, IAppLogger encodeLogger, String reason, String finalOutputPath) in C:\git\VidCoder\VidCoder\Services\ProcessingService.cs:line 2486 Job completed (Elapsed Time: 19h 34m)

Spend 19hrs,65% encode & my encoding failed...not only with this new beta portable version, happened with previous beta version!

Originally posted by @Kill3rWolf in https://github.com/RandomEngy/VidCoder/issues/886#issuecomment-927928927

RandomEngy avatar Oct 02 '21 22:10 RandomEngy

Looks like there was some corruption on the pipe and it read the response ID in the wrong place. One potential workaround is to go to Global Options -> Process and uncheck "Use worker process to encode".

How often did you see this failure? Did it always happen at the same point or was it random?

RandomEngy avatar Oct 03 '21 00:10 RandomEngy

Again happened! But forgot to uncheck "Use worker process to encode". Yup, %temp%\RarSFX0 folder exist while encoding is ongoing.

[06:54:43] sync: "Chapter 8" (8) at frame 96520 time 361946250 ERROR: Operation 'Ping' failed: System.IO.IOException: Cannot invoke method. Pipe has faulted. ---> System.InvalidOperationException: No pending call found for ID 19795504267264 at PipeMethodCalls.MethodInvoker1.HandleResponse(SerializedPipeResponse response) at PipeMethodCalls.PipeStreamWrapper.ProcessMessageAsync(CancellationToken cancellationToken) at PipeMethodCalls.PipeMessageProcessor.StartProcessing(PipeStreamWrapper pipeStreamWrapper) --- End of inner exception stack trace --- at PipeMethodCalls.Utilities.EnsureReadyForInvoke(PipeState state, Exception pipeFault) at PipeMethodCalls.MethodInvoker1.InvokeAsync[TResult](Expression1 expression, CancellationToken cancellationToken) at VidCoder.RemoteProxyBase2.<>c__DisplayClass41_0.<<PrepareWorkerProcessAsync>b__1>d.MoveNext() in C:\git\VidCoder\VidCoder\Services\HandBrakeProxy\RemoteProxyBase.cs:line 426 ERROR: Encode failed with code ErrorProcessCommunication Could not clean up failed file 'H:\Movie\English Movie\Gunpowder.Milkshake.2021.1080p.BluRay.DD5.1.x265-Kill3rWolf.part.mkv'. System.IO.IOException: The process cannot access the file 'H:\Movie\English Movie\Gunpowder.Milkshake.2021.1080p.BluRay.DD5.1.x265-Kill3rWolf.part.mkv' because it is being used by another process. at System.IO.FileSystem.DeleteFile(String fullPath) at System.IO.FileInfo.Delete() at VidCoder.Services.ProcessingService.TryHandleFailedFile(FileInfo directOutputFileInfo, IAppLogger encodeLogger, String reason, String finalOutputPath) in C:\git\VidCoder\VidCoder\Services\ProcessingService.cs:line 2501 Job completed (Elapsed Time: 21h 03m)

Kill3rWolf avatar Oct 26 '21 02:10 Kill3rWolf

This thing came after uncheck "Use worker process to encode". I intentionally stopped the encoding after 2hrs.

[08:07:39] sync: first pts video is 0
[08:07:39] sync: "Chapter 1" (1) at frame 1 time 0
# Could not get update info.
System.TypeInitializationException: The type initializer for 'Settings' threw an exception.
 ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.
File name: 'System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
   at System.Net.Http.DiagnosticsHandler.Settings..cctor()
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpClientHandler..ctor()
   at System.Net.Http.HttpClient..ctor()
   at VidCoder.Services.Updater.GetUpdateInfoAsync(Boolean beta)
[08:29:37] sync: first pts subtitle 0xff000000 is 7724880
[10:11:52] sync: "Chapter 2" (2) at frame 13546 time 50793750

Kill3rWolf avatar Oct 26 '21 04:10 Kill3rWolf

I see System.Diagnostics.DiagnosticSource.dll in %temp%\RarSFX0 while VidCoder is running. Can you confirm that you see the same thing? I'm trying to figure if this DLL is missing for you.

RandomEngy avatar Oct 28 '21 02:10 RandomEngy

@RandomEngy please check your email address, %temp%\RarSFX0 folder sent!

Kill3rWolf avatar Oct 29 '21 01:10 Kill3rWolf

I got it, thanks. It looks like you have an identical set of DLLs there, but for some reason it couldn't find it on your PC. I'm a bit stumped on this. It even works in the Windows 10 VM that I made without the .NET 5 runtime installed. Does the installer version work for you?

RandomEngy avatar Oct 29 '21 02:10 RandomEngy

Also, are you running any antivirus?

RandomEngy avatar Oct 30 '21 18:10 RandomEngy

Also, are you running any antivirus?

No, I mean no 3rd party antivirus software. Only Windows Security, but real-time protection always stays disabled to reduce CPU & Memory usages.

I got it, thanks. It looks like you have an identical set of DLLs there, but for some reason, it couldn't find it on your PC. I'm a bit stumped on this. It even works in the Windows 10 VM that I made without the .NET 5 runtime installed. Does the installer version work for you?

I'll let you know later.

Kill3rWolf avatar Oct 30 '21 21:10 Kill3rWolf