Ulm-IQO / qudi-core

A framework for modular measurement applications.
GNU General Public License v3.0
25 stars 19 forks source link

[Bug] remote modules do not deactivate cleanly #57

Open qku opened 11 months ago

qku commented 11 months ago

Version

Release v1.4.1

What is affected by the bug?

When deactivating a remote module on the client qudi instance, an exception is raised. After this, qudi cannot be quit normally anymore but only terminated from e.g. the console.

When does the bug occur?

Every time when trying to deactivating a remote module on the client qudi instance.

How do we replicate the issue?

can be replicated with e.g. data instream dummy or time series reader logic from iqo-modules

Expected behavior

qudi should not raise an error and shut down properly when requested to.

Relevant log output

Traceback (most recent call last):
  File "C:\Software\qudi\qudi-env\lib\site-packages\qudi\core\modulemanager.py", line 601, in deactivate       
    self.__poll_timer.stop()
AttributeError: 'NoneType' object has no attribute 'stop'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Software\qudi\qudi-env\lib\site-packages\qudi\core\modulemanager.py", line 208, in deactivate_module
    self._modules[module_name].deactivate()
  File "C:\Software\qudi\qudi-env\lib\site-packages\qudi\core\modulemanager.py", line 604, in deactivate       
    self._instance.module_state.sigStateChanged.disconnect(self._state_change_callback)
  File "C:\Software\qudi\qudi-env\lib\site-packages\rpyc\core\netref.py", line 240, in __call__
    return syncreq(_self, consts.HANDLE_CALL, args, kwargs)
  File "C:\Software\qudi\qudi-env\lib\site-packages\rpyc\core\netref.py", line 63, in syncreq
    return conn.sync_request(handler, proxy, *args)
  File "C:\Software\qudi\qudi-env\lib\site-packages\rpyc\core\protocol.py", line 718, in sync_request
    return _async_res.value
  File "C:\Software\qudi\qudi-env\lib\site-packages\rpyc\core\async_.py", line 108, in value
    raise self._obj
_get_exception_class.<locals>.Derived: Failed to disconnect signal sigStateChanged(PyObject).

========= Remote Traceback (1) =========
Traceback (most recent call last):
  File "C:\Software\qudi\qudi-env\lib\site-packages\rpyc\core\protocol.py", line 359, in _dispatch_request
    res = self._HANDLERS[handler](self, *args)
  File "C:\Software\qudi\qudi-env\lib\site-packages\rpyc\core\protocol.py", line 837, in _handle_call
    return obj(*args, **dict(kwargs))
RuntimeError: Failed to disconnect signal sigStateChanged(PyObject).

Additional Comments

No response

Contact Details

No response