snu-quiqcl / iquip

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

Error when changing time or rid rapidly (dataviewer remote) #277

Closed kangz12345 closed 7 months ago

kangz12345 commented 8 months ago

Describe the bug

When I change the hour or rid very fast (using mouse wheel), iquip crashes or printing the error below:

Traceback (most recent call last):
  File "C:\Users\QC109_3\iquip\iquip\apps\dataviewer.py", line 1224, in _handleDatasetClicked
    self.startRemoteDatasetThread(name)
  File "C:\Users\QC109_3\iquip\iquip\apps\dataviewer.py", line 1340, in startRemoteDatasetThread
    rid = int(self.remotePart.ridComboBox.currentText())
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''

Expected behavior

The program should be stable even if the hour or rid is changed rapidly.

To Reproduce

Steps to reproduce the behavior:

  1. Open iquip with dataviewer.
  2. Scroll the mouse wheel on the rid combobox.
  3. The program exits.
BECATRUE commented 8 months ago

As I tested, it is sufficient to check if the previous thread is running when the current value is changed. So, I will fix it like this.