Repeating popups that won't go away if you hold Frame Forward/Backward too long

Started by Who, October 30, 2020, 06:39:16 PM

Previous topic - Next topic

Who

I have been hoping this bug would get fixed for several versions of Avidemux now, it happens in versions 2.7.1 through 2.7.7 at least, and I have lost hours of edits because of it.

Here is how to replicate:  Load a .ts file (this may happen with other file types as well) and do some edits (cut a section out, etc.).  Now move to near the end of the video using the slider and then click and hold the keyframe advance button.  Don't release until you get to the end of the file.  You should get a popup saying something to the effect that you can't move past the end of the file (don't recall the exact wording) but before you can dismiss it you will get another and another and another and another... and so on until, I suppose, you run out of memory or Avidemux crashes.  You can see the same thing if you go to the start of the file and click and hold the keyframe back button.  You might think it is acting on repetitive mouse click actions received before the mouse button is released, but you can release the mouse button as soon as it pops up that first box and it will continue to pop up new boxes for as long as you care to let it run.

The bigger problem is when it gets in this state there is absolutely nothing you can do to save your edits or interact with the program in any way.  You can't even quit it gracefully, and you can't even force quit it using the normal MacOS Force Quit dialog.  The ONLY way to make it stop is to go into Activity Monitor and find the Avidemux process and force quit that.  Of course by that time all hope of recovering your edits is lost.  This happens under MacOS Catalina but it has also happened under a previous version (which I am having a brain fart and can't recall the name of right now, it was the one before Mojave).  I hope you can duplicate this on your system but I would honestly be shocked if you can't because it's been such a pervasive bug.  In case it matters, I'm using x264 for encoding and have it set to save as a mp4 file, though obviously it never gets to that point.

I have two suggestions, one is if possible don't allow a second popup while a first one is still on the screen (though I'm not certain that would completely solve the problem if you can't figure out WHY it keeps popping up repetitive boxes), and the other is to enable some kind of optional auto-save project feature that would save a copy of the current project every x number of seconds any time there is a file loaded but Avidemux is not actively encoding (it would also auto save whenever you started an encode).  Maybe call it current_project.py or something.  That way if you ran into a situation like this would would have only lost up to x seconds of work (whatever you set x to be) rather than all your edits.  Plus there have been times when after I have started an encode I wished I had saved the current project so that I could go back and get some filter settings for possible reuse, and if there were such a file I could make a copy of it and save it even while a project is in the middle of encoding.

(EDITED to specify keyframe buttons, not single frame buttons).

eumagga0x2a

Quote from: Who on October 30, 2020, 06:39:16 PMLoad a .ts file (this may happen with other file types as well) and do some edits (cut a section out, etc.).  Now move to near the end of the video using the slider and then click and hold the frame advance button.  Don't release until you get to the end of the file.

Did you want to advance to the end of video? With alternative keyboard shortcuts enabled, this is done by pressing "E".

Quote from: Who on October 30, 2020, 06:39:16 PMYou should get a popup saying something to the effect that you can't move past the end of the file (don't recall the exact wording) but before you can dismiss it you will get another and another and another and another...

This doesn't happen with a current Avidmux build on Catalina with the given steps according to my testing (the last macOS nightly is rather outdated, unfortunately, you would need to compile from source). I don't get any popup at all. Avidemux just keeps printing "Cannot get next picture. Last segment" to the log (now it logs events to /tmp/admlog.txt on macOS, which is not the right way to do so, but better than having to launch it in Terminal every time you need to inspect debug output).

eumagga0x2a

Okay, I see, it is not the "frame advance button", but the next keyframe button which is needed to be pressed continuosly to build up a queue of events which Avidemux tries to execute instead of skipping (in most cases, holding "Enter" key manages to avoid desaster, but indeed, it should not be necessary).

I'll try to look into it next week.

Who

Yes it is the keyframe buttons that cause the issue, sorry about that, I did not think about the fact that there are single frame buttons and keyframe buttons when I wrote that.  I edited my original post to be more specific.  Anyway, thanks for looking into it.  I think I have tried holding down the Enter key in the past but can't be certain; if it happens again I'll specifically try that but I think perhaps what happens is the computer is popping up new windows faster than the Enter keystrokes can repeat.

eumagga0x2a

It should be better now.

Please be aware of keyframe navigation buttons remaining stuck unless pressed (and released) again. It is even worse with the jog shuttle because it is not immediately obvious that it is stuck – and it fires keyframe seek commands at a higher frequency than the buttons.

All the same behind the scenes, just without the perils of a massive flood of pop-ups (only a single one is shown).

Quote from: Who on October 30, 2020, 06:39:16 PMit happens in versions 2.7.1 through 2.7.7 at least

The acute danger of DoS from (ab)use of navigation buttons was created by me by enabling Qt auto-repeat function for navigation buttons in 2.7.4. It doubt that it ever existed before.

eumagga0x2a