News:

--

Main Menu

[bug] using GUIs in scripts

Started by p3trus, April 26, 2017, 01:13:51 PM

Previous topic - Next topic

p3trus

Hi there,

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

Steps to reproduce:
  • load a video
  • run a script displaying a GUI (eg one of the auto scripts in the Auto menu)
  • either apply the script (OK) or Cancel the dialog - doesn't matter.
    That first run works without any errors after ADM has been [re]started freshly.

    • 100% crash: Try to run the same or another script using a GUI a second time
    • ~40% crash: Load a new video or project file by either the appropiate File menu entry or using the Recent menu
      (I haven't found out exactly in which case this happens; but for a 100% reproduction use the first method)

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


p3trus

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  :-\

eumagga0x2a

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.

mean


eumagga0x2a

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.