georgy7 / catframes

🎞️ It concatenates frames.
zlib License
9 stars 4 forks source link

What if catframes failed to start or it crashed or it was not found #28

Closed georgy7 closed 2 months ago

georgy7 commented 2 months ago

This is not how the subprocess should be started.

  1. You should not use shell=True. You get too attached to the platform. And it may cause security problems. You also get the terminal's PID instead of PID of the script.
  2. You should check that the process has started and it is still running. If this is not the case, you need to let the user know about it, because this may indicate problems with the installation. For example, catframes will crash if FFmpeg is not installed. A message about this is displayed in stderr.
NeiroSlav commented 2 months ago
  1. The startup process no longer has a shell. Now it has different initial parameters on startup, depending on the OS. This allows the entire process tree termination.
  2. Missing catframes or ffmpeg script, process start fail and process runtime errors will be handled, and thrown to the GUI layer.
georgy7 commented 2 months ago

runtime errors will be handled, and thrown to the GUI layer

I confirm in commit 4dec09db5a991d21628afe4612de77ff6883643a

It is displayed in the UI:

asd11

However, it seems to show internal error upon completion. The progress bar, by the way, does not update the percentages.

asd12

It would be useful to capture the output of catframes and allow it to be opened in case of an error to get more details. This is quite easy to do, except that the temporary folder with these logs must live all the time while the main window is open.

If you stretch these Task rows horizontally, there is enough space for a button/link (or two buttons/links) to open txt-logs using a simple form with monospaced font or a standard text editor.


Steps to reproduce Internal process error:

  1. Rename FFmpeg folder.
  2. Run a Task. It fails.
  3. Rename FFmpeg folder back.
  4. Run another Task.

Update: Can not reproduce on catframes.py with #26

georgy7 commented 2 months ago

The file is ready, ffmpeg and catframes have completed, but the task is supposedly not completed. The progress is displayed as 0%.

2eqawqeq

Update: Can not reproduce on catframes.py with #26