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

Sending too many requests in a short time period can cause a crash #60

Open
avdstaaij opened this issue Feb 27, 2023 · 1 comment
Open
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@avdstaaij
Copy link
Owner

avdstaaij commented Feb 27, 2023

Multiple users have reported that, when sending many requests in a short period of time (usually because buffering is turned off), GDPC can crash.

Reported on 2021-04-02:
https://discord.com/channels/429406248220360706/803848718461567006/827626475972067328
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=9000): Max retries exceeded with url: /blocks?x=-94&y=120&z=1 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000028EC7EDA340>: Failed to establish a new connection: [WinError 10048]

Reported on 2023-02-27:
https://discord.com/channels/429406248220360706/803848718461567006/1079626275683053618
HTTPConnectionPool(host='localhost', port=9000): Max retries exceeded with url: /blocks?doBlockUpdates=True&spawnDrops=False (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000001D78867AE30>: Failed to establish a new connection: [WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted'))

@avdstaaij avdstaaij added the bug Something isn't working label Feb 27, 2023
@avdstaaij
Copy link
Owner Author

I cannot reproduce this bug on my own machine. I have tried running the code below, but it finishes without problems. If anyone else can reproduce this, I'd like to hear it!

from gdpc import Editor, Block
from gdpc.vector_tools import addY


def main():
    editor = Editor()

    buildArea = editor.getBuildArea()

    pos = addY(buildArea.toRect().center, 100)

    for _ in range(100_000):
        editor.placeBlock(pos, Block("minecraft:red_concrete"))
        editor.placeBlock(pos, Block("minecraft:blue_concrete"))


if __name__ == "__main__":
    main()

@avdstaaij avdstaaij added the help wanted Extra attention is needed label Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant