pcdshub / atef

PCDS Automated Test Execution Framework
https://pcdshub.github.io/atef/
Other
3 stars 10 forks source link

BUG: Attempting to access deleted QComboBox in MultiModeValueEdit #234

Closed tangkong closed 7 months ago

tangkong commented 7 months ago

Expected Behavior

No broken widgets

Current Behavior

Calls to EPICS can take a while to timeout, delaying callbacks from firing. If we very rapidly change pages, widgets can be deleted before the callback completes, resulting in the classic runtime error C/C++ object deleted

Traceback (most recent call last):
  File "/cds/group/pcds/pyps/conda/py39/envs/pcds-5.8.1/bin/atef", line 10, in <module>
    sys.exit(main())
  File "/cds/home/r/roberttk/devrepos/atef/atef/bin/main.py", line 100, in main
    func(**kwargs)
  File "/cds/home/r/roberttk/devrepos/atef/atef/bin/config.py", line 94, in main
    app.exec()
  File "/cds/home/r/roberttk/devrepos/atef/atef/widgets/config/utils.py", line 2113, in fill_enums
    self.enum_input.addItem(text)
RuntimeError: wrapped C/C++ object of type QComboBox has been deleted

Possible Solution

This might simply require catching the exception in the callback? Or setting up the BusyCursorThread to hook something different on RuntimeErrors?

Steps to Reproduce (for bugs)

  1. Open a config file with an enum comparison
  2. up and down arrow through the tree rapidly passing over the enum-comparison

Context

Messing around with the GUI

Your Environment

pcds-5.8.1