snu-quiqcl / iquip

Ion trap Quantum computing User Interface Project
GNU General Public License v3.0
7 stars 0 forks source link

Stage controller misbehaves when it fails to open a device #301

Open kangz12345 opened 6 months ago

kangz12345 commented 6 months ago

Describe the bug

When I click "Open" button and the server failed to open the device, then:

  1. The button becomes checked, while the text is still "Open"
  2. The log shows that it continuously trying to call a client method (probably the periodic position read) and it fails, reporting e.g.:
    2024-04-29 12:15:26: [iquip.apps.stage] Failed to get client H_X.
    2024-04-29 12:15:26: [iquip.apps.stage] Stage H_X reported an error.
    KeyError: 'There is no client H_X'

    Then, if I click the button again, then:

  3. The button becomes disabled, while the text is still "Open"
  4. The log shows that it tries to close the target, which was never open:
    2024-04-29 12:15:27: [iquip.apps.stage] Failed to close target: RPC client H_X does not exist.

Expected behavior

If it fails to open a target, it should log the error and the button should not be checked. Also, no method call should be followed (e.g., the periodic position read).

To Reproduce

Steps to reproduce the behavior:

  1. Open a server which raises an error when trying to open a target
  2. Open iquip and click Open button of the stage controller