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

New Windows issue (with current code including fix #48) #50

Open
JPfeP opened this issue Sep 3, 2019 · 3 comments
Open

New Windows issue (with current code including fix #48) #50

JPfeP opened this issue Sep 3, 2019 · 3 comments

Comments

@JPfeP
Copy link

JPfeP commented Sep 3, 2019

Hi tshirtman,

A simple stop_all() on a server is producing an error message on Win10 (not on Linux):

Traceback (most recent call last):
  File "D:\blender-2.80-windows64\2.80\python\lib\threading.py", line 917, in _bootstrap_inner
    self.run()
  File "D:\blender-2.80-windows64\2.80\python\lib\threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "C:\users\hebus\Application Data\Blender Foundation\Blender\2.80\scripts\addons\MOM\oscpy\server.py", line 336, in _listen
    data, sender = sender_socket.recvfrom(65535)
OSError: [WinError 10038] Windows Error 0x2736

This happens despite the recent try/catch because its an OSError and not a ConnectionResetError that the new code can intercept.
I edited manually the line 337 to catch all errors as a workaround and my code can now stop the server and reconnect successfully. You will of course determinate a proper solution.

I found this while googling on the error message:
https://stackoverflow.com/questions/35889267/an-operation-was-attempted-on-something-that-is-not-a-socket-tried-fixing-a-lot

@tshirtman
Copy link
Member

tshirtman commented Sep 22, 2019

So i pushed a branch for that, but i really have no idea about how to make a test that show the bug, tried https://github.com/kivy/oscpy/pull/51/files#diff-b9ad2c13b5324b6b836c622979c627e8R932 but it seems to behave really weirdly, passing very fast on linux and windows with 2.7, but running for ages in windows/python3. I would expect it to fail without the attached fix, but it wasn't when i pushed the test without the fix.

#51

@RobertFlatt
Copy link

Similar error with stop() and stop_all()

I used https://github.com/tshirtman/kivy_service_osc
And passed a message to set a flag to break from the send_date() loop and added a SERVER.stop()

FYI this was trying to work around tshirtman/kivy_service_osc#9

 Exception in thread Thread-3:
 Traceback (most recent call last):
   File "C:\Users\Bobf\AppData\Local\Programs\Python\Python38\lib\threading.py", line 932, in _bootstrap_inner
     self.run()
   File "C:\Users\Bobf\AppData\Local\Programs\Python\Python38\lib\threading.py", line 870, in run
     self._target(*self._args, **self._kwargs)
   File "C:\Users\Bobf\AppData\Local\Programs\Python\Python38\lib\site-packages\oscpy\server.py", line 335, in _listen
     data, sender = sender_socket.recvfrom(65535)
 OSError: [WinError 10038] An operation was attempted on something that is not a socket

@RobertFlatt
Copy link

Found a solution to my issue with oscpy==master
tshirtman/kivy_service_osc#9 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants