pcdshub / lightpath

LCLS Lightpath Module
https://pcdshub.github.io/lightpath
Other
4 stars 9 forks source link

GUI/BUG: timeout errors can hang the gui when opening detailed screen #161

Closed tangkong closed 1 year ago

tangkong commented 1 year ago

Expected Behavior

Clicking on a device to open its detailed screen should not lock the gui semi-indefinitely

Current Behavior

If a device has some incorrect PV information, (but not enough to prevent instantiation and polling via get_lightpath_state()), the gui might initially load and navigate just fine. When the bad device is clicked on, the gui will hang while it times out on every signal/component in the device. (Or at least every component Typhos walks through to create a widget for).

With the lengthened default EpicsSignal timeout (10s), this is a small eternity. The only sign that this is happening is in the console as well, the gui will just hang. (maybe all the more reason for a loading screen or something similar)

It's important to note before attempting to open the detailed screen, the gui works fine. Since get_lightpath_state only looks at a select few signals, as long as those work the gui will update and operate as advertised.

Possible Solution

Set up a timeout for this widget / screen creation external to the EPICS timeouts and bail after a certain amount of time?

Steps to Reproduce (for bugs)

  1. python -m lightpath --hutches XCS
  2. Find and click on xpp_sb3_pim
  3. find a snack as you wait

Context

While going through and verifying all devices, I ran into this one.

Your Environment

pcds-5.4.2, lightpath master, pcdsdevices and device_config lightpath update branches

tangkong commented 1 year ago

Resolved in pcdshub/typhos#519