Avidemux Forum

Avidemux => Main version 2.6 => Topic started by: p3trus on April 26, 2017, 01:13:51 PM

Title: [bug] using GUIs in scripts
Post by: p3trus on April 26, 2017, 01:13:51 PM
Hi there,

I noticed that the use of Gui() / DialogFactory elements is somewhat broken and tends to crash ADM.

Steps to reproduce:

Seems the clean-up for dialogs is failing; I also tried to assign None to my gui variable at the end of the script, but that doesn't help either.

And another (minor) issue: When closing a script GUI by clicking the X top right, the following error message pops up:
TinyPy:Exception
Exception :(_tp_dict_get) KeyError: exit
...seems that way of dismissing a dialog is not handled.

Hope you can find & eliminate that bug soon - I just made script that might need several runs for different tasks, and having to save a new project & restart ADM after every step somehow perverts the time-saving function of the script ;)

/edit: happens both with 2.6.19 (x64) and r170425_win64Qt5_4 on Win 7 x64
Title: Re: [bug] using GUIs in scripts
Post by: eumagga0x2a on April 26, 2017, 03:28:00 PM
http://avidemux.org/smif/index.php/topic,17638.0.html
Title: Re: [bug] using GUIs in scripts
Post by: p3trus on April 26, 2017, 04:47:11 PM
Thanks, eumagga0x2a - I must admit I haven't searched for that bug, since it was only the minor one I just remembered to add; although some progress seems to have been made, since clicking Cancel doesn't produce any error [for itself];

But the major bug is the one that you have to restart ADM after every script GUI usage  :-\
Title: Re: [bug] using GUIs in scripts
Post by: eumagga0x2a on April 26, 2017, 04:56:12 PM
Quote from: p3trus on April 26, 2017, 04:47:11 PM
although some progress seems to have been made, since clicking Cancel doesn't produce any error [for itself];

No, no changes on that at all. If the return value of the dialog is evaluated and exit() called on false like in dvd.py, clicking Cancel results in the very same error.
Title: Re: [bug] using GUIs in scripts
Post by: mean on April 29, 2017, 08:05:58 AM
Maybe fixed in 2.7
Title: Re: [bug] using GUIs in scripts
Post by: eumagga0x2a on April 29, 2017, 09:21:58 AM
The crash seems to be fixed, but e.g. the dvd script is usable only once per session. The error on exit() is as expected still there.