PDA

View Full Version : MeGUI-x264 closing down on job abort + pause bug


DarkZell666
23rd January 2006, 09:11
Is it normal that MeGUI-x264 closes down when I abort an encoding job ?
Hint : I always have a single job running when I abort (I rarely queue several jobs at once)

The pause bug : When I pause a job and close MeGUI-x264 straight after, when I restart MeGUI it tells me that the job is encoding (when it obviously isn't) and I can't delete it (i have to manualy delete the xml file in the MeGUI directory)

Ok, MeGUI-x264 will surely be dropped completely but I felt necessary to report this, just in case it happens in MeGUI-full :)

Doom9
23rd January 2006, 09:23
The pause bug : When I pause a job and close MeGUI-x264 straight after, when I restart MeGUI it tells me that the job is encoding (when it obviously isn't) and I can't delete it (i have to manualy delete the xml file in the MeGUI directory)Well.. you cannot pause, close the program and then resume... you can only pause, keep megui running, then resume. In fact no encoder would support a restart.. x264 can but it needs additional effort on the user side (when you start again you have to use the seek command and in the end you have to merge the stats files).

And please stop calling it megui full.. it's called megui, and megui x264 edition.. perhaps the latter should be called x264 limited edition because it's just that.. it's severely limited.

DarkZell666
24th January 2006, 13:59
actually I wasn't trying to resume the encode, I was just pointing out that I believe that the paused job should have been automatically deleted upon program exit, or that a notice saying "An encode has been paused, do you want to cancel it ? If not it will be resumed ..." before quitting MeGUI =)

Well, just a suggestion really ^^

Doom9
25th January 2006, 09:48
hmm.. why you'd exit when you have a paused job is kinda beyond me. It's certainly not too much of an effort to change the behavior, but I'm wondering if it's really worth the effort considering the rarity of the usecase. And what about closing when aborting? It's the first time I hear that and there's code that catches every uncatched exception.. the only reasons megui closes without wanting it to is if you kill the app via task manager.. other than that, at the very least you should get an information message before the program dies, and that message would give some information that can be useful to find out what happened (normally the user cannot but it gives the programmers an idea).

Inventive Software
25th January 2006, 11:09
hmm.. why you'd exit when you have a paused job is kinda beyond me.
It might not happen deliberately. It could be that the wrong button was pressed, and then it closed instead of minimising, or something.

Doom9
25th January 2006, 11:14
It might not happen deliberately. It could be that the wrong button was pressed, and then it closed instead of minimising, or something.That's actually not possible.. in paused state the GUI will still think it's encoding and thus ask you for confirmation before exiting.

Inventive Software
26th January 2006, 18:03
That's actually not possible.. in paused state the GUI will still think it's encoding and thus ask you for confirmation before exiting.
So what Darkzell666 has discovered is essentially MeGUI not flushing the old job list. Am I right?

Doom9
26th January 2006, 20:34
Am I right?No.. he discovered that there's no JobStatus.Paused.. this status would make little sense since pause is not really a pause but a complete stop of any stdout and stderr processing on megui's part.. which has the sideeffect that the processor apps will mostly stop (mp4box has a tendency to not stop if it has already progressed quite far in the muxing process). The probably easiest way to avoid jobs in processing state would be to check for paused, and if it's paused, re-enable encoding and hard-abort the job before proceeding with the application shutdown.

Richard Berg
26th January 2006, 20:48
You shouldn't need to do anything special. Hard-abort should kill the job even if it's paused. The only problem is cleanup.

Inventive Software
26th January 2006, 23:12
But if it's paused, that shouldn't necessarily be changed. However, when it gets shut down, then the job that was running should be deleted, or the status changed, so that when MeGUI is started up again it says "Job aborted" or something like this on the job that was running when MeGUI was closed. Does that make sense?

Doom9
27th January 2006, 15:25
I think an if (this.isEncoding)
Abort();
System.Threading.Sleep(500)Prior to saving the jobs should do the trick.. that will make the job aborted.. it's ugly though.. a more proper solution would be to use a ManualResetEvent, which is set once the statusupdate signalling aborted comes back to the main class.