0x90d / videoduplicatefinder

Video Duplicate Finder - Crossplatform
1.91k stars 185 forks source link

No Proccess Can Be Found for This Object (Program Crash) #34

Closed Revan654 closed 5 years ago

Revan654 commented 5 years ago
untitled2

It also looks like the UI is completely messed up, each control has a different size.

untitled

One Small Suggestion, You might want to ditch WinForm API and move to Win32 For Dialog Selection.

For Folder there isn't one for win32(I have no idea why MS never included it)

In that case You can build one from the ground up or use: https://github.com/caioproiete/ookii-dialogs-wpf

0x90d commented 5 years ago

Different UI control size is a known .NET Core WPF bug, see https://github.com/dotnet/wpf/issues/334. Folder dialog has been added to .NET Core natively which is available in winforms and wpf, see https://github.com/dotnet/winforms/pull/57

Regarding the process issue there have been some changes in latest commit which might have already fixed this problem.

Revan654 commented 5 years ago

dialog has been ad

If I'm reading it correctly your still using WinForm inside WPF. I was talking about native Win32 API. Since WinForm API & Win32 are two different APi's. Not sure why we need two of them. Nor why Folder API was never included with WPF in the first place.

As for the UI,

Try adding the Following and see if it helps.

To App.config:

`

</runtime.`

To app.manifest File(Also Included Long Path, For Older Systems, Has to be added to source Code as well):

  • dpiAwareness is the important one, Since dpiaware is already enabled by default with WPF.

`

true true PerMonitor

`

As for the Process, Why Don't you just loop it in a do statement and wait for it to exit? That how I deal with ffmpeg.

Example(You can also loop in progress bar to read the current progress of ffmpeg if you wish too, Everything Runs Async as well.):

Process FFMpegProc = new Process(); ProcessStartInfo FFMpegProcInfo = new ProcessStartInfo(); StreamReader FFMpegReader;

FFMpeg.ProcInfo.FileName = Path.Combine(Folder.FFmpeg, "ffmpeg.exe"); FFMpeg.ProcInfo.Arguments = cl; // cl = Command line Builder(string) FFMpeg.ProcInfo.UseShellExecute = false; FFMpeg.ProcInfo.WindowStyle = ProcessWindowStyle.Hidden; FFMpeg.ProcInfo.RedirectStandardError = true; FFMpeg.ProcInfo.RedirectStandardOutput = true; FFMpeg.ProcInfo.CreateNoWindow = true; FFMpeg.Proc.StartInfo = GifTempProcInfo; FFMpeg.Proc.Start(); FFMpeg.Reader = FFMpeg.Proc.StandardError;

do { await FFMpeg.ReadLineAsync(); } while (!GifTempProc.HasExited);

emdx71 commented 5 years ago

I get this same error if i try and do anything more than 1 thumbnail. tried deleting the db and settings xml and it still happens. if you leave it at 1 thumbnail, it works fine.

nwgat commented 5 years ago

am also getting this, using latest windows binary https://github.com/0x90d/videoduplicatefinder/releases/tag/2.0.6