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

Port issues in 3.6? #23

Open
SwaggerNiels opened this issue Oct 29, 2023 · 3 comments
Open

Port issues in 3.6? #23

SwaggerNiels opened this issue Oct 29, 2023 · 3 comments

Comments

@SwaggerNiels
Copy link

Im having trouble as well in Blender 3.6 on Windows
The port won't close from the preferences menu within Blender.
Also sometimes the example python script:

import socket


def send_command(command):
    clientsocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    clientsocket.connect(('localhost', 5000))
    clientsocket.sendall(command.encode())
    while True:
        res = clientsocket.recv(4096)
        if not res:
            break
        print(res.decode())
    clientsocket.close()

send_command("""
j = 0
for i in range(10):
    print(j)
    j+=i*2
j
""")

Does not always time out, but just keeps waiting and crashes the terminal.
What could be happening here?

@p4vv37
Copy link
Owner

p4vv37 commented Oct 29, 2023

Hi
What is the crash? Could you show some callstack from crash or log from closing of the port?

@SwaggerNiels
Copy link
Author

Never mind it is fixed in the new version.

Just for anyone reading this in the future:
if you get
ConnectionRefusedError: [WinError 10061]
just switch to a different port (e.g. 5000 --> 6000)
then everything is fine

@SwaggerNiels
Copy link
Author

SwaggerNiels commented Oct 31, 2023

Oke it is back:

afbeelding

After a while the port won't close anymore.
It takes a few minutes for this to happen, when it does there is no crash, just blender preformance plummets.
It just doesn't update the button to "open port", while the port is actually closed (i cannot use it external to blender to send commands).
Blender itself notably slows down.

@SwaggerNiels SwaggerNiels reopened this Oct 31, 2023
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

2 participants