pcdshub / typhos

Automatic-yet-customizable Graphical User Interface Generation for Ophyd Devices
http://pcdshub.github.io/typhos
Other
16 stars 26 forks source link

BUG: Workaround for C++ Wrapped Exception #480

Closed ZLLentz closed 2 years ago

ZLLentz commented 2 years ago

Description

Simply ignore this error when it pops up. For background on why this happens, see https://github.com/slaclab/pydm/issues/798

If we do fix how the cleanup happens here, this PR is still needed because it's possible for a race condition to hit this line at a bad time anyway.

I snuck a side change in about setting up the devices list earlier because it helped me in the debugging process by fixing some of the reprs during the initial load.

Motivation and Context

closes #470

How Has This Been Tested?

Interactively only

Where Has This Been Documented?

It'll be in the release notes

ZLLentz commented 2 years ago

Thanks Ken! I'd like to add briefly that it seems there is no simple way to patch this behavior on a widget-by-widget basis if the widget has PyDMWidget as a parent. Once the first destroying signal is emitted, it reaches the non-disconnecting destroy block and then forgets that the channel ever existed, preventing any additional future handling without some extreme monkeypatching or poking at the pydm internals.