Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors on shutdown with multiple headless MM instances. #763

Open
carlkesselman opened this issue Apr 19, 2024 · 5 comments
Open

Errors on shutdown with multiple headless MM instances. #763

carlkesselman opened this issue Apr 19, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@carlkesselman
Copy link
Contributor

Hi,

I'm seeing an issue on shutdown when having multiple headless instances. I haven't had a chance to hunt this down further. Here is the exception:

Exception ignored in atexit callback: <function _JavaObjectShadow.__init__.<locals>.cleanup at 0x000001EF7101C040>
Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\envs\spim-data\Lib\site-packages\pyjavaz\bridge.py", line 560, in cleanup
    wr()._close()
  File "C:\ProgramData\Anaconda3\envs\spim-data\Lib\site-packages\pyjavaz\bridge.py", line 575, in _close
    self._send(message)
  File "C:\ProgramData\Anaconda3\envs\spim-data\Lib\site-packages\pyjavaz\bridge.py", line 593, in _send
    return self._get_bridge()._send(message)
           ^^^^^^^^^^^^^^^^^^
  File "C:\ProgramData\Anaconda3\envs\spim-data\Lib\site-packages\pyjavaz\bridge.py", line 619, in _get_bridge
    bridge_to_use = _Bridge.create_or_get_existing_bridge(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\ProgramData\Anaconda3\envs\spim-data\Lib\site-packages\pyjavaz\bridge.py", line 259, in create_or_get_existing_bridge
    b = _Bridge(port, convert_camel_case, debug, ip_address, timeout, iterate)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\ProgramData\Anaconda3\envs\spim-data\Lib\site-packages\pyjavaz\bridge.py", line 300, in __init__
    raise Exception(
Exception: Socket timed out after 3000 milliseconds
Exception ignored in: <function _Bridge.__del__ at 0x000001EF6A766520>
Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\envs\spim-data\Lib\site-packages\pyjavaz\bridge.py", line 323, in __del__
    del _Bridge._cached_bridges_by_port_and_thread[self._port_thread_id]
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
KeyError: (4908, 23660)


Code for reproduction

# your code here

Expected outcome

Actual outcome

@carlkesselman carlkesselman added the bug Something isn't working label Apr 19, 2024
@henrypinkard
Copy link
Member

I could imagine that this was introduced when I fixed #737.

Do you see this consistently? Could you make a minimal script for reproducing?

@carlkesselman
Copy link
Contributor Author

carlkesselman commented Apr 22, 2024 via email

@carlkesselman
Copy link
Contributor Author

carlkesselman commented Apr 22, 2024 via email

@henrypinkard
Copy link
Member

Gotcha. Maybe this means there should be a check in that function to see if it has already been called and then just give a warning instead?

@carlkesselman
Copy link
Contributor Author

carlkesselman commented Apr 24, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants