hibtc / madgui-old

[OBSOLETE] GUI for accelerator simulations using MAD-X
MIT License
1 stars 0 forks source link

Crashed MAD-X instance prevents window from closing #58

Closed coldfix closed 10 years ago

coldfix commented 10 years ago
Traceback (most recent call last):
  File "/home/thomas/src/work/bundle/madgui/madgui/core/notebook.py", line 167, in OnClose
    self._client.close()
  File "/home/thomas/src/work/bundle/pymad/src/cern/cpymad/_libmadx_rpc.py", line 368, in close
    if self.libmadx.started():
  File "/home/thomas/src/work/bundle/pymad/src/cern/cpymad/_libmadx_rpc.py", line 404, in DeferredMethod
    funcname, args, kwargs)
  File "/home/thomas/src/work/bundle/pymad/src/cern/cpymad/_libmadx_rpc.py", line 246, in _request
    self._conn.send((kind, args))
  File "/home/thomas/src/work/bundle/pymad/src/cern/cpymad/_libmadx_rpc.py", line 171, in send
    return pickle.dump(data, self._send, -1)
IOError: [Errno 32] Broken pipe

The fix is obvious: wrap the _client.close() call in a try/except block.